From c8f04da8abe9c57f714f2f6df3cea5e090776f3d Mon Sep 17 00:00:00 2001 From: Andrew Parmet Date: Sun, 27 Oct 2024 12:15:36 -0400 Subject: [PATCH 1/4] re-apply changes --- .../buf/protovalidate/MessageReflector.java | 43 +++++++++++++++++ .../{internal/evaluator => }/Value.java | 38 +++++++++------ .../internal/evaluator/AnyEvaluator.java | 7 +-- .../internal/evaluator/EnumEvaluator.java | 5 +- .../internal/evaluator/Evaluator.java | 1 + .../internal/evaluator/FieldEvaluator.java | 18 +++++--- .../{ObjectValue.java => FieldValue.java} | 46 +++++++++++-------- .../internal/evaluator/ListEvaluator.java | 1 + .../internal/evaluator/MapEvaluator.java | 3 +- .../internal/evaluator/MessageEvaluator.java | 1 + .../internal/evaluator/MessageValue.java | 27 ++++++----- .../internal/evaluator/OneofEvaluator.java | 8 ++-- .../evaluator/ProtobufMessageReflector.java | 42 +++++++++++++++++ .../evaluator/UnknownDescriptorEvaluator.java | 1 + .../internal/evaluator/ValueEvaluator.java | 5 +- .../internal/expression/CelPrograms.java | 4 +- 16 files changed, 185 insertions(+), 65 deletions(-) create mode 100644 src/main/java/build/buf/protovalidate/MessageReflector.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/Value.java (67%) rename src/main/java/build/buf/protovalidate/internal/evaluator/{ObjectValue.java => FieldValue.java} (74%) create mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java diff --git a/src/main/java/build/buf/protovalidate/MessageReflector.java b/src/main/java/build/buf/protovalidate/MessageReflector.java new file mode 100644 index 00000000..552894f6 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/MessageReflector.java @@ -0,0 +1,43 @@ +// Copyright 2023-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import com.google.protobuf.Descriptors.FieldDescriptor; + +/** + * {@link MessageReflector} is a wrapper around a protobuf message that provides reflective access + * to the underlying message. + * + *

{@link MessageReflector} is a runtime-independent interface. Any protobuf runtime that + * implements this interface can wrap its messages and, along with their {@link + * com.google.protobuf.Descriptors.Descriptor}s, protovalidate-java will be able to validate them. + */ +public interface MessageReflector { + /** + * Whether the wrapped message has the field described by the provided field descriptor. + * + * @param field The field descriptor to check for. + * @return Whether the field is present. + */ + boolean hasField(FieldDescriptor field); + + /** + * Get the value described by the provided field descriptor. + * + * @param field The field descriptor for which to retrieve a value. + * @return The value corresponding to the field descriptor. + */ + Value getField(FieldDescriptor field); +} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/Value.java b/src/main/java/build/buf/protovalidate/Value.java similarity index 67% rename from src/main/java/build/buf/protovalidate/internal/evaluator/Value.java rename to src/main/java/build/buf/protovalidate/Value.java index 61c4a151..8b0c5225 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/Value.java +++ b/src/main/java/build/buf/protovalidate/Value.java @@ -12,9 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package build.buf.protovalidate.internal.evaluator; +package build.buf.protovalidate; -import com.google.protobuf.Message; import java.util.List; import java.util.Map; import javax.annotation.Nullable; @@ -25,22 +24,13 @@ */ public interface Value { /** - * Get the underlying value as a {@link Message} type. + * Get the underlying value as a {@link MessageReflector} type. * - * @return The underlying {@link Message} value. null if the underlying value is not a {@link - * Message} type. + * @return The underlying {@link MessageReflector} value. null if the underlying value is not a + * {@link MessageReflector} type. */ @Nullable - Message messageValue(); - - /** - * Get the underlying value and cast it to the class type. - * - * @param clazz The inferred class. - * @return The value casted to the inferred class type. - * @param The class type. - */ - T value(Class clazz); + MessageReflector messageValue(); /** * Get the underlying value as a list. @@ -57,4 +47,22 @@ public interface Value { * list. */ Map mapValue(); + + /** + * Get the underlying value as it should be provided to CEL. + * + * @return The underlying value as a CEL-compatible type. + */ + Object celValue(); + + /** + * Get the underlying value and cast it to the class type, which will be a type checkable + * internally by protovalidate-java. + * + * @param clazz The inferred class. + * @return The value cast to the inferred class type. + * @param The class type. + */ + @Nullable + T jvmValue(Class clazz); } diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java index c1a8c8e5..fea3bf80 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java @@ -14,11 +14,12 @@ package build.buf.protovalidate.internal.evaluator; +import build.buf.protovalidate.MessageReflector; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import com.google.protobuf.Descriptors; -import com.google.protobuf.Message; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -45,12 +46,12 @@ class AnyEvaluator implements Evaluator { @Override public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Message anyValue = val.messageValue(); + MessageReflector anyValue = val.messageValue(); if (anyValue == null) { return ValidationResult.EMPTY; } List violationList = new ArrayList<>(); - String typeURL = (String) anyValue.getField(typeURLDescriptor); + String typeURL = anyValue.getField(typeURLDescriptor).jvmValue(String.class); if (!in.isEmpty() && !in.contains(typeURL)) { Violation violation = Violation.newBuilder() diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java index 7f2b17da..53b20a87 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import com.google.protobuf.Descriptors; @@ -62,11 +63,11 @@ public boolean tautology() { */ @Override public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Descriptors.EnumValueDescriptor enumValue = val.value(Descriptors.EnumValueDescriptor.class); + Integer enumValue = val.jvmValue(Integer.class); if (enumValue == null) { return ValidationResult.EMPTY; } - if (!values.contains(enumValue.getNumber())) { + if (!values.contains(enumValue)) { return new ValidationResult( Collections.singletonList( Violation.newBuilder() diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java index 26ca0b21..59ef078d 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; /** diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java index e4043680..aad70060 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java @@ -14,11 +14,12 @@ package build.buf.protovalidate.internal.evaluator; +import build.buf.protovalidate.MessageReflector; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.Message; import java.util.Collections; import java.util.List; import java.util.Objects; @@ -68,13 +69,17 @@ public boolean tautology() { @Override public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Message message = val.messageValue(); + MessageReflector message = val.messageValue(); if (message == null) { return ValidationResult.EMPTY; } boolean hasField; if (descriptor.isRepeated()) { - hasField = message.getRepeatedFieldCount(descriptor) != 0; + if (descriptor.isMapField()) { + hasField = !message.getField(descriptor).mapValue().isEmpty(); + } else { + hasField = !message.getField(descriptor).repeatedValue().isEmpty(); + } } else { hasField = message.hasField(descriptor); } @@ -90,12 +95,11 @@ public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionEx if (ignoreEmpty && !hasField) { return ValidationResult.EMPTY; } - Object fieldValue = message.getField(descriptor); - if (ignoreDefault && Objects.equals(zero, fieldValue)) { + Value fieldValue = message.getField(descriptor); + if (ignoreDefault && Objects.equals(zero, fieldValue.jvmValue(Object.class))) { return ValidationResult.EMPTY; } - ValidationResult evalResult = - valueEvaluator.evaluate(new ObjectValue(descriptor, fieldValue), failFast); + ValidationResult evalResult = valueEvaluator.evaluate(fieldValue, failFast); List violations = ErrorPathUtils.prefixErrorPaths(evalResult.getViolations(), "%s", descriptor.getName()); return new ValidationResult(violations); diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ObjectValue.java b/src/main/java/build/buf/protovalidate/internal/evaluator/FieldValue.java similarity index 74% rename from src/main/java/build/buf/protovalidate/internal/evaluator/ObjectValue.java rename to src/main/java/build/buf/protovalidate/internal/evaluator/FieldValue.java index 7390375a..8ff12de6 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/ObjectValue.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/FieldValue.java @@ -14,6 +14,8 @@ package build.buf.protovalidate.internal.evaluator; +import build.buf.protovalidate.MessageReflector; +import build.buf.protovalidate.Value; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Descriptors; import com.google.protobuf.Message; @@ -25,11 +27,8 @@ import javax.annotation.Nullable; import org.projectnessie.cel.common.ULong; -/** - * The {@link build.buf.protovalidate.internal.evaluator.Value} type that contains a field - * descriptor and its value. - */ -public final class ObjectValue implements Value { +/** The {@link Value} type that contains a field descriptor and its value. */ +public final class FieldValue implements Value { /** * {@link com.google.protobuf.Descriptors.FieldDescriptor} is the field descriptor for the value. @@ -40,27 +39,38 @@ public final class ObjectValue implements Value { private final Object value; /** - * Constructs a new {@link build.buf.protovalidate.internal.evaluator.ObjectValue}. + * Constructs a new {@link FieldValue}. * * @param fieldDescriptor The field descriptor for the value. * @param value The value associated with the field descriptor. */ - ObjectValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) { + FieldValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) { this.fieldDescriptor = fieldDescriptor; this.value = value; } - @Nullable @Override - public Message messageValue() { - if (fieldDescriptor.getJavaType() == Descriptors.FieldDescriptor.JavaType.MESSAGE) { - return (Message) value; + @Nullable + public MessageReflector messageValue() { + if (fieldDescriptor.getType() == Descriptors.FieldDescriptor.Type.MESSAGE) { + return new ProtobufMessageReflector((Message) value); } return null; } @Override - public T value(Class clazz) { + public T jvmValue(Class clazz) { + if (value instanceof Descriptors.EnumValueDescriptor) { + return clazz.cast(((Descriptors.EnumValueDescriptor) value).getNumber()); + } + return clazz.cast(value); + } + + @Override + public Object celValue() { + if (value instanceof Descriptors.EnumValueDescriptor) { + return ((Descriptors.EnumValueDescriptor) value).getNumber(); + } Descriptors.FieldDescriptor.Type type = fieldDescriptor.getType(); if (!fieldDescriptor.isRepeated() && (type == Descriptors.FieldDescriptor.Type.UINT32 @@ -74,9 +84,9 @@ public T value(Class clazz) { * When using uint32/uint64 in your protobuf objects or CEL expressions in Java, * wrap them with the org.projectnessie.cel.common.ULong type. */ - return clazz.cast(ULong.valueOf(((Number) value).longValue())); + return ULong.valueOf(((Number) value).longValue()); } - return clazz.cast(value); + return value; } @Override @@ -85,7 +95,7 @@ public List repeatedValue() { if (fieldDescriptor.isRepeated()) { List list = (List) value; for (Object o : list) { - out.add(new build.buf.protovalidate.internal.evaluator.ObjectValue(fieldDescriptor, o)); + out.add(new FieldValue(fieldDescriptor, o)); } } return out; @@ -103,12 +113,10 @@ public Map mapValue() { Map out = new HashMap<>(input.size()); for (AbstractMessage entry : input) { Object keyValue = entry.getField(keyDesc); - Value keyJavaValue = - new build.buf.protovalidate.internal.evaluator.ObjectValue(keyDesc, keyValue); + Value keyJavaValue = new FieldValue(keyDesc, keyValue); Object valValue = entry.getField(valDesc); - Value valJavaValue = - new build.buf.protovalidate.internal.evaluator.ObjectValue(valDesc, valValue); + Value valJavaValue = new FieldValue(valDesc, valValue); out.put(keyJavaValue, valJavaValue); } diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java index b55c671f..e420f91e 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import java.util.ArrayList; diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java index a2894dfe..149e3d49 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.FieldConstraints; import build.buf.validate.Violation; @@ -100,7 +101,7 @@ private List evalPairs(Value key, Value value, boolean failFast) violations.addAll(keyViolations); violations.addAll(valueViolations); - Object keyName = key.value(Object.class); + Object keyName = key.jvmValue(Object.class); if (keyName == null) { return Collections.emptyList(); } diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java index 84a873be..aa51b0ae 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import java.util.ArrayList; diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java b/src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java index 73bb6f62..ce52b2de 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java @@ -14,19 +14,18 @@ package build.buf.protovalidate.internal.evaluator; +import build.buf.protovalidate.MessageReflector; +import build.buf.protovalidate.Value; import com.google.protobuf.Message; import java.util.Collections; import java.util.List; import java.util.Map; +import javax.annotation.Nullable; -/** - * The {@link build.buf.protovalidate.internal.evaluator.Value} type that contains a {@link - * com.google.protobuf.Message}. - */ +/** The {@link Value} type that contains a {@link com.google.protobuf.Message}. */ public final class MessageValue implements Value { - /** Object type since the object type is inferred from the field descriptor. */ - private final Object value; + private final ProtobufMessageReflector value; /** * Constructs a {@link MessageValue} with the provided message value. @@ -34,17 +33,23 @@ public final class MessageValue implements Value { * @param value The message value. */ public MessageValue(Message value) { - this.value = value; + this.value = new ProtobufMessageReflector(value); } @Override - public Message messageValue() { - return (Message) value; + public MessageReflector messageValue() { + return value; } @Override - public T value(Class clazz) { - return clazz.cast(value); + @Nullable + public T jvmValue(Class clazz) { + return null; + } + + @Override + public Object celValue() { + return value.getMessage(); } @Override diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java index d5a4fa21..269f8a8f 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java @@ -14,11 +14,12 @@ package build.buf.protovalidate.internal.evaluator; +import build.buf.protovalidate.MessageReflector; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import com.google.protobuf.Descriptors.OneofDescriptor; -import com.google.protobuf.Message; import java.util.Collections; /** {@link OneofEvaluator} performs validation on a oneof union. */ @@ -47,11 +48,12 @@ public boolean tautology() { @Override public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Message message = val.messageValue(); + MessageReflector message = val.messageValue(); if (message == null) { return ValidationResult.EMPTY; } - if (required && (message.getOneofFieldDescriptor(descriptor) == null)) { + boolean hasField = descriptor.getFields().stream().anyMatch(message::hasField); + if (required && !hasField) { return new ValidationResult( Collections.singletonList( Violation.newBuilder() diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java b/src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java new file mode 100644 index 00000000..e76d1946 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java @@ -0,0 +1,42 @@ +// Copyright 2023-2024 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate.internal.evaluator; + +import build.buf.protovalidate.MessageReflector; +import build.buf.protovalidate.Value; +import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.Message; + +class ProtobufMessageReflector implements MessageReflector { + private final Message message; + + ProtobufMessageReflector(Message message) { + this.message = message; + } + + public Message getMessage() { + return message; + } + + @Override + public boolean hasField(FieldDescriptor field) { + return message.hasField(field); + } + + @Override + public Value getField(FieldDescriptor field) { + return new FieldValue(field, message.getField(field)); + } +} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java index 6dbbefa3..6b25d07d 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import com.google.protobuf.Descriptors.Descriptor; diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java index 9dec92cb..2a85024e 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java +++ b/src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java @@ -15,6 +15,7 @@ package build.buf.protovalidate.internal.evaluator; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.Violation; import java.util.ArrayList; @@ -49,7 +50,7 @@ public boolean tautology() { @Override public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - if (this.shouldIgnore(val.value(Object.class))) { + if (this.shouldIgnore(val.jvmValue(Object.class))) { return ValidationResult.EMPTY; } List violations = new ArrayList<>(); @@ -82,7 +83,7 @@ public void setIgnoreEmpty(Object zero) { this.zero = zero; } - private boolean shouldIgnore(Object value) { + private boolean shouldIgnore(@Nullable Object value) { return this.ignoreEmpty && Objects.equals(value, this.zero); } } diff --git a/src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java b/src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java index 4b88149b..d423cfb1 100644 --- a/src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java +++ b/src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java @@ -15,9 +15,9 @@ package build.buf.protovalidate.internal.expression; import build.buf.protovalidate.ValidationResult; +import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.protovalidate.internal.evaluator.Evaluator; -import build.buf.protovalidate.internal.evaluator.Value; import build.buf.validate.Violation; import java.util.ArrayList; import java.util.List; @@ -43,7 +43,7 @@ public boolean tautology() { @Override public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Variable activation = Variable.newThisVariable(val.value(Object.class)); + Variable activation = Variable.newThisVariable(val.celValue()); List violationList = new ArrayList<>(); for (CompiledProgram program : programs) { Violation violation = program.eval(activation); From 38602822f80f0cae15423e7cdcd03f228b3bdd9d Mon Sep 17 00:00:00 2001 From: Andrew Parmet Date: Tue, 24 Jun 2025 20:37:54 -0400 Subject: [PATCH 2/4] update from rebased branch --- .github/ISSUE_TEMPLATE/bug_report.md | 1 - .github/buf-logo.svg | 11 +- LICENSE | 4 +- Makefile | 24 +- README.md | 188 +- buf.gen.yaml | 5 +- build.gradle.kts | 144 +- conformance/buf.gen.yaml | 5 +- conformance/build.gradle.kts | 70 +- conformance/expected-failures.yaml | 0 conformance/src/main/java/build/.DS_Store | Bin 0 -> 6148 bytes .../conformance/FileDescriptorUtil.java | 2 +- .../buf/protovalidate/conformance/Main.java | 32 +- .../validate/conformance/cases/AnEnum.java | 133 - .../buf/validate/conformance/cases/AnyIn.java | 558 -- .../conformance/cases/AnyInOrBuilder.java | 26 - .../validate/conformance/cases/AnyNone.java | 558 -- .../conformance/cases/AnyNoneOrBuilder.java | 26 - .../validate/conformance/cases/AnyNotIn.java | 558 -- .../conformance/cases/AnyNotInOrBuilder.java | 26 - .../conformance/cases/AnyRequired.java | 558 -- .../cases/AnyRequiredOrBuilder.java | 26 - .../conformance/cases/BoolConstFalse.java | 432 - .../cases/BoolConstFalseOrBuilder.java | 17 - .../conformance/cases/BoolConstTrue.java | 432 - .../cases/BoolConstTrueOrBuilder.java | 17 - .../conformance/cases/BoolExample.java | 432 - .../cases/BoolExampleOrBuilder.java | 17 - .../validate/conformance/cases/BoolNone.java | 432 - .../conformance/cases/BoolNoneOrBuilder.java | 17 - .../validate/conformance/cases/BoolProto.java | 110 - .../conformance/cases/BytesConst.java | 432 - .../cases/BytesConstOrBuilder.java | 17 - .../conformance/cases/BytesContains.java | 432 - .../cases/BytesContainsOrBuilder.java | 17 - .../cases/BytesEqualMinMaxLen.java | 432 - .../cases/BytesEqualMinMaxLenOrBuilder.java | 17 - .../conformance/cases/BytesExample.java | 432 - .../cases/BytesExampleOrBuilder.java | 17 - .../validate/conformance/cases/BytesIP.java | 432 - .../conformance/cases/BytesIPOrBuilder.java | 17 - .../validate/conformance/cases/BytesIPv4.java | 432 - .../conformance/cases/BytesIPv4OrBuilder.java | 17 - .../validate/conformance/cases/BytesIPv6.java | 432 - .../conformance/cases/BytesIPv6Ignore.java | 432 - .../cases/BytesIPv6IgnoreOrBuilder.java | 17 - .../conformance/cases/BytesIPv6OrBuilder.java | 17 - .../validate/conformance/cases/BytesIn.java | 432 - .../conformance/cases/BytesInOrBuilder.java | 17 - .../validate/conformance/cases/BytesLen.java | 432 - .../conformance/cases/BytesLenOrBuilder.java | 17 - .../conformance/cases/BytesMaxLen.java | 432 - .../cases/BytesMaxLenOrBuilder.java | 17 - .../conformance/cases/BytesMinLen.java | 432 - .../cases/BytesMinLenOrBuilder.java | 17 - .../conformance/cases/BytesMinMaxLen.java | 432 - .../cases/BytesMinMaxLenOrBuilder.java | 17 - .../validate/conformance/cases/BytesNone.java | 432 - .../conformance/cases/BytesNoneOrBuilder.java | 17 - .../conformance/cases/BytesNotIP.java | 432 - .../cases/BytesNotIPOrBuilder.java | 17 - .../conformance/cases/BytesNotIPv4.java | 432 - .../cases/BytesNotIPv4OrBuilder.java | 17 - .../conformance/cases/BytesNotIPv6.java | 432 - .../cases/BytesNotIPv6OrBuilder.java | 17 - .../conformance/cases/BytesNotIn.java | 432 - .../cases/BytesNotInOrBuilder.java | 17 - .../conformance/cases/BytesPattern.java | 432 - .../cases/BytesPatternOrBuilder.java | 17 - .../conformance/cases/BytesPrefix.java | 432 - .../cases/BytesPrefixOrBuilder.java | 17 - .../conformance/cases/BytesProto.java | 316 - .../conformance/cases/BytesSuffix.java | 432 - .../cases/BytesSuffixOrBuilder.java | 17 - .../conformance/cases/ComplexTestEnum.java | 133 - .../conformance/cases/ComplexTestMsg.java | 3022 ------- .../cases/ComplexTestMsgOrBuilder.java | 242 - .../conformance/cases/DoubleConst.java | 433 - .../cases/DoubleConstOrBuilder.java | 17 - .../conformance/cases/DoubleExGTELTE.java | 433 - .../cases/DoubleExGTELTEOrBuilder.java | 17 - .../conformance/cases/DoubleExLTGT.java | 433 - .../cases/DoubleExLTGTOrBuilder.java | 17 - .../conformance/cases/DoubleExample.java | 433 - .../cases/DoubleExampleOrBuilder.java | 17 - .../conformance/cases/DoubleFinite.java | 433 - .../cases/DoubleFiniteOrBuilder.java | 17 - .../validate/conformance/cases/DoubleGT.java | 433 - .../validate/conformance/cases/DoubleGTE.java | 433 - .../conformance/cases/DoubleGTELTE.java | 433 - .../cases/DoubleGTELTEOrBuilder.java | 17 - .../conformance/cases/DoubleGTEOrBuilder.java | 17 - .../conformance/cases/DoubleGTLT.java | 433 - .../cases/DoubleGTLTOrBuilder.java | 17 - .../conformance/cases/DoubleGTOrBuilder.java | 17 - .../conformance/cases/DoubleIgnore.java | 433 - .../cases/DoubleIgnoreOrBuilder.java | 17 - .../validate/conformance/cases/DoubleIn.java | 433 - .../conformance/cases/DoubleInOrBuilder.java | 17 - .../cases/DoubleIncorrectType.java | 433 - .../cases/DoubleIncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/DoubleLT.java | 433 - .../validate/conformance/cases/DoubleLTE.java | 433 - .../conformance/cases/DoubleLTEOrBuilder.java | 17 - .../conformance/cases/DoubleLTOrBuilder.java | 17 - .../conformance/cases/DoubleNone.java | 433 - .../cases/DoubleNoneOrBuilder.java | 17 - .../conformance/cases/DoubleNotFinite.java | 433 - .../cases/DoubleNotFiniteOrBuilder.java | 17 - .../conformance/cases/DoubleNotIn.java | 433 - .../cases/DoubleNotInOrBuilder.java | 17 - .../conformance/cases/DurationConst.java | 558 -- .../cases/DurationConstOrBuilder.java | 26 - .../conformance/cases/DurationExGTELTE.java | 558 -- .../cases/DurationExGTELTEOrBuilder.java | 26 - .../conformance/cases/DurationExLTGT.java | 558 -- .../cases/DurationExLTGTOrBuilder.java | 26 - .../conformance/cases/DurationExample.java | 558 -- .../cases/DurationExampleOrBuilder.java | 26 - .../cases/DurationFieldWithOtherFields.java | 634 -- ...DurationFieldWithOtherFieldsOrBuilder.java | 32 - .../conformance/cases/DurationGT.java | 558 -- .../conformance/cases/DurationGTE.java | 558 -- .../conformance/cases/DurationGTELTE.java | 558 -- .../cases/DurationGTELTEOrBuilder.java | 26 - .../cases/DurationGTEOrBuilder.java | 26 - .../conformance/cases/DurationGTLT.java | 558 -- .../cases/DurationGTLTOrBuilder.java | 26 - .../cases/DurationGTOrBuilder.java | 26 - .../conformance/cases/DurationIn.java | 558 -- .../cases/DurationInOrBuilder.java | 26 - .../conformance/cases/DurationLT.java | 558 -- .../conformance/cases/DurationLTE.java | 558 -- .../cases/DurationLTEOrBuilder.java | 26 - .../cases/DurationLTOrBuilder.java | 26 - .../conformance/cases/DurationNone.java | 558 -- .../cases/DurationNoneOrBuilder.java | 26 - .../conformance/cases/DurationNotIn.java | 558 -- .../cases/DurationNotInOrBuilder.java | 26 - .../conformance/cases/DurationRequired.java | 558 -- .../cases/DurationRequiredOrBuilder.java | 26 - .../cases/EditionsMapIgnoreDefault.java | 640 -- .../EditionsMapIgnoreDefaultOrBuilder.java | 43 - .../cases/EditionsMapIgnoreEmpty.java | 640 -- .../EditionsMapIgnoreEmptyOrBuilder.java | 43 - .../cases/EditionsMapIgnoreUnspecified.java | 640 -- ...EditionsMapIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/EditionsMapKeyIgnoreDefault.java | 640 -- .../EditionsMapKeyIgnoreDefaultOrBuilder.java | 43 - .../cases/EditionsMapKeyIgnoreEmpty.java | 640 -- .../EditionsMapKeyIgnoreEmptyOrBuilder.java | 43 - .../EditionsMapKeyIgnoreUnspecified.java | 640 -- ...tionsMapKeyIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/EditionsMapValueIgnoreDefault.java | 640 -- ...ditionsMapValueIgnoreDefaultOrBuilder.java | 43 - .../cases/EditionsMapValueIgnoreEmpty.java | 640 -- .../EditionsMapValueIgnoreEmptyOrBuilder.java | 43 - .../EditionsMapValueIgnoreUnspecified.java | 640 -- ...onsMapValueIgnoreUnspecifiedOrBuilder.java | 43 - ...xplicitPresenceDelimitedIgnoreDefault.java | 1097 --- ...esenceDelimitedIgnoreDefaultOrBuilder.java | 26 - ...eExplicitPresenceDelimitedIgnoreEmpty.java | 1097 --- ...PresenceDelimitedIgnoreEmptyOrBuilder.java | 26 - ...citPresenceDelimitedIgnoreUnspecified.java | 1097 --- ...ceDelimitedIgnoreUnspecifiedOrBuilder.java | 26 - ...sMessageExplicitPresenceIgnoreDefault.java | 1097 --- ...xplicitPresenceIgnoreDefaultOrBuilder.java | 26 - ...onsMessageExplicitPresenceIgnoreEmpty.java | 1097 --- ...eExplicitPresenceIgnoreEmptyOrBuilder.java | 26 - ...sageExplicitPresenceIgnoreUnspecified.java | 1097 --- ...citPresenceIgnoreUnspecifiedOrBuilder.java | 26 - ...eLegacyRequiredDelimitedIgnoreDefault.java | 1104 --- ...quiredDelimitedIgnoreDefaultOrBuilder.java | 26 - ...ageLegacyRequiredDelimitedIgnoreEmpty.java | 1104 --- ...RequiredDelimitedIgnoreEmptyOrBuilder.java | 26 - ...acyRequiredDelimitedIgnoreUnspecified.java | 1104 --- ...edDelimitedIgnoreUnspecifiedOrBuilder.java | 26 - ...onsMessageLegacyRequiredIgnoreDefault.java | 1104 --- ...eLegacyRequiredIgnoreDefaultOrBuilder.java | 26 - ...tionsMessageLegacyRequiredIgnoreEmpty.java | 1104 --- ...ageLegacyRequiredIgnoreEmptyOrBuilder.java | 26 - ...essageLegacyRequiredIgnoreUnspecified.java | 1104 --- ...acyRequiredIgnoreUnspecifiedOrBuilder.java | 26 - .../cases/EditionsOneofIgnoreDefault.java | 531 -- .../EditionsOneofIgnoreDefaultOrBuilder.java | 24 - ...EditionsOneofIgnoreDefaultWithDefault.java | 531 -- ...neofIgnoreDefaultWithDefaultOrBuilder.java | 24 - .../cases/EditionsOneofIgnoreEmpty.java | 531 -- .../EditionsOneofIgnoreEmptyOrBuilder.java | 24 - .../EditionsOneofIgnoreEmptyWithDefault.java | 531 -- ...sOneofIgnoreEmptyWithDefaultOrBuilder.java | 24 - .../cases/EditionsOneofIgnoreUnspecified.java | 531 -- ...itionsOneofIgnoreUnspecifiedOrBuilder.java | 24 - ...ionsOneofIgnoreUnspecifiedWithDefault.java | 531 -- ...IgnoreUnspecifiedWithDefaultOrBuilder.java | 24 - ...EditionsRepeatedExpandedIgnoreDefault.java | 529 -- ...epeatedExpandedIgnoreDefaultOrBuilder.java | 28 - .../EditionsRepeatedExpandedIgnoreEmpty.java | 529 -- ...sRepeatedExpandedIgnoreEmptyOrBuilder.java | 28 - ...ionsRepeatedExpandedIgnoreUnspecified.java | 529 -- ...tedExpandedIgnoreUnspecifiedOrBuilder.java | 28 - ...ionsRepeatedExpandedItemIgnoreDefault.java | 529 -- ...tedExpandedItemIgnoreDefaultOrBuilder.java | 28 - ...itionsRepeatedExpandedItemIgnoreEmpty.java | 529 -- ...eatedExpandedItemIgnoreEmptyOrBuilder.java | 28 - ...RepeatedExpandedItemIgnoreUnspecified.java | 529 -- ...xpandedItemIgnoreUnspecifiedOrBuilder.java | 28 - .../cases/EditionsRepeatedIgnoreDefault.java | 540 -- ...ditionsRepeatedIgnoreDefaultOrBuilder.java | 28 - .../cases/EditionsRepeatedIgnoreEmpty.java | 540 -- .../EditionsRepeatedIgnoreEmptyOrBuilder.java | 28 - .../EditionsRepeatedIgnoreUnspecified.java | 540 -- ...onsRepeatedIgnoreUnspecifiedOrBuilder.java | 28 - .../EditionsRepeatedItemIgnoreDefault.java | 540 -- ...onsRepeatedItemIgnoreDefaultOrBuilder.java | 28 - .../EditionsRepeatedItemIgnoreEmpty.java | 540 -- ...tionsRepeatedItemIgnoreEmptyOrBuilder.java | 28 - ...EditionsRepeatedItemIgnoreUnspecified.java | 540 -- ...epeatedItemIgnoreUnspecifiedOrBuilder.java | 28 - ...nsScalarExplicitPresenceIgnoreDefault.java | 456 - ...xplicitPresenceIgnoreDefaultOrBuilder.java | 22 - ...licitPresenceIgnoreDefaultWithDefault.java | 457 - ...enceIgnoreDefaultWithDefaultOrBuilder.java | 22 - ...ionsScalarExplicitPresenceIgnoreEmpty.java | 456 - ...rExplicitPresenceIgnoreEmptyOrBuilder.java | 22 - ...xplicitPresenceIgnoreEmptyWithDefault.java | 457 - ...esenceIgnoreEmptyWithDefaultOrBuilder.java | 22 - ...alarExplicitPresenceIgnoreUnspecified.java | 456 - ...citPresenceIgnoreUnspecifiedOrBuilder.java | 22 - ...tPresenceIgnoreUnspecifiedWithDefault.java | 457 - ...IgnoreUnspecifiedWithDefaultOrBuilder.java | 22 - ...nsScalarImplicitPresenceIgnoreDefault.java | 431 - ...mplicitPresenceIgnoreDefaultOrBuilder.java | 17 - ...ionsScalarImplicitPresenceIgnoreEmpty.java | 431 - ...rImplicitPresenceIgnoreEmptyOrBuilder.java | 17 - ...alarImplicitPresenceIgnoreUnspecified.java | 431 - ...citPresenceIgnoreUnspecifiedOrBuilder.java | 17 - ...ionsScalarLegacyRequiredIgnoreDefault.java | 463 - ...rLegacyRequiredIgnoreDefaultOrBuilder.java | 22 - ...egacyRequiredIgnoreDefaultWithDefault.java | 464 - ...iredIgnoreDefaultWithDefaultOrBuilder.java | 22 - ...itionsScalarLegacyRequiredIgnoreEmpty.java | 463 - ...larLegacyRequiredIgnoreEmptyOrBuilder.java | 22 - ...rLegacyRequiredIgnoreEmptyWithDefault.java | 464 - ...quiredIgnoreEmptyWithDefaultOrBuilder.java | 22 - ...ScalarLegacyRequiredIgnoreUnspecified.java | 463 - ...acyRequiredIgnoreUnspecifiedOrBuilder.java | 22 - ...yRequiredIgnoreUnspecifiedWithDefault.java | 464 - ...IgnoreUnspecifiedWithDefaultOrBuilder.java | 22 - .../buf/validate/conformance/cases/Embed.java | 432 - .../conformance/cases/EmbedOrBuilder.java | 17 - .../conformance/cases/EnumAliasConst.java | 459 - .../cases/EnumAliasConstOrBuilder.java | 22 - .../conformance/cases/EnumAliasDefined.java | 459 - .../cases/EnumAliasDefinedOrBuilder.java | 22 - .../conformance/cases/EnumAliasIn.java | 459 - .../cases/EnumAliasInOrBuilder.java | 22 - .../conformance/cases/EnumAliasNotIn.java | 459 - .../cases/EnumAliasNotInOrBuilder.java | 22 - .../validate/conformance/cases/EnumConst.java | 459 - .../conformance/cases/EnumConstOrBuilder.java | 22 - .../conformance/cases/EnumDefined.java | 459 - .../cases/EnumDefinedOrBuilder.java | 22 - .../conformance/cases/EnumExample.java | 459 - .../cases/EnumExampleOrBuilder.java | 22 - .../conformance/cases/EnumExternal.java | 459 - .../conformance/cases/EnumExternal2.java | 459 - .../cases/EnumExternal2OrBuilder.java | 22 - .../cases/EnumExternalOrBuilder.java | 22 - .../validate/conformance/cases/EnumIn.java | 459 - .../conformance/cases/EnumInOrBuilder.java | 22 - .../conformance/cases/EnumInsideOneof.java | 767 -- .../cases/EnumInsideOneofOrBuilder.java | 47 - .../validate/conformance/cases/EnumNone.java | 459 - .../conformance/cases/EnumNoneOrBuilder.java | 22 - .../validate/conformance/cases/EnumNotIn.java | 459 - .../conformance/cases/EnumNotInOrBuilder.java | 22 - .../conformance/cases/EnumsProto.java | 348 - .../cases/FilenameWithDashProto.java | 57 - .../conformance/cases/Fixed32Const.java | 431 - .../cases/Fixed32ConstOrBuilder.java | 17 - .../conformance/cases/Fixed32ExGTELTE.java | 431 - .../cases/Fixed32ExGTELTEOrBuilder.java | 17 - .../conformance/cases/Fixed32ExLTGT.java | 431 - .../cases/Fixed32ExLTGTOrBuilder.java | 17 - .../conformance/cases/Fixed32Example.java | 431 - .../cases/Fixed32ExampleOrBuilder.java | 17 - .../validate/conformance/cases/Fixed32GT.java | 431 - .../conformance/cases/Fixed32GTE.java | 431 - .../conformance/cases/Fixed32GTELTE.java | 431 - .../cases/Fixed32GTELTEOrBuilder.java | 17 - .../cases/Fixed32GTEOrBuilder.java | 17 - .../conformance/cases/Fixed32GTLT.java | 431 - .../cases/Fixed32GTLTOrBuilder.java | 17 - .../conformance/cases/Fixed32GTOrBuilder.java | 17 - .../conformance/cases/Fixed32Ignore.java | 431 - .../cases/Fixed32IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/Fixed32In.java | 431 - .../conformance/cases/Fixed32InOrBuilder.java | 17 - .../cases/Fixed32IncorrectType.java | 431 - .../cases/Fixed32IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/Fixed32LT.java | 431 - .../conformance/cases/Fixed32LTE.java | 431 - .../cases/Fixed32LTEOrBuilder.java | 17 - .../conformance/cases/Fixed32LTOrBuilder.java | 17 - .../conformance/cases/Fixed32None.java | 431 - .../cases/Fixed32NoneOrBuilder.java | 17 - .../conformance/cases/Fixed32NotIn.java | 431 - .../cases/Fixed32NotInOrBuilder.java | 17 - .../conformance/cases/Fixed64Const.java | 432 - .../cases/Fixed64ConstOrBuilder.java | 17 - .../conformance/cases/Fixed64ExGTELTE.java | 432 - .../cases/Fixed64ExGTELTEOrBuilder.java | 17 - .../conformance/cases/Fixed64ExLTGT.java | 432 - .../cases/Fixed64ExLTGTOrBuilder.java | 17 - .../conformance/cases/Fixed64Example.java | 432 - .../cases/Fixed64ExampleOrBuilder.java | 17 - .../validate/conformance/cases/Fixed64GT.java | 432 - .../conformance/cases/Fixed64GTE.java | 432 - .../conformance/cases/Fixed64GTELTE.java | 432 - .../cases/Fixed64GTELTEOrBuilder.java | 17 - .../cases/Fixed64GTEOrBuilder.java | 17 - .../conformance/cases/Fixed64GTLT.java | 432 - .../cases/Fixed64GTLTOrBuilder.java | 17 - .../conformance/cases/Fixed64GTOrBuilder.java | 17 - .../conformance/cases/Fixed64Ignore.java | 432 - .../cases/Fixed64IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/Fixed64In.java | 432 - .../conformance/cases/Fixed64InOrBuilder.java | 17 - .../cases/Fixed64IncorrectType.java | 432 - .../cases/Fixed64IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/Fixed64LT.java | 432 - .../conformance/cases/Fixed64LTE.java | 432 - .../cases/Fixed64LTEOrBuilder.java | 17 - .../conformance/cases/Fixed64LTOrBuilder.java | 17 - .../conformance/cases/Fixed64None.java | 432 - .../cases/Fixed64NoneOrBuilder.java | 17 - .../conformance/cases/Fixed64NotIn.java | 432 - .../cases/Fixed64NotInOrBuilder.java | 17 - .../conformance/cases/FloatConst.java | 433 - .../cases/FloatConstOrBuilder.java | 17 - .../conformance/cases/FloatExGTELTE.java | 433 - .../cases/FloatExGTELTEOrBuilder.java | 17 - .../conformance/cases/FloatExLTGT.java | 433 - .../cases/FloatExLTGTOrBuilder.java | 17 - .../conformance/cases/FloatExample.java | 433 - .../cases/FloatExampleOrBuilder.java | 17 - .../conformance/cases/FloatFinite.java | 433 - .../cases/FloatFiniteOrBuilder.java | 17 - .../validate/conformance/cases/FloatGT.java | 433 - .../validate/conformance/cases/FloatGTE.java | 433 - .../conformance/cases/FloatGTELTE.java | 433 - .../cases/FloatGTELTEOrBuilder.java | 17 - .../conformance/cases/FloatGTEOrBuilder.java | 17 - .../validate/conformance/cases/FloatGTLT.java | 433 - .../conformance/cases/FloatGTLTOrBuilder.java | 17 - .../conformance/cases/FloatGTOrBuilder.java | 17 - .../conformance/cases/FloatIgnore.java | 433 - .../cases/FloatIgnoreOrBuilder.java | 17 - .../validate/conformance/cases/FloatIn.java | 433 - .../conformance/cases/FloatInOrBuilder.java | 17 - .../conformance/cases/FloatIncorrectType.java | 433 - .../cases/FloatIncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/FloatLT.java | 433 - .../validate/conformance/cases/FloatLTE.java | 433 - .../conformance/cases/FloatLTEOrBuilder.java | 17 - .../conformance/cases/FloatLTOrBuilder.java | 17 - .../validate/conformance/cases/FloatNone.java | 433 - .../conformance/cases/FloatNoneOrBuilder.java | 17 - .../conformance/cases/FloatNotFinite.java | 433 - .../cases/FloatNotFiniteOrBuilder.java | 17 - .../conformance/cases/FloatNotIn.java | 433 - .../cases/FloatNotInOrBuilder.java | 17 - .../cases/IgnoreEmptyEditionsMap.java | 640 -- .../IgnoreEmptyEditionsMapOrBuilder.java | 43 - ...eEmptyEditionsMessageExplicitPresence.java | 1097 --- ...tionsMessageExplicitPresenceDelimited.java | 1097 --- ...ageExplicitPresenceDelimitedOrBuilder.java | 26 - ...tionsMessageExplicitPresenceOrBuilder.java | 26 - ...oreEmptyEditionsMessageLegacyRequired.java | 1104 --- ...ditionsMessageLegacyRequiredDelimited.java | 1104 --- ...ssageLegacyRequiredDelimitedOrBuilder.java | 26 - ...ditionsMessageLegacyRequiredOrBuilder.java | 26 - .../cases/IgnoreEmptyEditionsOneof.java | 531 -- .../IgnoreEmptyEditionsOneofOrBuilder.java | 24 - .../cases/IgnoreEmptyEditionsRepeated.java | 540 -- .../IgnoreEmptyEditionsRepeatedExpanded.java | 529 -- ...mptyEditionsRepeatedExpandedOrBuilder.java | 28 - .../IgnoreEmptyEditionsRepeatedOrBuilder.java | 28 - ...reEmptyEditionsScalarExplicitPresence.java | 456 - ...itionsScalarExplicitPresenceOrBuilder.java | 22 - ...ionsScalarExplicitPresenceWithDefault.java | 457 - ...rExplicitPresenceWithDefaultOrBuilder.java | 22 - ...reEmptyEditionsScalarImplicitPresence.java | 431 - ...itionsScalarImplicitPresenceOrBuilder.java | 17 - ...noreEmptyEditionsScalarLegacyRequired.java | 463 - ...EditionsScalarLegacyRequiredOrBuilder.java | 22 - ...itionsScalarLegacyRequiredWithDefault.java | 464 - ...larLegacyRequiredWithDefaultOrBuilder.java | 22 - .../cases/IgnoreEmptyMapPairs.java | 640 -- .../cases/IgnoreEmptyMapPairsOrBuilder.java | 43 - .../cases/IgnoreEmptyProto2Map.java | 640 -- .../cases/IgnoreEmptyProto2MapOrBuilder.java | 43 - .../cases/IgnoreEmptyProto2Message.java | 1100 --- .../IgnoreEmptyProto2MessageOrBuilder.java | 26 - .../cases/IgnoreEmptyProto2Oneof.java | 531 -- .../IgnoreEmptyProto2OneofOrBuilder.java | 24 - .../cases/IgnoreEmptyProto2Proto.java | 179 - .../cases/IgnoreEmptyProto2Repeated.java | 529 -- .../IgnoreEmptyProto2RepeatedOrBuilder.java | 28 - .../IgnoreEmptyProto2ScalarOptional.java | 456 - ...oreEmptyProto2ScalarOptionalOrBuilder.java | 22 - ...eEmptyProto2ScalarOptionalWithDefault.java | 457 - ...to2ScalarOptionalWithDefaultOrBuilder.java | 22 - .../IgnoreEmptyProto2ScalarRequired.java | 463 - ...oreEmptyProto2ScalarRequiredOrBuilder.java | 22 - .../cases/IgnoreEmptyProto3Map.java | 640 -- .../cases/IgnoreEmptyProto3MapOrBuilder.java | 43 - .../cases/IgnoreEmptyProto3Message.java | 1068 --- .../IgnoreEmptyProto3MessageOrBuilder.java | 26 - .../cases/IgnoreEmptyProto3Oneof.java | 531 -- .../IgnoreEmptyProto3OneofOrBuilder.java | 24 - .../IgnoreEmptyProto3OptionalScalar.java | 456 - ...oreEmptyProto3OptionalScalarOrBuilder.java | 22 - .../cases/IgnoreEmptyProto3Proto.java | 206 - .../cases/IgnoreEmptyProto3Repeated.java | 540 -- .../IgnoreEmptyProto3RepeatedOrBuilder.java | 28 - .../cases/IgnoreEmptyProto3Scalar.java | 431 - .../IgnoreEmptyProto3ScalarOrBuilder.java | 17 - .../cases/IgnoreEmptyProtoEditionsProto.java | 306 - .../cases/IgnoreEmptyRepeatedItems.java | 540 -- .../IgnoreEmptyRepeatedItemsOrBuilder.java | 28 - .../conformance/cases/IgnoreProto2Proto.java | 774 -- .../conformance/cases/IgnoreProto3Proto.java | 659 -- .../cases/IgnoreProtoEditionsProto.java | 1074 --- .../conformance/cases/Int32Const.java | 431 - .../cases/Int32ConstOrBuilder.java | 17 - .../conformance/cases/Int32ExGTELTE.java | 431 - .../cases/Int32ExGTELTEOrBuilder.java | 17 - .../conformance/cases/Int32ExLTGT.java | 431 - .../cases/Int32ExLTGTOrBuilder.java | 17 - .../conformance/cases/Int32Example.java | 431 - .../cases/Int32ExampleOrBuilder.java | 17 - .../validate/conformance/cases/Int32GT.java | 431 - .../validate/conformance/cases/Int32GTE.java | 431 - .../conformance/cases/Int32GTELTE.java | 431 - .../cases/Int32GTELTEOrBuilder.java | 17 - .../conformance/cases/Int32GTEOrBuilder.java | 17 - .../validate/conformance/cases/Int32GTLT.java | 431 - .../conformance/cases/Int32GTLTOrBuilder.java | 17 - .../conformance/cases/Int32GTOrBuilder.java | 17 - .../conformance/cases/Int32Ignore.java | 431 - .../cases/Int32IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/Int32In.java | 431 - .../conformance/cases/Int32InOrBuilder.java | 17 - .../conformance/cases/Int32IncorrectType.java | 431 - .../cases/Int32IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/Int32LT.java | 431 - .../validate/conformance/cases/Int32LTE.java | 431 - .../conformance/cases/Int32LTEOrBuilder.java | 17 - .../conformance/cases/Int32LTOrBuilder.java | 17 - .../validate/conformance/cases/Int32None.java | 431 - .../conformance/cases/Int32NoneOrBuilder.java | 17 - .../conformance/cases/Int32NotIn.java | 431 - .../cases/Int32NotInOrBuilder.java | 17 - .../cases/Int64BigConstraints.java | 1185 --- .../cases/Int64BigConstraintsOrBuilder.java | 87 - .../conformance/cases/Int64Const.java | 432 - .../cases/Int64ConstOrBuilder.java | 17 - .../conformance/cases/Int64ExGTELTE.java | 432 - .../cases/Int64ExGTELTEOrBuilder.java | 17 - .../conformance/cases/Int64ExLTGT.java | 432 - .../cases/Int64ExLTGTOrBuilder.java | 17 - .../conformance/cases/Int64Example.java | 432 - .../cases/Int64ExampleOrBuilder.java | 17 - .../validate/conformance/cases/Int64GT.java | 432 - .../validate/conformance/cases/Int64GTE.java | 432 - .../conformance/cases/Int64GTELTE.java | 432 - .../cases/Int64GTELTEOrBuilder.java | 17 - .../conformance/cases/Int64GTEOrBuilder.java | 17 - .../validate/conformance/cases/Int64GTLT.java | 432 - .../conformance/cases/Int64GTLTOrBuilder.java | 17 - .../conformance/cases/Int64GTOrBuilder.java | 17 - .../conformance/cases/Int64Ignore.java | 432 - .../cases/Int64IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/Int64In.java | 432 - .../conformance/cases/Int64InOrBuilder.java | 17 - .../conformance/cases/Int64IncorrectType.java | 432 - .../cases/Int64IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/Int64LT.java | 432 - .../validate/conformance/cases/Int64LTE.java | 432 - .../conformance/cases/Int64LTEOptional.java | 457 - .../cases/Int64LTEOptionalOrBuilder.java | 22 - .../conformance/cases/Int64LTEOrBuilder.java | 17 - .../conformance/cases/Int64LTOrBuilder.java | 17 - .../validate/conformance/cases/Int64None.java | 432 - .../conformance/cases/Int64NoneOrBuilder.java | 17 - .../conformance/cases/Int64NotIn.java | 432 - .../cases/Int64NotInOrBuilder.java | 17 - .../conformance/cases/KitchenSinkMessage.java | 558 -- .../cases/KitchenSinkMessageOrBuilder.java | 26 - .../conformance/cases/KitchenSinkProto.java | 139 - .../conformance/cases/MapEnumDefined.java | 785 -- .../cases/MapEnumDefinedOrBuilder.java | 67 - .../validate/conformance/cases/MapExact.java | 644 -- .../conformance/cases/MapExactIgnore.java | 644 -- .../cases/MapExactIgnoreOrBuilder.java | 45 - .../conformance/cases/MapExactOrBuilder.java | 45 - .../cases/MapExternalEnumDefined.java | 785 -- .../MapExternalEnumDefinedOrBuilder.java | 67 - .../validate/conformance/cases/MapKeys.java | 644 -- .../conformance/cases/MapKeysOrBuilder.java | 45 - .../conformance/cases/MapKeysPattern.java | 644 -- .../cases/MapKeysPatternOrBuilder.java | 45 - .../validate/conformance/cases/MapMax.java | 640 -- .../conformance/cases/MapMaxOrBuilder.java | 43 - .../validate/conformance/cases/MapMin.java | 640 -- .../validate/conformance/cases/MapMinMax.java | 640 -- .../conformance/cases/MapMinMaxOrBuilder.java | 43 - .../conformance/cases/MapMinOrBuilder.java | 43 - .../validate/conformance/cases/MapNone.java | 640 -- .../conformance/cases/MapNoneOrBuilder.java | 43 - .../conformance/cases/MapRecursive.java | 1181 --- .../cases/MapRecursiveOrBuilder.java | 45 - .../validate/conformance/cases/MapValues.java | 644 -- .../conformance/cases/MapValuesOrBuilder.java | 45 - .../conformance/cases/MapValuesPattern.java | 644 -- .../cases/MapValuesPatternOrBuilder.java | 45 - .../validate/conformance/cases/MapsProto.java | 415 - .../validate/conformance/cases/Message.java | 558 -- .../cases/MessageCrossPackage.java | 558 -- .../cases/MessageCrossPackageOrBuilder.java | 26 - .../conformance/cases/MessageDisabled.java | 432 - .../cases/MessageDisabledOrBuilder.java | 17 - .../conformance/cases/MessageNone.java | 913 -- .../cases/MessageNoneOrBuilder.java | 26 - .../conformance/cases/MessageOrBuilder.java | 26 - .../conformance/cases/MessageRequired.java | 558 -- .../cases/MessageRequiredButOptional.java | 558 -- .../MessageRequiredButOptionalOrBuilder.java | 26 - .../cases/MessageRequiredOneof.java | 648 -- .../cases/MessageRequiredOneofOrBuilder.java | 28 - .../cases/MessageRequiredOrBuilder.java | 26 - .../conformance/cases/MessageSkip.java | 558 -- .../cases/MessageSkipOrBuilder.java | 26 - .../cases/MessageWith3dInside.java | 358 - .../cases/MessageWith3dInsideOrBuilder.java | 11 - .../conformance/cases/MessagesProto.java | 209 - .../conformance/cases/MultipleMaps.java | 1138 --- .../cases/MultipleMapsOrBuilder.java | 109 - .../conformance/cases/NumbersProto.java | 2335 ----- .../buf/validate/conformance/cases/Oneof.java | 912 -- .../validate/conformance/cases/OneofNone.java | 704 -- .../conformance/cases/OneofNoneOrBuilder.java | 41 - .../conformance/cases/OneofOrBuilder.java | 56 - .../conformance/cases/OneofRequired.java | 886 -- .../cases/OneofRequiredOrBuilder.java | 63 - .../cases/OneofRequiredWithRequiredField.java | 786 -- ...eofRequiredWithRequiredFieldOrBuilder.java | 47 - .../conformance/cases/OneofsProto.java | 129 - .../PredefinedAndCustomRuleEdition2023.java | 1110 --- ...inedAndCustomRuleEdition2023OrBuilder.java | 37 - .../cases/PredefinedAndCustomRuleProto2.java | 1110 --- ...redefinedAndCustomRuleProto2OrBuilder.java | 37 - .../cases/PredefinedAndCustomRuleProto3.java | 1058 --- ...redefinedAndCustomRuleProto3OrBuilder.java | 32 - .../cases/PredefinedBoolRuleEdition2023.java | 457 - ...redefinedBoolRuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedBoolRuleProto2.java | 457 - .../PredefinedBoolRuleProto2OrBuilder.java | 22 - .../cases/PredefinedBoolRuleProto3.java | 432 - .../PredefinedBoolRuleProto3OrBuilder.java | 17 - .../cases/PredefinedBytesRuleEdition2023.java | 457 - ...edefinedBytesRuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedBytesRuleProto2.java | 457 - .../PredefinedBytesRuleProto2OrBuilder.java | 22 - .../cases/PredefinedBytesRuleProto3.java | 432 - .../PredefinedBytesRuleProto3OrBuilder.java | 17 - .../PredefinedDoubleRuleEdition2023.java | 458 - ...definedDoubleRuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedDoubleRuleProto2.java | 458 - .../PredefinedDoubleRuleProto2OrBuilder.java | 22 - .../cases/PredefinedDoubleRuleProto3.java | 433 - .../PredefinedDoubleRuleProto3OrBuilder.java | 17 - .../PredefinedDurationRuleEdition2023.java | 558 -- ...finedDurationRuleEdition2023OrBuilder.java | 26 - .../cases/PredefinedDurationRuleProto2.java | 558 -- ...PredefinedDurationRuleProto2OrBuilder.java | 26 - .../cases/PredefinedDurationRuleProto3.java | 558 -- ...PredefinedDurationRuleProto3OrBuilder.java | 26 - .../cases/PredefinedEnumRuleEdition2023.java | 599 -- ...redefinedEnumRuleEdition2023OrBuilder.java | 27 - .../cases/PredefinedEnumRuleProto2.java | 569 -- .../PredefinedEnumRuleProto2OrBuilder.java | 22 - .../cases/PredefinedEnumRuleProto3.java | 576 -- .../PredefinedEnumRuleProto3OrBuilder.java | 22 - .../PredefinedFixed32RuleEdition2023.java | 456 - ...efinedFixed32RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedFixed32RuleProto2.java | 456 - .../PredefinedFixed32RuleProto2OrBuilder.java | 22 - .../cases/PredefinedFixed32RuleProto3.java | 431 - .../PredefinedFixed32RuleProto3OrBuilder.java | 17 - .../PredefinedFixed64RuleEdition2023.java | 457 - ...efinedFixed64RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedFixed64RuleProto2.java | 457 - .../PredefinedFixed64RuleProto2OrBuilder.java | 22 - .../cases/PredefinedFixed64RuleProto3.java | 432 - .../PredefinedFixed64RuleProto3OrBuilder.java | 17 - .../cases/PredefinedFloatRuleEdition2023.java | 458 - ...edefinedFloatRuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedFloatRuleProto2.java | 458 - .../PredefinedFloatRuleProto2OrBuilder.java | 22 - .../cases/PredefinedFloatRuleProto3.java | 433 - .../PredefinedFloatRuleProto3OrBuilder.java | 17 - .../cases/PredefinedInt32RuleEdition2023.java | 456 - ...edefinedInt32RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedInt32RuleProto2.java | 456 - .../PredefinedInt32RuleProto2OrBuilder.java | 22 - .../cases/PredefinedInt32RuleProto3.java | 431 - .../PredefinedInt32RuleProto3OrBuilder.java | 17 - .../cases/PredefinedInt64RuleEdition2023.java | 457 - ...edefinedInt64RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedInt64RuleProto2.java | 457 - .../PredefinedInt64RuleProto2OrBuilder.java | 22 - .../cases/PredefinedInt64RuleProto3.java | 432 - .../PredefinedInt64RuleProto3OrBuilder.java | 17 - .../cases/PredefinedMapRuleEdition2023.java | 640 -- ...PredefinedMapRuleEdition2023OrBuilder.java | 43 - .../cases/PredefinedMapRuleProto3.java | 640 -- .../PredefinedMapRuleProto3OrBuilder.java | 43 - .../PredefinedRepeatedRuleEdition2023.java | 540 -- ...finedRepeatedRuleEdition2023OrBuilder.java | 28 - .../cases/PredefinedRepeatedRuleProto2.java | 529 -- ...PredefinedRepeatedRuleProto2OrBuilder.java | 28 - .../cases/PredefinedRepeatedRuleProto3.java | 540 -- ...PredefinedRepeatedRuleProto3OrBuilder.java | 28 - .../cases/PredefinedRulesProto2Proto.java | 705 -- .../cases/PredefinedRulesProto3Proto.java | 431 - ...dRulesProto3UnusedImportBugWorkaround.java | 753 -- ...to3UnusedImportBugWorkaroundOrBuilder.java | 41 - .../PredefinedRulesProtoEditionsProto.java | 764 -- .../PredefinedSFixed32RuleEdition2023.java | 456 - ...finedSFixed32RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedSFixed32RuleProto2.java | 456 - ...PredefinedSFixed32RuleProto2OrBuilder.java | 22 - .../cases/PredefinedSFixed32RuleProto3.java | 431 - ...PredefinedSFixed32RuleProto3OrBuilder.java | 17 - .../PredefinedSFixed64RuleEdition2023.java | 457 - ...finedSFixed64RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedSFixed64RuleProto2.java | 457 - ...PredefinedSFixed64RuleProto2OrBuilder.java | 22 - .../cases/PredefinedSFixed64RuleProto3.java | 432 - ...PredefinedSFixed64RuleProto3OrBuilder.java | 17 - .../PredefinedSInt32RuleEdition2023.java | 456 - ...definedSInt32RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedSInt32RuleProto2.java | 456 - .../PredefinedSInt32RuleProto2OrBuilder.java | 22 - .../cases/PredefinedSInt32RuleProto3.java | 431 - .../PredefinedSInt32RuleProto3OrBuilder.java | 17 - .../PredefinedSInt64RuleEdition2023.java | 457 - ...definedSInt64RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedSInt64RuleProto2.java | 457 - .../PredefinedSInt64RuleProto2OrBuilder.java | 22 - .../cases/PredefinedSInt64RuleProto3.java | 432 - .../PredefinedSInt64RuleProto3OrBuilder.java | 17 - .../PredefinedStringRuleEdition2023.java | 525 -- ...definedStringRuleEdition2023OrBuilder.java | 28 - .../cases/PredefinedStringRuleProto2.java | 528 -- .../PredefinedStringRuleProto2OrBuilder.java | 28 - .../cases/PredefinedStringRuleProto3.java | 501 -- .../PredefinedStringRuleProto3OrBuilder.java | 23 - .../PredefinedTimestampRuleEdition2023.java | 558 -- ...inedTimestampRuleEdition2023OrBuilder.java | 26 - .../cases/PredefinedTimestampRuleProto2.java | 558 -- ...redefinedTimestampRuleProto2OrBuilder.java | 26 - .../cases/PredefinedTimestampRuleProto3.java | 558 -- ...redefinedTimestampRuleProto3OrBuilder.java | 26 - .../PredefinedUInt32RuleEdition2023.java | 456 - ...definedUInt32RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedUInt32RuleProto2.java | 456 - .../PredefinedUInt32RuleProto2OrBuilder.java | 22 - .../cases/PredefinedUInt32RuleProto3.java | 431 - .../PredefinedUInt32RuleProto3OrBuilder.java | 17 - .../PredefinedUInt64RuleEdition2023.java | 457 - ...definedUInt64RuleEdition2023OrBuilder.java | 22 - .../cases/PredefinedUInt64RuleProto2.java | 457 - .../PredefinedUInt64RuleProto2OrBuilder.java | 22 - .../cases/PredefinedUInt64RuleProto3.java | 432 - .../PredefinedUInt64RuleProto3OrBuilder.java | 17 - .../cases/Proto2MapIgnoreDefault.java | 640 -- .../Proto2MapIgnoreDefaultOrBuilder.java | 43 - .../cases/Proto2MapIgnoreEmpty.java | 640 -- .../cases/Proto2MapIgnoreEmptyOrBuilder.java | 43 - .../cases/Proto2MapIgnoreUnspecified.java | 640 -- .../Proto2MapIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/Proto2MapKeyIgnoreDefault.java | 640 -- .../Proto2MapKeyIgnoreDefaultOrBuilder.java | 43 - .../cases/Proto2MapKeyIgnoreEmpty.java | 640 -- .../Proto2MapKeyIgnoreEmptyOrBuilder.java | 43 - .../cases/Proto2MapKeyIgnoreUnspecified.java | 640 -- ...roto2MapKeyIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/Proto2MapValueIgnoreDefault.java | 640 -- .../Proto2MapValueIgnoreDefaultOrBuilder.java | 43 - .../cases/Proto2MapValueIgnoreEmpty.java | 640 -- .../Proto2MapValueIgnoreEmptyOrBuilder.java | 43 - .../Proto2MapValueIgnoreUnspecified.java | 640 -- ...to2MapValueIgnoreUnspecifiedOrBuilder.java | 43 - .../Proto2MessageOptionalIgnoreDefault.java | 1100 --- ...MessageOptionalIgnoreDefaultOrBuilder.java | 26 - .../Proto2MessageOptionalIgnoreEmpty.java | 1100 --- ...o2MessageOptionalIgnoreEmptyOrBuilder.java | 26 - ...roto2MessageOptionalIgnoreUnspecified.java | 1100 --- ...ageOptionalIgnoreUnspecifiedOrBuilder.java | 26 - .../Proto2MessageRequiredIgnoreDefault.java | 1107 --- ...MessageRequiredIgnoreDefaultOrBuilder.java | 26 - .../Proto2MessageRequiredIgnoreEmpty.java | 1107 --- ...o2MessageRequiredIgnoreEmptyOrBuilder.java | 26 - ...roto2MessageRequiredIgnoreUnspecified.java | 1107 --- ...ageRequiredIgnoreUnspecifiedOrBuilder.java | 26 - .../cases/Proto2OneofIgnoreDefault.java | 531 -- .../Proto2OneofIgnoreDefaultOrBuilder.java | 24 - .../Proto2OneofIgnoreDefaultWithDefault.java | 531 -- ...neofIgnoreDefaultWithDefaultOrBuilder.java | 24 - .../cases/Proto2OneofIgnoreEmpty.java | 531 -- .../Proto2OneofIgnoreEmptyOrBuilder.java | 24 - .../Proto2OneofIgnoreEmptyWithDefault.java | 531 -- ...2OneofIgnoreEmptyWithDefaultOrBuilder.java | 24 - .../cases/Proto2OneofIgnoreUnspecified.java | 531 -- ...Proto2OneofIgnoreUnspecifiedOrBuilder.java | 24 - ...oto2OneofIgnoreUnspecifiedWithDefault.java | 531 -- ...IgnoreUnspecifiedWithDefaultOrBuilder.java | 24 - .../cases/Proto2RepeatedIgnoreDefault.java | 529 -- .../Proto2RepeatedIgnoreDefaultOrBuilder.java | 28 - .../cases/Proto2RepeatedIgnoreEmpty.java | 529 -- .../Proto2RepeatedIgnoreEmptyOrBuilder.java | 28 - .../Proto2RepeatedIgnoreUnspecified.java | 529 -- ...to2RepeatedIgnoreUnspecifiedOrBuilder.java | 28 - .../Proto2RepeatedItemIgnoreDefault.java | 529 -- ...to2RepeatedItemIgnoreDefaultOrBuilder.java | 28 - .../cases/Proto2RepeatedItemIgnoreEmpty.java | 529 -- ...roto2RepeatedItemIgnoreEmptyOrBuilder.java | 28 - .../Proto2RepeatedItemIgnoreUnspecified.java | 529 -- ...epeatedItemIgnoreUnspecifiedOrBuilder.java | 28 - .../Proto2ScalarOptionalIgnoreDefault.java | 456 - ...2ScalarOptionalIgnoreDefaultOrBuilder.java | 22 - ...calarOptionalIgnoreDefaultWithDefault.java | 457 - ...onalIgnoreDefaultWithDefaultOrBuilder.java | 22 - .../Proto2ScalarOptionalIgnoreEmpty.java | 456 - ...to2ScalarOptionalIgnoreEmptyOrBuilder.java | 22 - ...2ScalarOptionalIgnoreEmptyWithDefault.java | 457 - ...tionalIgnoreEmptyWithDefaultOrBuilder.java | 22 - ...Proto2ScalarOptionalIgnoreUnspecified.java | 456 - ...larOptionalIgnoreUnspecifiedOrBuilder.java | 22 - ...rOptionalIgnoreUnspecifiedWithDefault.java | 457 - ...IgnoreUnspecifiedWithDefaultOrBuilder.java | 22 - .../Proto2ScalarRequiredIgnoreDefault.java | 463 - ...2ScalarRequiredIgnoreDefaultOrBuilder.java | 22 - ...calarRequiredIgnoreDefaultWithDefault.java | 464 - ...iredIgnoreDefaultWithDefaultOrBuilder.java | 22 - .../Proto2ScalarRequiredIgnoreEmpty.java | 463 - ...to2ScalarRequiredIgnoreEmptyOrBuilder.java | 22 - ...2ScalarRequiredIgnoreEmptyWithDefault.java | 464 - ...quiredIgnoreEmptyWithDefaultOrBuilder.java | 22 - ...Proto2ScalarRequiredIgnoreUnspecified.java | 463 - ...larRequiredIgnoreUnspecifiedOrBuilder.java | 22 - ...rRequiredIgnoreUnspecifiedWithDefault.java | 464 - ...IgnoreUnspecifiedWithDefaultOrBuilder.java | 22 - .../cases/Proto3MapIgnoreDefault.java | 640 -- .../Proto3MapIgnoreDefaultOrBuilder.java | 43 - .../cases/Proto3MapIgnoreEmpty.java | 640 -- .../cases/Proto3MapIgnoreEmptyOrBuilder.java | 43 - .../cases/Proto3MapIgnoreUnspecified.java | 640 -- .../Proto3MapIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/Proto3MapKeyIgnoreDefault.java | 640 -- .../Proto3MapKeyIgnoreDefaultOrBuilder.java | 43 - .../cases/Proto3MapKeyIgnoreEmpty.java | 640 -- .../Proto3MapKeyIgnoreEmptyOrBuilder.java | 43 - .../cases/Proto3MapKeyIgnoreUnspecified.java | 640 -- ...roto3MapKeyIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/Proto3MapValueIgnoreDefault.java | 640 -- .../Proto3MapValueIgnoreDefaultOrBuilder.java | 43 - .../cases/Proto3MapValueIgnoreEmpty.java | 640 -- .../Proto3MapValueIgnoreEmptyOrBuilder.java | 43 - .../Proto3MapValueIgnoreUnspecified.java | 640 -- ...to3MapValueIgnoreUnspecifiedOrBuilder.java | 43 - .../cases/Proto3MessageIgnoreDefault.java | 1097 --- .../Proto3MessageIgnoreDefaultOrBuilder.java | 26 - .../cases/Proto3MessageIgnoreEmpty.java | 1097 --- .../Proto3MessageIgnoreEmptyOrBuilder.java | 26 - .../cases/Proto3MessageIgnoreUnspecified.java | 1097 --- ...oto3MessageIgnoreUnspecifiedOrBuilder.java | 26 - .../Proto3MessageOptionalIgnoreDefault.java | 1097 --- ...MessageOptionalIgnoreDefaultOrBuilder.java | 26 - .../Proto3MessageOptionalIgnoreEmpty.java | 1097 --- ...o3MessageOptionalIgnoreEmptyOrBuilder.java | 26 - ...roto3MessageOptionalIgnoreUnspecified.java | 1097 --- ...ageOptionalIgnoreUnspecifiedOrBuilder.java | 26 - .../cases/Proto3OneofIgnoreDefault.java | 531 -- .../Proto3OneofIgnoreDefaultOrBuilder.java | 24 - .../cases/Proto3OneofIgnoreEmpty.java | 531 -- .../Proto3OneofIgnoreEmptyOrBuilder.java | 24 - .../cases/Proto3OneofIgnoreUnspecified.java | 531 -- ...Proto3OneofIgnoreUnspecifiedOrBuilder.java | 24 - .../cases/Proto3RepeatedIgnoreDefault.java | 540 -- .../Proto3RepeatedIgnoreDefaultOrBuilder.java | 28 - .../cases/Proto3RepeatedIgnoreEmpty.java | 540 -- .../Proto3RepeatedIgnoreEmptyOrBuilder.java | 28 - .../Proto3RepeatedIgnoreUnspecified.java | 540 -- ...to3RepeatedIgnoreUnspecifiedOrBuilder.java | 28 - .../Proto3RepeatedItemIgnoreDefault.java | 540 -- ...to3RepeatedItemIgnoreDefaultOrBuilder.java | 28 - .../cases/Proto3RepeatedItemIgnoreEmpty.java | 540 -- ...roto3RepeatedItemIgnoreEmptyOrBuilder.java | 28 - .../Proto3RepeatedItemIgnoreUnspecified.java | 540 -- ...epeatedItemIgnoreUnspecifiedOrBuilder.java | 28 - .../cases/Proto3ScalarIgnoreDefault.java | 431 - .../Proto3ScalarIgnoreDefaultOrBuilder.java | 17 - .../cases/Proto3ScalarIgnoreEmpty.java | 431 - .../Proto3ScalarIgnoreEmptyOrBuilder.java | 17 - .../cases/Proto3ScalarIgnoreUnspecified.java | 431 - ...roto3ScalarIgnoreUnspecifiedOrBuilder.java | 17 - .../Proto3ScalarOptionalIgnoreDefault.java | 456 - ...3ScalarOptionalIgnoreDefaultOrBuilder.java | 22 - .../Proto3ScalarOptionalIgnoreEmpty.java | 456 - ...to3ScalarOptionalIgnoreEmptyOrBuilder.java | 22 - ...Proto3ScalarOptionalIgnoreUnspecified.java | 456 - ...larOptionalIgnoreUnspecifiedOrBuilder.java | 22 - .../conformance/cases/RepeatedAnyIn.java | 719 -- .../cases/RepeatedAnyInOrBuilder.java | 35 - .../conformance/cases/RepeatedAnyNotIn.java | 719 -- .../cases/RepeatedAnyNotInOrBuilder.java | 35 - .../conformance/cases/RepeatedDuration.java | 719 -- .../cases/RepeatedDurationOrBuilder.java | 35 - .../cases/RepeatedEmbedCrossPackageNone.java | 719 -- ...epeatedEmbedCrossPackageNoneOrBuilder.java | 35 - .../conformance/cases/RepeatedEmbedNone.java | 719 -- .../cases/RepeatedEmbedNoneOrBuilder.java | 35 - .../conformance/cases/RepeatedEmbedSkip.java | 719 -- .../cases/RepeatedEmbedSkipOrBuilder.java | 35 - .../cases/RepeatedEmbeddedEnumIn.java | 753 -- .../RepeatedEmbeddedEnumInOrBuilder.java | 40 - .../cases/RepeatedEmbeddedEnumNotIn.java | 753 -- .../RepeatedEmbeddedEnumNotInOrBuilder.java | 40 - .../cases/RepeatedEnumDefined.java | 627 -- .../cases/RepeatedEnumDefinedOrBuilder.java | 40 - .../conformance/cases/RepeatedEnumIn.java | 627 -- .../cases/RepeatedEnumInOrBuilder.java | 40 - .../conformance/cases/RepeatedEnumNotIn.java | 627 -- .../cases/RepeatedEnumNotInOrBuilder.java | 40 - .../conformance/cases/RepeatedExact.java | 540 -- .../cases/RepeatedExactIgnore.java | 540 -- .../cases/RepeatedExactIgnoreOrBuilder.java | 28 - .../cases/RepeatedExactOrBuilder.java | 28 - .../cases/RepeatedExternalEnumDefined.java | 627 -- .../RepeatedExternalEnumDefinedOrBuilder.java | 40 - .../conformance/cases/RepeatedItemIn.java | 554 -- .../cases/RepeatedItemInOrBuilder.java | 36 - .../conformance/cases/RepeatedItemNotIn.java | 554 -- .../cases/RepeatedItemNotInOrBuilder.java | 36 - .../cases/RepeatedItemPattern.java | 554 -- .../cases/RepeatedItemPatternOrBuilder.java | 36 - .../conformance/cases/RepeatedItemRule.java | 544 -- .../cases/RepeatedItemRuleOrBuilder.java | 28 - .../conformance/cases/RepeatedMax.java | 544 -- .../cases/RepeatedMaxOrBuilder.java | 28 - .../conformance/cases/RepeatedMin.java | 719 -- .../cases/RepeatedMinAndItemLen.java | 554 -- .../cases/RepeatedMinAndItemLenOrBuilder.java | 36 - .../cases/RepeatedMinAndMaxItemLen.java | 554 -- .../RepeatedMinAndMaxItemLenOrBuilder.java | 36 - .../conformance/cases/RepeatedMinMax.java | 544 -- .../cases/RepeatedMinMaxOrBuilder.java | 28 - .../cases/RepeatedMinOrBuilder.java | 35 - .../cases/RepeatedMultipleUnique.java | 729 -- .../RepeatedMultipleUniqueOrBuilder.java | 53 - .../conformance/cases/RepeatedNone.java | 540 -- .../cases/RepeatedNoneOrBuilder.java | 28 - .../conformance/cases/RepeatedNotUnique.java | 554 -- .../cases/RepeatedNotUniqueOrBuilder.java | 36 - .../conformance/cases/RepeatedProto.java | 412 - .../conformance/cases/RepeatedUnique.java | 554 -- .../cases/RepeatedUniqueOrBuilder.java | 36 - ...RepeatedYetAnotherExternalEnumDefined.java | 627 -- ...etAnotherExternalEnumDefinedOrBuilder.java | 40 - .../cases/RequiredEditionsMap.java | 644 -- .../cases/RequiredEditionsMapOrBuilder.java | 45 - ...quiredEditionsMessageExplicitPresence.java | 1097 --- ...tionsMessageExplicitPresenceDelimited.java | 1097 --- ...ageExplicitPresenceDelimitedOrBuilder.java | 26 - ...tionsMessageExplicitPresenceOrBuilder.java | 26 - ...RequiredEditionsMessageLegacyRequired.java | 1104 --- ...ditionsMessageLegacyRequiredDelimited.java | 1104 --- ...ssageLegacyRequiredDelimitedOrBuilder.java | 26 - ...ditionsMessageLegacyRequiredOrBuilder.java | 26 - .../cases/RequiredEditionsOneof.java | 786 -- .../cases/RequiredEditionsOneofOrBuilder.java | 47 - .../cases/RequiredEditionsRepeated.java | 554 -- .../RequiredEditionsRepeatedExpanded.java | 554 -- ...iredEditionsRepeatedExpandedOrBuilder.java | 36 - .../RequiredEditionsRepeatedOrBuilder.java | 36 - ...equiredEditionsScalarExplicitPresence.java | 525 -- ...EditionsScalarExplicitPresenceDefault.java | 525 -- ...calarExplicitPresenceDefaultOrBuilder.java | 28 - ...itionsScalarExplicitPresenceOrBuilder.java | 28 - ...equiredEditionsScalarImplicitPresence.java | 501 -- ...itionsScalarImplicitPresenceOrBuilder.java | 23 - .../RequiredEditionsScalarLegacyRequired.java | 532 -- ...EditionsScalarLegacyRequiredOrBuilder.java | 28 - .../cases/RequiredFieldProto2Proto.java | 176 - .../cases/RequiredFieldProto3Proto.java | 164 - .../RequiredFieldProtoEditionsProto.java | 284 - .../conformance/cases/RequiredProto2Map.java | 644 -- .../cases/RequiredProto2MapOrBuilder.java | 45 - .../cases/RequiredProto2Message.java | 1100 --- .../cases/RequiredProto2MessageOrBuilder.java | 26 - .../cases/RequiredProto2Oneof.java | 788 -- .../cases/RequiredProto2OneofOrBuilder.java | 47 - .../cases/RequiredProto2Repeated.java | 553 -- .../RequiredProto2RepeatedOrBuilder.java | 36 - .../cases/RequiredProto2ScalarOptional.java | 528 -- .../RequiredProto2ScalarOptionalDefault.java | 528 -- ...dProto2ScalarOptionalDefaultOrBuilder.java | 28 - ...RequiredProto2ScalarOptionalOrBuilder.java | 28 - .../cases/RequiredProto2ScalarRequired.java | 535 -- ...RequiredProto2ScalarRequiredOrBuilder.java | 28 - .../conformance/cases/RequiredProto3Map.java | 644 -- .../cases/RequiredProto3MapOrBuilder.java | 45 - .../cases/RequiredProto3Message.java | 1068 --- .../cases/RequiredProto3MessageOrBuilder.java | 26 - .../cases/RequiredProto3OneOf.java | 786 -- .../cases/RequiredProto3OneOfOrBuilder.java | 47 - .../cases/RequiredProto3OptionalScalar.java | 525 -- ...RequiredProto3OptionalScalarOrBuilder.java | 28 - .../cases/RequiredProto3Repeated.java | 554 -- .../RequiredProto3RepeatedOrBuilder.java | 36 - .../cases/RequiredProto3Scalar.java | 501 -- .../cases/RequiredProto3ScalarOrBuilder.java | 23 - .../conformance/cases/SFixed32Const.java | 431 - .../cases/SFixed32ConstOrBuilder.java | 17 - .../conformance/cases/SFixed32ExGTELTE.java | 431 - .../cases/SFixed32ExGTELTEOrBuilder.java | 17 - .../conformance/cases/SFixed32ExLTGT.java | 431 - .../cases/SFixed32ExLTGTOrBuilder.java | 17 - .../conformance/cases/SFixed32Example.java | 431 - .../cases/SFixed32ExampleOrBuilder.java | 17 - .../conformance/cases/SFixed32GT.java | 431 - .../conformance/cases/SFixed32GTE.java | 431 - .../conformance/cases/SFixed32GTELTE.java | 431 - .../cases/SFixed32GTELTEOrBuilder.java | 17 - .../cases/SFixed32GTEOrBuilder.java | 17 - .../conformance/cases/SFixed32GTLT.java | 431 - .../cases/SFixed32GTLTOrBuilder.java | 17 - .../cases/SFixed32GTOrBuilder.java | 17 - .../conformance/cases/SFixed32Ignore.java | 431 - .../cases/SFixed32IgnoreOrBuilder.java | 17 - .../conformance/cases/SFixed32In.java | 431 - .../cases/SFixed32InOrBuilder.java | 17 - .../cases/SFixed32IncorrectType.java | 431 - .../cases/SFixed32IncorrectTypeOrBuilder.java | 17 - .../conformance/cases/SFixed32LT.java | 431 - .../conformance/cases/SFixed32LTE.java | 431 - .../cases/SFixed32LTEOrBuilder.java | 17 - .../cases/SFixed32LTOrBuilder.java | 17 - .../conformance/cases/SFixed32None.java | 431 - .../cases/SFixed32NoneOrBuilder.java | 17 - .../conformance/cases/SFixed32NotIn.java | 431 - .../cases/SFixed32NotInOrBuilder.java | 17 - .../conformance/cases/SFixed64Const.java | 432 - .../cases/SFixed64ConstOrBuilder.java | 17 - .../conformance/cases/SFixed64ExGTELTE.java | 432 - .../cases/SFixed64ExGTELTEOrBuilder.java | 17 - .../conformance/cases/SFixed64ExLTGT.java | 432 - .../cases/SFixed64ExLTGTOrBuilder.java | 17 - .../conformance/cases/SFixed64Example.java | 432 - .../cases/SFixed64ExampleOrBuilder.java | 17 - .../conformance/cases/SFixed64GT.java | 432 - .../conformance/cases/SFixed64GTE.java | 432 - .../conformance/cases/SFixed64GTELTE.java | 432 - .../cases/SFixed64GTELTEOrBuilder.java | 17 - .../cases/SFixed64GTEOrBuilder.java | 17 - .../conformance/cases/SFixed64GTLT.java | 432 - .../cases/SFixed64GTLTOrBuilder.java | 17 - .../cases/SFixed64GTOrBuilder.java | 17 - .../conformance/cases/SFixed64Ignore.java | 432 - .../cases/SFixed64IgnoreOrBuilder.java | 17 - .../conformance/cases/SFixed64In.java | 432 - .../cases/SFixed64InOrBuilder.java | 17 - .../cases/SFixed64IncorrectType.java | 432 - .../cases/SFixed64IncorrectTypeOrBuilder.java | 17 - .../conformance/cases/SFixed64LT.java | 432 - .../conformance/cases/SFixed64LTE.java | 432 - .../cases/SFixed64LTEOrBuilder.java | 17 - .../cases/SFixed64LTOrBuilder.java | 17 - .../conformance/cases/SFixed64None.java | 432 - .../cases/SFixed64NoneOrBuilder.java | 17 - .../conformance/cases/SFixed64NotIn.java | 432 - .../cases/SFixed64NotInOrBuilder.java | 17 - .../conformance/cases/SInt32Const.java | 431 - .../cases/SInt32ConstOrBuilder.java | 17 - .../conformance/cases/SInt32ExGTELTE.java | 431 - .../cases/SInt32ExGTELTEOrBuilder.java | 17 - .../conformance/cases/SInt32ExLTGT.java | 431 - .../cases/SInt32ExLTGTOrBuilder.java | 17 - .../conformance/cases/SInt32Example.java | 431 - .../cases/SInt32ExampleOrBuilder.java | 17 - .../validate/conformance/cases/SInt32GT.java | 431 - .../validate/conformance/cases/SInt32GTE.java | 431 - .../conformance/cases/SInt32GTELTE.java | 431 - .../cases/SInt32GTELTEOrBuilder.java | 17 - .../conformance/cases/SInt32GTEOrBuilder.java | 17 - .../conformance/cases/SInt32GTLT.java | 431 - .../cases/SInt32GTLTOrBuilder.java | 17 - .../conformance/cases/SInt32GTOrBuilder.java | 17 - .../conformance/cases/SInt32Ignore.java | 431 - .../cases/SInt32IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/SInt32In.java | 431 - .../conformance/cases/SInt32InOrBuilder.java | 17 - .../cases/SInt32IncorrectType.java | 431 - .../cases/SInt32IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/SInt32LT.java | 431 - .../validate/conformance/cases/SInt32LTE.java | 431 - .../conformance/cases/SInt32LTEOrBuilder.java | 17 - .../conformance/cases/SInt32LTOrBuilder.java | 17 - .../conformance/cases/SInt32None.java | 431 - .../cases/SInt32NoneOrBuilder.java | 17 - .../conformance/cases/SInt32NotIn.java | 431 - .../cases/SInt32NotInOrBuilder.java | 17 - .../conformance/cases/SInt64Const.java | 432 - .../cases/SInt64ConstOrBuilder.java | 17 - .../conformance/cases/SInt64ExGTELTE.java | 432 - .../cases/SInt64ExGTELTEOrBuilder.java | 17 - .../conformance/cases/SInt64ExLTGT.java | 432 - .../cases/SInt64ExLTGTOrBuilder.java | 17 - .../conformance/cases/SInt64Example.java | 432 - .../cases/SInt64ExampleOrBuilder.java | 17 - .../validate/conformance/cases/SInt64GT.java | 432 - .../validate/conformance/cases/SInt64GTE.java | 432 - .../conformance/cases/SInt64GTELTE.java | 432 - .../cases/SInt64GTELTEOrBuilder.java | 17 - .../conformance/cases/SInt64GTEOrBuilder.java | 17 - .../conformance/cases/SInt64GTLT.java | 432 - .../cases/SInt64GTLTOrBuilder.java | 17 - .../conformance/cases/SInt64GTOrBuilder.java | 17 - .../conformance/cases/SInt64Ignore.java | 432 - .../cases/SInt64IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/SInt64In.java | 432 - .../conformance/cases/SInt64InOrBuilder.java | 17 - .../cases/SInt64IncorrectType.java | 432 - .../cases/SInt64IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/SInt64LT.java | 432 - .../validate/conformance/cases/SInt64LTE.java | 432 - .../conformance/cases/SInt64LTEOrBuilder.java | 17 - .../conformance/cases/SInt64LTOrBuilder.java | 17 - .../conformance/cases/SInt64None.java | 432 - .../cases/SInt64NoneOrBuilder.java | 17 - .../conformance/cases/SInt64NotIn.java | 432 - .../cases/SInt64NotInOrBuilder.java | 17 - ...ardPredefinedAndCustomRuleEdition2023.java | 456 - ...inedAndCustomRuleEdition2023OrBuilder.java | 22 - ...StandardPredefinedAndCustomRuleProto2.java | 456 - ...redefinedAndCustomRuleProto2OrBuilder.java | 22 - ...StandardPredefinedAndCustomRuleProto3.java | 431 - ...redefinedAndCustomRuleProto3OrBuilder.java | 17 - .../conformance/cases/StringAddress.java | 501 -- .../cases/StringAddressOrBuilder.java | 23 - .../conformance/cases/StringConst.java | 501 -- .../cases/StringConstOrBuilder.java | 23 - .../conformance/cases/StringContains.java | 501 -- .../cases/StringContainsOrBuilder.java | 23 - .../conformance/cases/StringEmail.java | 501 -- .../cases/StringEmailOrBuilder.java | 23 - .../cases/StringEqualMinMaxBytes.java | 501 -- .../StringEqualMinMaxBytesOrBuilder.java | 23 - .../cases/StringEqualMinMaxLen.java | 501 -- .../cases/StringEqualMinMaxLenOrBuilder.java | 23 - .../conformance/cases/StringExample.java | 501 -- .../cases/StringExampleOrBuilder.java | 23 - .../cases/StringHostAndOptionalPort.java | 501 -- .../StringHostAndOptionalPortOrBuilder.java | 23 - .../conformance/cases/StringHostAndPort.java | 501 -- .../cases/StringHostAndPortOrBuilder.java | 23 - .../conformance/cases/StringHostname.java | 501 -- .../cases/StringHostnameOrBuilder.java | 23 - .../cases/StringHttpHeaderName.java | 501 -- .../cases/StringHttpHeaderNameLoose.java | 501 -- .../StringHttpHeaderNameLooseOrBuilder.java | 23 - .../cases/StringHttpHeaderNameOrBuilder.java | 23 - .../cases/StringHttpHeaderValue.java | 501 -- .../cases/StringHttpHeaderValueLoose.java | 501 -- .../StringHttpHeaderValueLooseOrBuilder.java | 23 - .../cases/StringHttpHeaderValueOrBuilder.java | 23 - .../validate/conformance/cases/StringIP.java | 501 -- .../conformance/cases/StringIPOrBuilder.java | 23 - .../conformance/cases/StringIPPrefix.java | 501 -- .../cases/StringIPPrefixOrBuilder.java | 23 - .../cases/StringIPWithPrefixLen.java | 501 -- .../cases/StringIPWithPrefixLenOrBuilder.java | 23 - .../conformance/cases/StringIPv4.java | 501 -- .../cases/StringIPv4OrBuilder.java | 23 - .../conformance/cases/StringIPv4Prefix.java | 501 -- .../cases/StringIPv4PrefixOrBuilder.java | 23 - .../cases/StringIPv4WithPrefixLen.java | 501 -- .../StringIPv4WithPrefixLenOrBuilder.java | 23 - .../conformance/cases/StringIPv6.java | 501 -- .../cases/StringIPv6OrBuilder.java | 23 - .../conformance/cases/StringIPv6Prefix.java | 501 -- .../cases/StringIPv6PrefixOrBuilder.java | 23 - .../cases/StringIPv6WithPrefixLen.java | 501 -- .../StringIPv6WithPrefixLenOrBuilder.java | 23 - .../validate/conformance/cases/StringIn.java | 501 -- .../conformance/cases/StringInOneof.java | 613 -- .../cases/StringInOneofOrBuilder.java | 30 - .../conformance/cases/StringInOrBuilder.java | 23 - .../validate/conformance/cases/StringLen.java | 501 -- .../conformance/cases/StringLenBytes.java | 501 -- .../cases/StringLenBytesOrBuilder.java | 23 - .../conformance/cases/StringLenOrBuilder.java | 23 - .../conformance/cases/StringMaxBytes.java | 501 -- .../cases/StringMaxBytesOrBuilder.java | 23 - .../conformance/cases/StringMaxLen.java | 501 -- .../cases/StringMaxLenOrBuilder.java | 23 - .../conformance/cases/StringMinBytes.java | 501 -- .../cases/StringMinBytesOrBuilder.java | 23 - .../conformance/cases/StringMinLen.java | 501 -- .../cases/StringMinLenOrBuilder.java | 23 - .../conformance/cases/StringMinMaxBytes.java | 501 -- .../cases/StringMinMaxBytesOrBuilder.java | 23 - .../conformance/cases/StringMinMaxLen.java | 501 -- .../cases/StringMinMaxLenOrBuilder.java | 23 - .../conformance/cases/StringNone.java | 501 -- .../cases/StringNoneOrBuilder.java | 23 - .../conformance/cases/StringNotAddress.java | 501 -- .../cases/StringNotAddressOrBuilder.java | 23 - .../conformance/cases/StringNotContains.java | 501 -- .../cases/StringNotContainsOrBuilder.java | 23 - .../conformance/cases/StringNotEmail.java | 501 -- .../cases/StringNotEmailOrBuilder.java | 23 - .../conformance/cases/StringNotHostname.java | 501 -- .../cases/StringNotHostnameOrBuilder.java | 23 - .../conformance/cases/StringNotIP.java | 501 -- .../cases/StringNotIPOrBuilder.java | 23 - .../conformance/cases/StringNotIPPrefix.java | 501 -- .../cases/StringNotIPPrefixOrBuilder.java | 23 - .../cases/StringNotIPWithPrefixLen.java | 501 -- .../StringNotIPWithPrefixLenOrBuilder.java | 23 - .../conformance/cases/StringNotIPv4.java | 501 -- .../cases/StringNotIPv4OrBuilder.java | 23 - .../cases/StringNotIPv4Prefix.java | 501 -- .../cases/StringNotIPv4PrefixOrBuilder.java | 23 - .../cases/StringNotIPv4WithPrefixLen.java | 501 -- .../StringNotIPv4WithPrefixLenOrBuilder.java | 23 - .../conformance/cases/StringNotIPv6.java | 501 -- .../cases/StringNotIPv6OrBuilder.java | 23 - .../cases/StringNotIPv6Prefix.java | 501 -- .../cases/StringNotIPv6PrefixOrBuilder.java | 23 - .../cases/StringNotIPv6WithPrefixLen.java | 501 -- .../StringNotIPv6WithPrefixLenOrBuilder.java | 23 - .../conformance/cases/StringNotIn.java | 501 -- .../cases/StringNotInOrBuilder.java | 23 - .../conformance/cases/StringNotTUUID.java | 501 -- .../cases/StringNotTUUIDOrBuilder.java | 23 - .../conformance/cases/StringNotURI.java | 501 -- .../cases/StringNotURIOrBuilder.java | 23 - .../conformance/cases/StringNotURIRef.java | 501 -- .../cases/StringNotURIRefOrBuilder.java | 23 - .../conformance/cases/StringNotUUID.java | 501 -- .../cases/StringNotUUIDOrBuilder.java | 23 - .../conformance/cases/StringPattern.java | 501 -- .../cases/StringPatternEscapes.java | 501 -- .../cases/StringPatternEscapesOrBuilder.java | 23 - .../cases/StringPatternOrBuilder.java | 23 - .../conformance/cases/StringPrefix.java | 501 -- .../cases/StringPrefixOrBuilder.java | 23 - .../conformance/cases/StringSuffix.java | 501 -- .../cases/StringSuffixOrBuilder.java | 23 - .../conformance/cases/StringTUUID.java | 501 -- .../cases/StringTUUIDOrBuilder.java | 23 - .../validate/conformance/cases/StringURI.java | 501 -- .../conformance/cases/StringURIOrBuilder.java | 23 - .../conformance/cases/StringURIRef.java | 501 -- .../cases/StringURIRefOrBuilder.java | 23 - .../conformance/cases/StringUUID.java | 501 -- .../conformance/cases/StringUUIDIgnore.java | 501 -- .../cases/StringUUIDIgnoreOrBuilder.java | 23 - .../cases/StringUUIDOrBuilder.java | 23 - .../conformance/cases/StringsProto.java | 809 -- .../validate/conformance/cases/TestEnum.java | 133 - .../conformance/cases/TestEnumAlias.java | 170 - .../validate/conformance/cases/TestMsg.java | 694 -- .../conformance/cases/TestMsgOrBuilder.java | 38 - .../conformance/cases/TestOneofMsg.java | 432 - .../cases/TestOneofMsgOrBuilder.java | 17 - .../conformance/cases/TimestampConst.java | 558 -- .../cases/TimestampConstOrBuilder.java | 26 - .../conformance/cases/TimestampExGTELTE.java | 558 -- .../cases/TimestampExGTELTEOrBuilder.java | 26 - .../conformance/cases/TimestampExLTGT.java | 558 -- .../cases/TimestampExLTGTOrBuilder.java | 26 - .../conformance/cases/TimestampExample.java | 558 -- .../cases/TimestampExampleOrBuilder.java | 26 - .../conformance/cases/TimestampGT.java | 558 -- .../conformance/cases/TimestampGTE.java | 558 -- .../conformance/cases/TimestampGTELTE.java | 558 -- .../cases/TimestampGTELTEOrBuilder.java | 26 - .../cases/TimestampGTEOrBuilder.java | 26 - .../conformance/cases/TimestampGTLT.java | 558 -- .../cases/TimestampGTLTOrBuilder.java | 26 - .../conformance/cases/TimestampGTNow.java | 558 -- .../cases/TimestampGTNowOrBuilder.java | 26 - .../cases/TimestampGTNowWithin.java | 558 -- .../cases/TimestampGTNowWithinOrBuilder.java | 26 - .../cases/TimestampGTOrBuilder.java | 26 - .../conformance/cases/TimestampLT.java | 558 -- .../conformance/cases/TimestampLTE.java | 558 -- .../cases/TimestampLTEOrBuilder.java | 26 - .../conformance/cases/TimestampLTNow.java | 558 -- .../cases/TimestampLTNowOrBuilder.java | 26 - .../cases/TimestampLTNowWithin.java | 558 -- .../cases/TimestampLTNowWithinOrBuilder.java | 26 - .../cases/TimestampLTOrBuilder.java | 26 - .../conformance/cases/TimestampNone.java | 558 -- .../cases/TimestampNoneOrBuilder.java | 26 - .../conformance/cases/TimestampNotGTNow.java | 558 -- .../cases/TimestampNotGTNowOrBuilder.java | 26 - .../conformance/cases/TimestampNotLTNow.java | 558 -- .../cases/TimestampNotLTNowOrBuilder.java | 26 - .../conformance/cases/TimestampRequired.java | 558 -- .../cases/TimestampRequiredOrBuilder.java | 26 - .../conformance/cases/TimestampWithin.java | 558 -- .../cases/TimestampWithinOrBuilder.java | 26 - .../conformance/cases/UInt32Const.java | 431 - .../cases/UInt32ConstOrBuilder.java | 17 - .../conformance/cases/UInt32ExGTELTE.java | 431 - .../cases/UInt32ExGTELTEOrBuilder.java | 17 - .../conformance/cases/UInt32ExLTGT.java | 431 - .../cases/UInt32ExLTGTOrBuilder.java | 17 - .../conformance/cases/UInt32Example.java | 431 - .../cases/UInt32ExampleOrBuilder.java | 17 - .../validate/conformance/cases/UInt32GT.java | 431 - .../validate/conformance/cases/UInt32GTE.java | 431 - .../conformance/cases/UInt32GTELTE.java | 431 - .../cases/UInt32GTELTEOrBuilder.java | 17 - .../conformance/cases/UInt32GTEOrBuilder.java | 17 - .../conformance/cases/UInt32GTLT.java | 431 - .../cases/UInt32GTLTOrBuilder.java | 17 - .../conformance/cases/UInt32GTOrBuilder.java | 17 - .../conformance/cases/UInt32Ignore.java | 431 - .../cases/UInt32IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/UInt32In.java | 431 - .../conformance/cases/UInt32InOrBuilder.java | 17 - .../cases/UInt32IncorrectType.java | 431 - .../cases/UInt32IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/UInt32LT.java | 431 - .../validate/conformance/cases/UInt32LTE.java | 431 - .../conformance/cases/UInt32LTEOrBuilder.java | 17 - .../conformance/cases/UInt32LTOrBuilder.java | 17 - .../conformance/cases/UInt32None.java | 431 - .../cases/UInt32NoneOrBuilder.java | 17 - .../conformance/cases/UInt32NotIn.java | 431 - .../cases/UInt32NotInOrBuilder.java | 17 - .../conformance/cases/UInt64Const.java | 432 - .../cases/UInt64ConstOrBuilder.java | 17 - .../conformance/cases/UInt64ExGTELTE.java | 432 - .../cases/UInt64ExGTELTEOrBuilder.java | 17 - .../conformance/cases/UInt64ExLTGT.java | 432 - .../cases/UInt64ExLTGTOrBuilder.java | 17 - .../conformance/cases/UInt64Example.java | 432 - .../cases/UInt64ExampleOrBuilder.java | 17 - .../validate/conformance/cases/UInt64GT.java | 432 - .../validate/conformance/cases/UInt64GTE.java | 432 - .../conformance/cases/UInt64GTELTE.java | 432 - .../cases/UInt64GTELTEOrBuilder.java | 17 - .../conformance/cases/UInt64GTEOrBuilder.java | 17 - .../conformance/cases/UInt64GTLT.java | 432 - .../cases/UInt64GTLTOrBuilder.java | 17 - .../conformance/cases/UInt64GTOrBuilder.java | 17 - .../conformance/cases/UInt64Ignore.java | 432 - .../cases/UInt64IgnoreOrBuilder.java | 17 - .../validate/conformance/cases/UInt64In.java | 432 - .../conformance/cases/UInt64InOrBuilder.java | 17 - .../cases/UInt64IncorrectType.java | 432 - .../cases/UInt64IncorrectTypeOrBuilder.java | 17 - .../validate/conformance/cases/UInt64LT.java | 432 - .../validate/conformance/cases/UInt64LTE.java | 432 - .../conformance/cases/UInt64LTEOrBuilder.java | 17 - .../conformance/cases/UInt64LTOrBuilder.java | 17 - .../conformance/cases/UInt64None.java | 432 - .../cases/UInt64NoneOrBuilder.java | 17 - .../conformance/cases/UInt64NotIn.java | 432 - .../cases/UInt64NotInOrBuilder.java | 17 - .../conformance/cases/WktAnyProto.java | 116 - .../conformance/cases/WktDurationProto.java | 259 - .../conformance/cases/WktLevelOne.java | 1638 ---- .../cases/WktLevelOneOrBuilder.java | 26 - .../conformance/cases/WktNestedProto.java | 101 - .../conformance/cases/WktTimestampProto.java | 310 - .../conformance/cases/WktWrappersProto.java | 246 - .../conformance/cases/WrapperBool.java | 558 -- .../cases/WrapperBoolOrBuilder.java | 26 - .../conformance/cases/WrapperBytes.java | 558 -- .../cases/WrapperBytesOrBuilder.java | 26 - .../conformance/cases/WrapperDouble.java | 558 -- .../cases/WrapperDoubleOrBuilder.java | 26 - .../conformance/cases/WrapperFloat.java | 558 -- .../cases/WrapperFloatOrBuilder.java | 26 - .../conformance/cases/WrapperInt32.java | 558 -- .../cases/WrapperInt32OrBuilder.java | 26 - .../conformance/cases/WrapperInt64.java | 558 -- .../cases/WrapperInt64OrBuilder.java | 26 - .../conformance/cases/WrapperNone.java | 558 -- .../cases/WrapperNoneOrBuilder.java | 26 - .../cases/WrapperOptionalUuidString.java | 558 -- .../WrapperOptionalUuidStringOrBuilder.java | 26 - .../cases/WrapperRequiredEmptyString.java | 558 -- .../WrapperRequiredEmptyStringOrBuilder.java | 26 - .../cases/WrapperRequiredFloat.java | 558 -- .../cases/WrapperRequiredFloatOrBuilder.java | 26 - .../cases/WrapperRequiredString.java | 558 -- .../cases/WrapperRequiredStringOrBuilder.java | 26 - .../conformance/cases/WrapperString.java | 558 -- .../cases/WrapperStringOrBuilder.java | 26 - .../conformance/cases/WrapperUInt32.java | 558 -- .../cases/WrapperUInt32OrBuilder.java | 26 - .../conformance/cases/WrapperUInt64.java | 558 -- .../cases/WrapperUInt64OrBuilder.java | 26 - .../CustomConstraintsProto.java | 223 - .../custom_constraints/DynRuntimeError.java | 431 - .../DynRuntimeErrorOrBuilder.java | 17 - .../cases/custom_constraints/Enum.java | 124 - .../custom_constraints/FieldExpressions.java | 1152 --- .../FieldExpressionsOrBuilder.java | 43 - .../custom_constraints/IncorrectType.java | 431 - .../IncorrectTypeOrBuilder.java | 17 - .../MessageExpressions.java | 1577 ---- .../MessageExpressionsOrBuilder.java | 75 - .../custom_constraints/MissingField.java | 431 - .../MissingFieldOrBuilder.java | 17 - .../custom_constraints/NoExpressions.java | 1081 --- .../NoExpressionsOrBuilder.java | 43 - .../custom_constraints/NowEqualsNow.java | 358 - .../NowEqualsNowOrBuilder.java | 11 - .../cases/other_package/Embed.java | 1029 --- .../cases/other_package/EmbedOrBuilder.java | 17 - .../cases/other_package/EmbedProto.java | 91 - .../subdirectory/InSubdirectoryProto.java | 59 - .../cases/yet_another_package/Embed.java | 557 -- .../yet_another_package/Embed2Proto.java | 78 - .../yet_another_package/EmbedOrBuilder.java | 17 - .../conformance/harness/CaseResult.java | 1410 --- .../harness/CaseResultOrBuilder.java | 132 - .../conformance/harness/HarnessProto.java | 136 - .../conformance/harness/ResultOptions.java | 1035 --- .../harness/ResultOptionsOrBuilder.java | 91 - .../conformance/harness/ResultSet.java | 1318 --- .../harness/ResultSetOrBuilder.java | 112 - .../conformance/harness/ResultsProto.java | 133 - .../conformance/harness/SuiteResults.java | 1482 ---- .../harness/SuiteResultsOrBuilder.java | 132 - .../harness/TestConformanceRequest.java | 887 -- .../TestConformanceRequestOrBuilder.java | 60 - .../harness/TestConformanceResponse.java | 681 -- .../TestConformanceResponseOrBuilder.java | 45 - .../conformance/harness/TestResult.java | 1447 ---- .../harness/TestResultOrBuilder.java | 146 - .../buf/protovalidate/ValidatorTest.java | 22 +- gradle.properties | 9 +- gradle/libs.versions.toml | 38 +- gradle/wrapper/gradle-wrapper.jar | Bin 43583 -> 43705 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 5 +- .../build/buf/protovalidate/AnyEvaluator.java | 129 + .../buf/protovalidate/AstExpression.java | 70 + .../expression => }/CelPrograms.java | 31 +- .../buf/protovalidate/CompiledProgram.java | 121 + .../java/build/buf/protovalidate/Config.java | 53 +- .../buf/protovalidate/CustomDeclarations.java | 190 + .../buf/protovalidate/CustomOverload.java | 619 ++ .../buf/protovalidate/DescriptorMappings.java | 212 + .../EmbeddedMessageEvaluator.java | 43 + .../buf/protovalidate/EnumEvaluator.java | 97 + .../{internal/evaluator => }/Evaluator.java | 14 +- .../buf/protovalidate/EvaluatorBuilder.java | 556 ++ .../{internal/expression => }/Expression.java | 44 +- .../buf/protovalidate/FieldEvaluator.java | 147 + .../buf/protovalidate/FieldPathUtils.java | 119 + .../java/build/buf/protovalidate/Format.java | 363 + .../java/build/buf/protovalidate/Ipv4.java | 204 + .../java/build/buf/protovalidate/Ipv6.java | 361 + .../buf/protovalidate/ListElementValue.java | 78 + .../buf/protovalidate/ListEvaluator.java | 76 + .../build/buf/protovalidate/MapEvaluator.java | 178 + .../evaluator => }/MessageEvaluator.java | 30 +- .../protovalidate/MessageOneofEvaluator.java | 76 + .../buf/protovalidate/MessageReflector.java | 2 +- .../evaluator => }/MessageValue.java | 28 +- .../build/buf/protovalidate/NowVariable.java | 52 + .../FieldValue.java => ObjectValue.java} | 56 +- .../evaluator => }/OneofEvaluator.java | 37 +- .../build/buf/protovalidate/ProtoAdapter.java | 90 + .../ProtobufMessageReflector.java | 8 +- .../build/buf/protovalidate/RuleCache.java | 317 + ...straintResolver.java => RuleResolver.java} | 68 +- .../buf/protovalidate/RuleViolation.java | 263 + .../protovalidate/RuleViolationHelper.java | 54 + .../UnknownDescriptorEvaluator.java | 20 +- .../java/build/buf/protovalidate/Uri.java | 941 ++ .../buf/protovalidate/ValidateLibrary.java | 73 + .../buf/protovalidate/ValidationResult.java | 43 +- .../build/buf/protovalidate/Validator.java | 92 +- .../buf/protovalidate/ValidatorFactory.java | 102 + .../buf/protovalidate/ValidatorImpl.java | 76 + .../java/build/buf/protovalidate/Value.java | 21 +- .../evaluator => }/ValueEvaluator.java | 67 +- .../build/buf/protovalidate/Variable.java | 87 + .../build/buf/protovalidate/Violation.java | 59 + .../exceptions/CompilationException.java | 4 +- .../exceptions/ExecutionException.java | 4 +- .../exceptions/ValidationException.java | 2 +- .../internal/celext/CustomDeclarations.java | 193 - .../internal/celext/CustomOverload.java | 649 -- .../protovalidate/internal/celext/Format.java | 282 - .../internal/celext/ValidateLibrary.java | 57 - .../internal/constraints/ConstraintCache.java | 318 - .../constraints/DescriptorMappings.java | 224 - .../internal/evaluator/AnyEvaluator.java | 89 - .../internal/evaluator/EnumEvaluator.java | 80 - .../internal/evaluator/ErrorPathUtils.java | 56 - .../internal/evaluator/EvaluatorBuilder.java | 516 -- .../internal/evaluator/FieldEvaluator.java | 107 - .../internal/evaluator/ListEvaluator.java | 58 - .../internal/evaluator/MapEvaluator.java | 116 - .../internal/expression/AstExpression.java | 61 - .../internal/expression/CompiledProgram.java | 82 - .../internal/expression/NowVariable.java | 54 - .../internal/expression/Variable.java | 96 - .../java/build/buf/validate/AnyRules.java | 1061 --- .../build/buf/validate/AnyRulesOrBuilder.java | 157 - .../java/build/buf/validate/BoolRules.java | 875 -- .../buf/validate/BoolRulesOrBuilder.java | 109 - .../java/build/buf/validate/BytesRules.java | 3291 ------- .../buf/validate/BytesRulesOrBuilder.java | 611 -- .../java/build/buf/validate/Constraint.java | 1055 --- .../buf/validate/ConstraintOrBuilder.java | 119 - .../java/build/buf/validate/DoubleRules.java | 2517 ------ .../buf/validate/DoubleRulesOrBuilder.java | 426 - .../build/buf/validate/DurationRules.java | 4557 ---------- .../buf/validate/DurationRulesOrBuilder.java | 616 -- .../java/build/buf/validate/EnumRules.java | 1849 ---- .../buf/validate/EnumRulesOrBuilder.java | 328 - .../build/buf/validate/FieldConstraints.java | 6581 -------------- .../validate/FieldConstraintsOrBuilder.java | 613 -- .../java/build/buf/validate/Fixed32Rules.java | 2386 ------ .../buf/validate/Fixed32RulesOrBuilder.java | 405 - .../java/build/buf/validate/Fixed64Rules.java | 2391 ------ .../buf/validate/Fixed64RulesOrBuilder.java | 405 - .../java/build/buf/validate/FloatRules.java | 2517 ------ .../buf/validate/FloatRulesOrBuilder.java | 426 - src/main/java/build/buf/validate/Ignore.java | 465 - .../java/build/buf/validate/Int32Rules.java | 2376 ------ .../buf/validate/Int32RulesOrBuilder.java | 405 - .../java/build/buf/validate/Int64Rules.java | 2381 ------ .../buf/validate/Int64RulesOrBuilder.java | 405 - .../java/build/buf/validate/KnownRegex.java | 141 - .../java/build/buf/validate/MapRules.java | 1521 ---- .../build/buf/validate/MapRulesOrBuilder.java | 214 - .../buf/validate/MessageConstraints.java | 1330 --- .../validate/MessageConstraintsOrBuilder.java | 165 - .../build/buf/validate/OneofConstraints.java | 587 -- .../validate/OneofConstraintsOrBuilder.java | 62 - .../buf/validate/PredefinedConstraints.java | 1120 --- .../PredefinedConstraintsOrBuilder.java | 120 - .../build/buf/validate/RepeatedRules.java | 1324 --- .../buf/validate/RepeatedRulesOrBuilder.java | 196 - .../build/buf/validate/SFixed32Rules.java | 2386 ------ .../buf/validate/SFixed32RulesOrBuilder.java | 405 - .../build/buf/validate/SFixed64Rules.java | 2391 ------ .../buf/validate/SFixed64RulesOrBuilder.java | 405 - .../java/build/buf/validate/SInt32Rules.java | 2374 ----- .../buf/validate/SInt32RulesOrBuilder.java | 405 - .../java/build/buf/validate/SInt64Rules.java | 2379 ------ .../buf/validate/SInt64RulesOrBuilder.java | 405 - .../java/build/buf/validate/StringRules.java | 7600 ----------------- .../buf/validate/StringRulesOrBuilder.java | 1555 ---- .../build/buf/validate/TimestampRules.java | 3450 -------- .../buf/validate/TimestampRulesOrBuilder.java | 454 - .../java/build/buf/validate/UInt32Rules.java | 2376 ------ .../buf/validate/UInt32RulesOrBuilder.java | 405 - .../java/build/buf/validate/UInt64Rules.java | 2381 ------ .../buf/validate/UInt64RulesOrBuilder.java | 405 - .../build/buf/validate/ValidateProto.java | 1790 ---- .../java/build/buf/validate/Violation.java | 1126 --- .../buf/validate/ViolationOrBuilder.java | 126 - .../java/build/buf/validate/Violations.java | 823 -- .../buf/validate/ViolationsOrBuilder.java | 55 - .../resources/buf/validate/validate.proto | 810 +- .../buf/protovalidate/CustomOverloadTest.java | 187 + .../build/buf/protovalidate/FormatTest.java | 200 + .../protovalidate/ValidationResultTest.java | 123 + .../ValidatorCelExpressionTest.java | 158 + .../ValidatorConstructionTest.java | 265 + .../ValidatorDifferentJavaPackagesTest.java | 96 +- .../ValidatorDynamicMessageTest.java | 160 +- .../protovalidate/ValidatorImportTest.java | 166 + .../internal/celext/CustomOverloadTest.java | 228 - .../internal/celext/FormatTest.java | 33 - .../proto/buf.gen.cel.testtypes.yaml | 9 + src/test/resources/proto/buf.gen.cel.yaml | 6 + src/test/resources/proto/buf.gen.imports.yaml | 2 +- .../resources/proto/buf.gen.noimports.yaml | 2 +- .../proto/validationtest/custom_rules.proto | 41 + .../proto/validationtest/import_test.proto | 23 + .../proto/validationtest/predefined.proto | 14 +- .../proto/validationtest/required.proto | 4 +- .../proto/validationtest/validationtest.proto | 80 +- .../string_ext_supplemental.textproto | 26 + .../testdata/string_ext_v0.24.0.textproto | 1417 +++ 1516 files changed, 9798 insertions(+), 479545 deletions(-) create mode 100644 conformance/expected-failures.yaml create mode 100644 conformance/src/main/java/build/.DS_Store delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnEnum.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalse.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalseOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrue.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrueOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BoolProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesContains.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesContainsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIP.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIP.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesPattern.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesPatternOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestEnum.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsg.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsgOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFinite.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFiniteOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFinite.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFiniteOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFields.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFieldsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Embed.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EmbedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternalOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/EnumsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FilenameWithDashProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatFinite.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatFiniteOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFinite.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFiniteOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMap.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMapOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresence.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimited.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimited.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeated.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpanded.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpandedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresence.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresence.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairs.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Map.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MapOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Message.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MessageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Oneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2OneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Repeated.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2RepeatedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptional.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Map.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MapOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Message.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MessageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Oneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalar.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalarOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Repeated.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3RepeatedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Scalar.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3ScalarOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProtoEditionsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItems.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItemsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto2Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto3Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProtoEditionsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraints.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraintsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptional.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptionalOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessage.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapExact.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapExactOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapKeys.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPattern.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPatternOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapMax.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapMaxOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapMin.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMax.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMaxOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapMinOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursive.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursiveOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapValues.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPattern.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPatternOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MapsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Message.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackage.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabled.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabledOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptional.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptionalOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkip.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkipOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInside.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInsideOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MessagesProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMaps.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMapsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/NumbersProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Oneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredField.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredFieldOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/OneofsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto2Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaround.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProtoEditionsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmpty.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmptyOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecified.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDuration.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDurationOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkip.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkipOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExact.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPattern.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPatternOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRule.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRuleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMax.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMaxOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMin.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMax.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMaxOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUnique.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUniqueOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUnique.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUniqueOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUnique.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUniqueOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefined.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefinedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMap.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMapOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresence.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimited.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimited.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeated.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpanded.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpandedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresence.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresence.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresenceOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto2Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto3Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProtoEditionsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Map.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MapOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Message.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MessageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Oneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2OneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Repeated.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2RepeatedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptional.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefault.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefaultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Map.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MapOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Message.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MessageOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOf.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOfOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalar.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalarOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Repeated.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3RepeatedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Scalar.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3ScalarOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringAddress.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringAddressOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringContains.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringContainsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringEmail.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringEmailOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPort.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPortOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPort.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPortOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHostname.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHostnameOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderName.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLoose.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLooseOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValue.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLoose.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLooseOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIP.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4Prefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4PrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6Prefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6PrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneof.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneofOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddress.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddressOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContains.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContainsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmail.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmailOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostname.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostnameOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIP.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4Prefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4PrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6Prefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6PrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLen.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLenOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUID.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUIDOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURI.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRef.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRefOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUID.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUIDOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringPattern.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffix.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffixOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUID.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUIDOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringURI.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringURIOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRef.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRefOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringUUID.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/StringsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TestEnum.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TestEnumAlias.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TestMsg.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TestMsgOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsg.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsgOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConst.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExample.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNow.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithin.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithinOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNow.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithin.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithinOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNow.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNowOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNow.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNowOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequired.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequiredOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithin.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithinOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Const.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ConstOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Example.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExampleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Ignore.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IgnoreOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64In.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64InOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LT.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTE.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTEOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64None.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotIn.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotInOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktAnyProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktDurationProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktLevelOne.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktLevelOneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktNestedProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktTimestampProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WktWrappersProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBool.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBoolOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytes.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytesOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDouble.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDoubleOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloat.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloatOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNone.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNoneOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidString.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidStringOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyString.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyStringOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloat.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloatOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredString.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredStringOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperString.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperStringOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64OrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/CustomConstraintsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/DynRuntimeError.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/DynRuntimeErrorOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/Enum.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressions.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressionsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectType.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectTypeOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressions.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressionsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingField.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingFieldOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressions.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressionsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNow.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNowOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/other_package/Embed.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/subdirectory/InSubdirectoryProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed2Proto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/EmbedOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/CaseResult.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/CaseResultOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/HarnessProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptions.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptionsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/ResultSet.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/ResultSetOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/ResultsProto.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResults.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResultsOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequest.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequestOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponse.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponseOrBuilder.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/TestResult.java delete mode 100644 conformance/src/main/java/build/buf/validate/conformance/harness/TestResultOrBuilder.java create mode 100644 src/main/java/build/buf/protovalidate/AnyEvaluator.java create mode 100644 src/main/java/build/buf/protovalidate/AstExpression.java rename src/main/java/build/buf/protovalidate/{internal/expression => }/CelPrograms.java (58%) create mode 100644 src/main/java/build/buf/protovalidate/CompiledProgram.java create mode 100644 src/main/java/build/buf/protovalidate/CustomDeclarations.java create mode 100644 src/main/java/build/buf/protovalidate/CustomOverload.java create mode 100644 src/main/java/build/buf/protovalidate/DescriptorMappings.java create mode 100644 src/main/java/build/buf/protovalidate/EmbeddedMessageEvaluator.java create mode 100644 src/main/java/build/buf/protovalidate/EnumEvaluator.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/Evaluator.java (74%) create mode 100644 src/main/java/build/buf/protovalidate/EvaluatorBuilder.java rename src/main/java/build/buf/protovalidate/{internal/expression => }/Expression.java (50%) create mode 100644 src/main/java/build/buf/protovalidate/FieldEvaluator.java create mode 100644 src/main/java/build/buf/protovalidate/FieldPathUtils.java create mode 100644 src/main/java/build/buf/protovalidate/Format.java create mode 100644 src/main/java/build/buf/protovalidate/Ipv4.java create mode 100644 src/main/java/build/buf/protovalidate/Ipv6.java create mode 100644 src/main/java/build/buf/protovalidate/ListElementValue.java create mode 100644 src/main/java/build/buf/protovalidate/ListEvaluator.java create mode 100644 src/main/java/build/buf/protovalidate/MapEvaluator.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/MessageEvaluator.java (62%) create mode 100644 src/main/java/build/buf/protovalidate/MessageOneofEvaluator.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/MessageValue.java (74%) create mode 100644 src/main/java/build/buf/protovalidate/NowVariable.java rename src/main/java/build/buf/protovalidate/{internal/evaluator/FieldValue.java => ObjectValue.java} (62%) rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/OneofEvaluator.java (62%) create mode 100644 src/main/java/build/buf/protovalidate/ProtoAdapter.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/ProtobufMessageReflector.java (81%) create mode 100644 src/main/java/build/buf/protovalidate/RuleCache.java rename src/main/java/build/buf/protovalidate/{internal/evaluator/ConstraintResolver.java => RuleResolver.java} (65%) create mode 100644 src/main/java/build/buf/protovalidate/RuleViolation.java create mode 100644 src/main/java/build/buf/protovalidate/RuleViolationHelper.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/UnknownDescriptorEvaluator.java (67%) create mode 100644 src/main/java/build/buf/protovalidate/Uri.java create mode 100644 src/main/java/build/buf/protovalidate/ValidateLibrary.java create mode 100644 src/main/java/build/buf/protovalidate/ValidatorFactory.java create mode 100644 src/main/java/build/buf/protovalidate/ValidatorImpl.java rename src/main/java/build/buf/protovalidate/{internal/evaluator => }/ValueEvaluator.java (50%) create mode 100644 src/main/java/build/buf/protovalidate/Variable.java create mode 100644 src/main/java/build/buf/protovalidate/Violation.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/celext/CustomDeclarations.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/celext/CustomOverload.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/celext/Format.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/celext/ValidateLibrary.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/ErrorPathUtils.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/EvaluatorBuilder.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/expression/CompiledProgram.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/expression/NowVariable.java delete mode 100644 src/main/java/build/buf/protovalidate/internal/expression/Variable.java delete mode 100644 src/main/java/build/buf/validate/AnyRules.java delete mode 100644 src/main/java/build/buf/validate/AnyRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/BoolRules.java delete mode 100644 src/main/java/build/buf/validate/BoolRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/BytesRules.java delete mode 100644 src/main/java/build/buf/validate/BytesRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/Constraint.java delete mode 100644 src/main/java/build/buf/validate/ConstraintOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/DoubleRules.java delete mode 100644 src/main/java/build/buf/validate/DoubleRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/DurationRules.java delete mode 100644 src/main/java/build/buf/validate/DurationRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/EnumRules.java delete mode 100644 src/main/java/build/buf/validate/EnumRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/FieldConstraints.java delete mode 100644 src/main/java/build/buf/validate/FieldConstraintsOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/Fixed32Rules.java delete mode 100644 src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/Fixed64Rules.java delete mode 100644 src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/FloatRules.java delete mode 100644 src/main/java/build/buf/validate/FloatRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/Ignore.java delete mode 100644 src/main/java/build/buf/validate/Int32Rules.java delete mode 100644 src/main/java/build/buf/validate/Int32RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/Int64Rules.java delete mode 100644 src/main/java/build/buf/validate/Int64RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/KnownRegex.java delete mode 100644 src/main/java/build/buf/validate/MapRules.java delete mode 100644 src/main/java/build/buf/validate/MapRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/MessageConstraints.java delete mode 100644 src/main/java/build/buf/validate/MessageConstraintsOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/OneofConstraints.java delete mode 100644 src/main/java/build/buf/validate/OneofConstraintsOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/PredefinedConstraints.java delete mode 100644 src/main/java/build/buf/validate/PredefinedConstraintsOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/RepeatedRules.java delete mode 100644 src/main/java/build/buf/validate/RepeatedRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/SFixed32Rules.java delete mode 100644 src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/SFixed64Rules.java delete mode 100644 src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/SInt32Rules.java delete mode 100644 src/main/java/build/buf/validate/SInt32RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/SInt64Rules.java delete mode 100644 src/main/java/build/buf/validate/SInt64RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/StringRules.java delete mode 100644 src/main/java/build/buf/validate/StringRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/TimestampRules.java delete mode 100644 src/main/java/build/buf/validate/TimestampRulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/UInt32Rules.java delete mode 100644 src/main/java/build/buf/validate/UInt32RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/UInt64Rules.java delete mode 100644 src/main/java/build/buf/validate/UInt64RulesOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/ValidateProto.java delete mode 100644 src/main/java/build/buf/validate/Violation.java delete mode 100644 src/main/java/build/buf/validate/ViolationOrBuilder.java delete mode 100644 src/main/java/build/buf/validate/Violations.java delete mode 100644 src/main/java/build/buf/validate/ViolationsOrBuilder.java create mode 100644 src/test/java/build/buf/protovalidate/CustomOverloadTest.java create mode 100644 src/test/java/build/buf/protovalidate/FormatTest.java create mode 100644 src/test/java/build/buf/protovalidate/ValidationResultTest.java create mode 100644 src/test/java/build/buf/protovalidate/ValidatorCelExpressionTest.java create mode 100644 src/test/java/build/buf/protovalidate/ValidatorConstructionTest.java create mode 100644 src/test/java/build/buf/protovalidate/ValidatorImportTest.java delete mode 100644 src/test/java/build/buf/protovalidate/internal/celext/CustomOverloadTest.java delete mode 100644 src/test/java/build/buf/protovalidate/internal/celext/FormatTest.java create mode 100644 src/test/resources/proto/buf.gen.cel.testtypes.yaml create mode 100644 src/test/resources/proto/buf.gen.cel.yaml create mode 100644 src/test/resources/proto/validationtest/custom_rules.proto create mode 100644 src/test/resources/proto/validationtest/import_test.proto create mode 100644 src/test/resources/testdata/string_ext_supplemental.textproto create mode 100644 src/test/resources/testdata/string_ext_v0.24.0.textproto diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 23779eb7..49e66ebf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -36,7 +36,6 @@ assignees: '' - **Version**: - **Compiler/Toolchain**: - **Protobuf Compiler & Version**: -- **Protoc-gen-validate Version**: - **Protovalidate Version**: ## Possible Solution diff --git a/.github/buf-logo.svg b/.github/buf-logo.svg index 35bcafde..2a24f001 100644 --- a/.github/buf-logo.svg +++ b/.github/buf-logo.svg @@ -1 +1,10 @@ - \ No newline at end of file + + + + + + + + + + diff --git a/LICENSE b/LICENSE index dbb49320..3e1d480e 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2023 Buf Technologies, Inc. + Copyright 2023-2025 Buf Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/Makefile b/Makefile index 7805812e..9849c9a9 100644 --- a/Makefile +++ b/Makefile @@ -6,17 +6,18 @@ SHELL := bash MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules MAKEFLAGS += --no-print-directory +GRADLE ?= ./gradlew .PHONY: all all: lint generate build docs conformance ## Run all tests and lint (default) .PHONY: build build: ## Build the entire project. - ./gradlew build + $(GRADLE) build .PHONY: docs docs: ## Build javadocs for the project. - ./gradlew javadoc + $(GRADLE) javadoc .PHONY: checkgenerate checkgenerate: generate ## Checks if `make generate` produces a diff. @@ -25,11 +26,11 @@ checkgenerate: generate ## Checks if `make generate` produces a diff. .PHONY: clean clean: ## Delete intermediate build artifacts - ./gradlew clean + $(GRADLE) clean .PHONY: conformance conformance: ## Execute conformance tests. - ./gradlew conformance:conformance + $(GRADLE) conformance:conformance .PHONY: help help: ## Describe useful make targets @@ -37,25 +38,24 @@ help: ## Describe useful make targets .PHONY: generate generate: ## Regenerate code and license headers - ./gradlew generate + $(GRADLE) generate .PHONY: lint lint: ## Lint code - ./gradlew spotlessCheck + $(GRADLE) spotlessCheck .PHONY: lintfix lintfix: ## Applies the lint changes. - ./gradlew spotlessApply + $(GRADLE) spotlessApply .PHONY: release -release: ## Upload artifacts to Sonatype Nexus. - ./gradlew --info publish --stacktrace --no-daemon --no-parallel - ./gradlew --info releaseRepository +release: ## Upload artifacts to Maven Central. + $(GRADLE) --info publishAndReleaseToMavenCentral --stacktrace --no-daemon --no-parallel --no-configuration-cache .PHONY: releaselocal releaselocal: ## Release artifacts to local maven repository. - ./gradlew --info publishToMavenLocal + $(GRADLE) --info publishToMavenLocal .PHONY: test test: ## Run all tests. - ./gradlew test + $(GRADLE) test diff --git a/README.md b/README.md index d617a514..c53285c3 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,57 @@ -# [![The Buf logo](.github/buf-logo.svg)][buf] protovalidate-java +[![The Buf logo](.github/buf-logo.svg)][buf] + +# protovalidate-java [![CI](https://github.com/bufbuild/protovalidate-java/actions/workflows/ci.yaml/badge.svg)](https://github.com/bufbuild/protovalidate-java/actions/workflows/ci.yaml) [![Conformance](https://github.com/bufbuild/protovalidate-java/actions/workflows/conformance.yaml/badge.svg)](https://github.com/bufbuild/protovalidate-java/actions/workflows/conformance.yaml) [![BSR](https://img.shields.io/badge/BSR-Module-0C65EC)][buf-mod] -`protovalidate-java` is the Java language implementation of [`protovalidate`](https://github.com/bufbuild/protovalidate) designed to validate Protobuf messages at runtime based on user-defined validation constraints. Powered by Google's Common Expression Language ([CEL](https://github.com/google/cel-spec)), it provides a flexible and efficient foundation for defining and evaluating custom validation rules. The primary goal of `protovalidate` is to help developers ensure data consistency and integrity across the network without requiring generated code. +[Protovalidate][protovalidate] provides standard annotations to validate common rules on messages and fields, as well as the ability to use [CEL][cel] to write custom rules. It's the next generation of [protoc-gen-validate][protoc-gen-validate], the only widely used validation library for Protobuf. -## The `protovalidate` project +With Protovalidate, you can annotate your Protobuf messages with both standard and custom validation rules: -Head over to the core [`protovalidate`](https://github.com/bufbuild/protovalidate/) repository for: +```protobuf +syntax = "proto3"; -- [The API definition](https://github.com/bufbuild/protovalidate/tree/main/proto/protovalidate/buf/validate/validate.proto): used to describe validation constraints -- [Documentation](https://github.com/bufbuild/protovalidate/tree/main/docs): how to apply `protovalidate` effectively -- [Migration tooling](https://github.com/bufbuild/protovalidate/tree/main/docs/migrate.md): incrementally migrate from `protoc-gen-validate` -- [Conformance testing utilities](https://github.com/bufbuild/protovalidate/tree/main/docs/conformance.md): for acceptance testing of `protovalidate` implementations +package banking.v1; + +import "buf/validate/validate.proto"; -Other `protovalidate` runtime implementations include: +message MoneyTransfer { + string to_account_id = 1 [ + // Standard rule: `to_account_id` must be a UUID + (buf.validate.field).string.uuid = true + ]; -- C++: [`protovalidate-cc`](https://github.com/bufbuild/protovalidate-cc) -- Go: [`protovalidate-go`](https://github.com/bufbuild/protovalidate-go) -- Python: [`protovalidate-python`](https://github.com/bufbuild/protovalidate-python) + string from_account_id = 2 [ + // Standard rule: `from_account_id` must be a UUID + (buf.validate.field).string.uuid = true + ]; -And others coming soon: + // Custom rule: `to_account_id` and `from_account_id` can't be the same. + option (buf.validate.message).cel = { + id: "to_account_id.not.from_account_id" + message: "to_account_id and from_account_id should not be the same value" + expression: "this.to_account_id != this.from_account_id" + }; +} +``` -- TypeScript: `protovalidate-ts` +Once you've added `protovalidate-java` to your project, validation is idiomatic Java: + +```java +ValidationResult result = validator.validate(message); +if (!result.isSuccess()) { + // Handle failure. +} +``` ## Installation -To include `protovalidate-java` in your project, add the following to your build file: +> [!TIP] +> The easiest way to get started with Protovalidate for RPC APIs are the quickstarts in Buf's documentation. There's one available for [Java and gRPC][grpc-java]. + +`protovalidate-java` is listed in [Maven Central][maven], which provides installation snippets for Gradle, Maven, and other package managers. In Gradle, it's: ```gradle dependencies { @@ -35,104 +59,74 @@ dependencies { } ``` -Remember to always check for the latest version of `protovalidate-java` on the project's [GitHub releases page](https://github.com/bufbuild/protovalidate-java/releases) to ensure you're using the most up-to-date version. +## Documentation -## Usage +Comprehensive documentation for Protovalidate is available in [Buf's documentation library][protovalidate]. -### Implementing validation constraints +Highlights for Java developers include: -Validation constraints are defined directly within `.proto` files. Documentation for adding constraints can be found in the `protovalidate` project [README](https://github.com/bufbuild/protovalidate) and its [comprehensive docs](https://github.com/bufbuild/protovalidate/tree/main/docs). +* The [developer quickstart][quickstart] +* A comprehensive RPC quickstart for [Java and gRPC][grpc-java] +* A [migration guide for protoc-gen-validate][migration-guide] users -```protobuf -syntax = "proto3"; +## Additional Languages and Repositories -package my.package; +Protovalidate isn't just for Java! You might be interested in sibling repositories for other languages: -import "google/protobuf/timestamp.proto"; -import "buf/validate/validate.proto"; +- [`protovalidate-go`][pv-go] (Go) +- [`protovalidate-python`][pv-python] (Python) +- [`protovalidate-cc`][pv-cc] (C++) +- [`protovalidate-es`][pv-es] (TypeScript and JavaScript) -message Transaction { - uint64 id = 1 [(buf.validate.field).uint64.gt = 999]; - google.protobuf.Timestamp purchase_date = 2; - google.protobuf.Timestamp delivery_date = 3; - - string price = 4 [(buf.validate.field).cel = { - id: "transaction.price", - message: "price must be positive and include a valid currency symbol ($ or £)", - expression: "(this.startsWith('$') || this.startsWith('£')) && double(this.substring(1)) > 0" - }]; - - option (buf.validate.message).cel = { - id: "transaction.delivery_date", - message: "delivery date must be after purchase date", - expression: "this.delivery_date > this.purchase_date" - }; -} -``` +Additionally, [protovalidate's core repository](https://github.com/bufbuild/protovalidate) provides: -### Example +- [Protovalidate's Protobuf API][validate-proto] +- [Conformance testing utilities][conformance] for acceptance testing of `protovalidate` implementations -In your Java code, create an instance of the `Validator` class and use the `validate` method to validate your messages. -```java -// Import the required packages -package build.buf; - -import build.buf.protovalidate.results.ValidationException; -import build.buf.protovalidate.results.ValidationResult; -import com.my.package.Transaction; -import com.google.protobuf.Timestamp; - -import build.buf.protovalidate.Validator; -import build.buf.protovalidate.Config; - -public class Main { - - // Create timestamps for purchase and delivery date - Timestamp purchaseDate = Timestamp.newBuilder().build(); - Timestamp deliveryDate = Timestamp.newBuilder().build(); - - // Create a transaction object using the Builder pattern - Transaction transaction = - Transaction.newBuilder() - .setId(1234) - .setPrice("$5.67") - .setPurchaseDate(purchaseDate) - .setDeliveryDate(deliveryDate) - .build(); - - // Create a validator object with the default Configuration - Validator validator = new Validator(); - // Validate the transaction object using the validator - try { - ValidationResult result = validator.validate(transaction); - - // Check if there are any validation violations - if (result.getViolations().isEmpty()) { - // No violations, validation successful - System.out.println("Validation succeeded"); - } else { - // Print the violations if any found - System.out.println(result.toString()); - } - } catch (ValidationException e) { - // Catch and print any ValidationExceptions thrown during the validation process - System.out.println("Validation failed: " + e.getMessage()); - } -} -``` +## Contribution + +We genuinely appreciate any help! If you'd like to contribute, check out these resources: + +- [Contributing Guidelines][contributing]: Guidelines to make your contribution process straightforward and meaningful +- [Conformance testing utilities](https://github.com/bufbuild/protovalidate/tree/main/docs/conformance.md): Utilities providing acceptance testing of `protovalidate` implementations -### Ecosystem +## Related Sites -- [`protovalidate`](https://github.com/bufbuild/protovalidate) core repository -- [Buf][buf] -- [CEL Spec][cel-spec] +- [Buf][buf]: Enterprise-grade Kafka and gRPC for the modern age +- [Common Expression Language (CEL)][cel]: The open-source technology at the core of Protovalidate ## Legal Offered under the [Apache 2 license][license]. -[license]: LICENSE [buf]: https://buf.build +[cel]: https://cel.dev + +[pv-go]: https://github.com/bufbuild/protovalidate-go +[pv-java]: https://github.com/bufbuild/protovalidate-java +[pv-python]: https://github.com/bufbuild/protovalidate-python +[pv-cc]: https://github.com/bufbuild/protovalidate-cc +[pv-es]: https://github.com/bufbuild/protovalidate-es + +[license]: LICENSE +[contributing]: .github/CONTRIBUTING.md [buf-mod]: https://buf.build/bufbuild/protovalidate -[cel-spec]: https://github.com/google/cel-spec + +[protoc-gen-validate]: https://github.com/bufbuild/protoc-gen-validate + +[protovalidate]: https://buf.build/docs/protovalidate +[quickstart]: https://buf.build/docs/protovalidate/quickstart/ +[connect-go]: https://buf.build/docs/protovalidate/quickstart/connect-go/ +[grpc-go]: https://buf.build/docs/protovalidate/quickstart/grpc-go/ +[grpc-java]: https://buf.build/docs/protovalidate/quickstart/grpc-java/ +[grpc-python]: https://buf.build/docs/protovalidate/quickstart/grpc-python/ +[migration-guide]: https://buf.build/docs/migration-guides/migrate-from-protoc-gen-validate/ + +[maven]: https://central.sonatype.com/artifact/build.buf/protovalidate/overview +[pkg-go]: https://pkg.go.dev/github.com/bufbuild/protovalidate-go + +[validate-proto]: https://buf.build/bufbuild/protovalidate/docs/main:buf.validate +[conformance]: https://github.com/bufbuild/protovalidate/blob/main/docs/conformance.md +[examples]: https://github.com/bufbuild/protovalidate/tree/main/examples +[migrate]: https://buf.build/docs/migration-guides/migrate-from-protoc-gen-validate/ diff --git a/buf.gen.yaml b/buf.gen.yaml index 0daf2598..629fb708 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,4 +1,5 @@ version: v2 +# clean: true plugins: - - remote: buf.build/protocolbuffers/java:v28.2 - out: src/main/java + - remote: buf.build/protocolbuffers/java:$protocJavaPluginVersion + out: build/generated/sources/bufgen diff --git a/build.gradle.kts b/build.gradle.kts index 4dc6e1ed..2618aa79 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,7 +33,11 @@ if (matchResult != null) { val releaseVersion = project.findProperty("releaseVersion") as String? ?: snapshotVersion val buf: Configuration by configurations.creating -val bufLicenseHeaderCLIFile = project.layout.buildDirectory.file("gobin/license-header").get().asFile +val bufLicenseHeaderCLIFile = + project.layout.buildDirectory + .file("gobin/license-header") + .get() + .asFile val bufLicenseHeaderCLIPath: String = bufLicenseHeaderCLIFile.absolutePath tasks.register("configureBuf") { @@ -60,34 +64,106 @@ tasks.register("licenseHeader") { "--year-range", project.findProperty("license-header.years")!!.toString(), "--ignore", - "src/main/java/build/buf/validate/", + "build/generated/sources/bufgen/", "--ignore", - "conformance/src/main/java/build/buf/validate/conformance/", + "conformance/build/generated/sources/bufgen/", "--ignore", "src/main/resources/buf/validate/", ) } +tasks.register("filterBufGenYaml") { + from(".") + include("buf.gen.yaml", "src/**/buf*gen*.yaml") + includeEmptyDirs = false + into(layout.buildDirectory.dir("buf-gen-templates")) + expand("protocJavaPluginVersion" to "v${libs.versions.protobuf.get().substringAfter('.')}") + filteringCharset = "UTF-8" +} + tasks.register("generateTestSourcesImports") { - dependsOn("exportProtovalidateModule") + dependsOn("exportProtovalidateModule", "filterBufGenYaml") description = "Generates code with buf generate --include-imports for unit tests." commandLine( buf.asPath, "generate", "--template", - "src/test/resources/proto/buf.gen.imports.yaml", + "${layout.buildDirectory.get()}/buf-gen-templates/src/test/resources/proto/buf.gen.imports.yaml", "--include-imports", ) } tasks.register("generateTestSourcesNoImports") { - dependsOn("exportProtovalidateModule") + dependsOn("exportProtovalidateModule", "filterBufGenYaml") description = "Generates code with buf generate --include-imports for unit tests." - commandLine(buf.asPath, "generate", "--template", "src/test/resources/proto/buf.gen.noimports.yaml") + commandLine( + buf.asPath, + "generate", + "--template", + "${layout.buildDirectory.get()}/buf-gen-templates/src/test/resources/proto/buf.gen.noimports.yaml", + ) +} + +tasks.register("generateCelConformance") { + dependsOn("generateCelConformanceTestTypes", "filterBufGenYaml") + description = "Generates CEL conformance code with buf generate for unit tests." + commandLine( + buf.asPath, + "generate", + "--template", + "${layout.buildDirectory.get()}/buf-gen-templates/src/test/resources/proto/buf.gen.cel.yaml", + "buf.build/google/cel-spec:${project.findProperty("cel.spec.version")}", + "--exclude-path", + "cel/expr/conformance/proto2", + "--exclude-path", + "cel/expr/conformance/proto3", + ) } +// The conformance tests use the Protobuf package path for tests that use these types. +// i.e. cel.expr.conformance.proto3.TestAllTypes. But, if we use managed mode it adds 'com' +// to the prefix. Additionally, we can't disable managed mode because the java_package option +// specified in these proto files is "dev.cel.expr.conformance.proto3". So, to get around this, +// we're generating these separately and specifying a java_package override of the package we need. +tasks.register("generateCelConformanceTestTypes") { + dependsOn("exportProtovalidateModule", "filterBufGenYaml") + description = "Generates CEL conformance test types with buf generate for unit tests using a Java package override." + commandLine( + buf.asPath, + "generate", + "--template", + "${layout.buildDirectory.get()}/buf-gen-templates/src/test/resources/proto/buf.gen.cel.testtypes.yaml", + "buf.build/google/cel-spec:${project.findProperty("cel.spec.version")}", + "--path", + "cel/expr/conformance/proto3", + ) +} + +var getCelTestData = + tasks.register("getCelTestData") { + val celVersion = project.findProperty("cel.spec.version") + val fileUrl = "https://raw.githubusercontent.com/google/cel-spec/refs/tags/$celVersion/tests/simple/testdata/string_ext.textproto" + val targetDir = File("${project.projectDir}/src/test/resources/testdata") + val file = File(targetDir, "string_ext_$celVersion.textproto") + + onlyIf { + // Only run curl if file doesn't exist + !file.exists() + } + doFirst { + file.parentFile.mkdirs() + commandLine( + "curl", + "-fsSL", + "-o", + file.absolutePath, + fileUrl, + ) + } + } + tasks.register("generateTestSources") { - dependsOn("generateTestSourcesImports", "generateTestSourcesNoImports") + dependsOn("generateTestSourcesImports", "generateTestSourcesNoImports", "generateCelConformance") description = "Generates code with buf generate for unit tests" } @@ -104,23 +180,9 @@ tasks.register("exportProtovalidateModule") { } tasks.register("generateSources") { - dependsOn("exportProtovalidateModule") - description = "Generates sources for the bufbuild/protovalidate module sources to src/main/java." - commandLine(buf.asPath, "generate", "--template", "buf.gen.yaml", "src/main/resources") -} - -tasks.register("generateConformance") { - dependsOn("configureBuf") - description = "Generates sources for the bufbuild/protovalidate-testing module to conformance/src/main/java." - commandLine( - buf.asPath, - "generate", - "--template", - "conformance/buf.gen.yaml", - "-o", - "conformance/", - "buf.build/bufbuild/protovalidate-testing:${project.findProperty("protovalidate.version")}", - ) + dependsOn("exportProtovalidateModule", "filterBufGenYaml") + description = "Generates sources for the bufbuild/protovalidate module sources to build/generated/sources/bufgen." + commandLine(buf.asPath, "generate", "--template", "${layout.buildDirectory.get()}/buf-gen-templates/buf.gen.yaml", "src/main/resources") } tasks.register("generate") { @@ -128,20 +190,19 @@ tasks.register("generate") { dependsOn( "generateTestSources", "generateSources", - "generateConformance", "licenseHeader", ) } tasks.withType { - dependsOn("generateTestSources") + dependsOn("generate") if (JavaVersion.current().isJava9Compatible) { doFirst { options.compilerArgs = mutableListOf("--release", "8") } } // Disable errorprone on generated code - options.errorprone.excludedPaths.set("(.*/src/main/java/build/buf/validate/.*|.*/build/generated/.*)") + options.errorprone.excludedPaths.set(".*/build/generated/.*") if (!name.lowercase().contains("test")) { options.errorprone { check("NullAway", CheckSeverity.ERROR) @@ -169,6 +230,11 @@ buildscript { } sourceSets { + main { + java { + srcDir(layout.buildDirectory.dir("generated/sources/bufgen")) + } + } test { java { srcDir(layout.buildDirectory.dir("generated/test-sources/bufgen")) @@ -179,7 +245,7 @@ sourceSets { apply(plugin = "com.diffplug.spotless") configure { java { - targetExclude("src/main/java/build/buf/validate/**/*.java", "build/generated/test-sources/bufgen/**/*.java") + targetExclude("build/generated/sources/bufgen/build/buf/validate/**/*.java", "build/generated/test-sources/bufgen/**/*.java") } kotlinGradle { ktlint() @@ -212,13 +278,21 @@ allprojects { } } tasks.withType().configureEach { + dependsOn(getCelTestData) useJUnitPlatform() + this.testLogging { + events("failed") + exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + showExceptions = true + showCauses = true + showStackTraces = true + } } } mavenPublishing { val isAutoReleased = project.hasProperty("signingInMemoryKey") - publishToMavenCentral(SonatypeHost.S01) + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true) if (isAutoReleased) { signAllPublications() } @@ -263,19 +337,17 @@ mavenPublishing { dependencies { annotationProcessor(libs.nullaway) + api(libs.jspecify) api(libs.protobuf.java) - implementation(enforcedPlatform(libs.cel)) - implementation(libs.cel.core) - implementation(libs.guava) - implementation(libs.ipaddress) - implementation(libs.jakarta.mail.api) + implementation(libs.cel) buf("build.buf:buf:${libs.versions.buf.get()}:${osdetector.classifier}@exe") testImplementation(libs.assertj) + testImplementation(libs.grpc.protobuf) testImplementation(platform(libs.junit.bom)) testImplementation("org.junit.jupiter:junit-jupiter") testRuntimeOnly("org.junit.platform:junit-platform-launcher") - errorprone(libs.errorprone) + errorprone(libs.errorprone.core) } diff --git a/conformance/buf.gen.yaml b/conformance/buf.gen.yaml index e5242e4a..aafad4c4 100644 --- a/conformance/buf.gen.yaml +++ b/conformance/buf.gen.yaml @@ -1,9 +1,10 @@ version: v2 +clean: true managed: enabled: true override: - file_option: java_package_prefix value: build plugins: - - remote: buf.build/protocolbuffers/java:v28.2 - out: src/main/java + - remote: buf.build/protocolbuffers/java:$protocJavaPluginVersion + out: build/generated/sources/bufgen diff --git a/conformance/build.gradle.kts b/conformance/build.gradle.kts index e9c93213..7ee5cd51 100644 --- a/conformance/build.gradle.kts +++ b/conformance/build.gradle.kts @@ -7,11 +7,33 @@ plugins { application java alias(libs.plugins.errorprone) + alias(libs.plugins.osdetector) } -val conformanceCLIFile = project.layout.buildDirectory.file("gobin/protovalidate-conformance").get().asFile +// Conformance tests aren't bound by lowest common library version. +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} + +val buf: Configuration by configurations.creating + +tasks.register("configureBuf") { + description = "Installs the Buf CLI." + File(buf.asPath).setExecutable(true) +} + +val conformanceCLIFile = + project.layout.buildDirectory + .file("gobin/protovalidate-conformance") + .get() + .asFile val conformanceCLIPath: String = conformanceCLIFile.absolutePath -val conformanceAppScript: String = project.layout.buildDirectory.file("install/conformance/bin/conformance").get().asFile.absolutePath +val conformanceAppScript: String = + project.layout.buildDirectory + .file("install/conformance/bin/conformance") + .get() + .asFile.absolutePath val conformanceArgs = (project.findProperty("protovalidate.conformance.args")?.toString() ?: "").split("\\s+".toRegex()) tasks.register("installProtovalidateConformance") { @@ -31,14 +53,44 @@ tasks.register("conformance") { commandLine(*(listOf(conformanceCLIPath) + conformanceArgs + listOf(conformanceAppScript)).toTypedArray()) } +tasks.register("filterBufGenYaml") { + from(".") + include("buf.gen.yaml") + includeEmptyDirs = false + into(layout.buildDirectory.dir("buf-gen-templates")) + expand("protocJavaPluginVersion" to "v${libs.versions.protobuf.get().substringAfter('.')}") + filteringCharset = "UTF-8" +} + +tasks.register("generateConformance") { + dependsOn("configureBuf", "filterBufGenYaml") + description = "Generates sources for the bufbuild/protovalidate-testing module to build/generated/sources/bufgen." + commandLine( + buf.asPath, + "generate", + "--template", + "${layout.buildDirectory.get()}/buf-gen-templates/buf.gen.yaml", + "buf.build/bufbuild/protovalidate-testing:${project.findProperty("protovalidate.version")}", + ) +} + +sourceSets { + main { + java { + srcDir(layout.buildDirectory.dir("generated/sources/bufgen")) + } + } +} + tasks.withType { + dependsOn("generateConformance") if (JavaVersion.current().isJava9Compatible) { doFirst { options.compilerArgs = mutableListOf("--release", "8") } } // Disable errorprone on generated code - options.errorprone.excludedPaths.set(".*/src/main/java/build/buf/validate/conformance/.*") + options.errorprone.excludedPaths.set(".*/build/generated/sources/bufgen/.*") } // Disable javadoc for conformance tests @@ -62,7 +114,8 @@ tasks { // files or particular types at will val sourcesMain = sourceSets.main.get() val contents = - configurations.runtimeClasspath.get() + configurations.runtimeClasspath + .get() .map { if (it.isDirectory) it else zipTree(it) } + sourcesMain.output from(contents) @@ -72,19 +125,22 @@ tasks { apply(plugin = "com.diffplug.spotless") configure { java { - targetExclude("src/main/java/build/buf/validate/**/*.java") + targetExclude("build/generated/sources/bufgen/**/*.java") } } dependencies { implementation(project(":")) - implementation(libs.guava) + implementation(libs.errorprone.annotations) implementation(libs.protobuf.java) implementation(libs.assertj) implementation(platform(libs.junit.bom)) + + buf("build.buf:buf:${libs.versions.buf.get()}:${osdetector.classifier}@exe") + testImplementation("org.junit.jupiter:junit-jupiter") testRuntimeOnly("org.junit.platform:junit-platform-launcher") - errorprone(libs.errorprone) + errorprone(libs.errorprone.core) } diff --git a/conformance/expected-failures.yaml b/conformance/expected-failures.yaml new file mode 100644 index 00000000..e69de29b diff --git a/conformance/src/main/java/build/.DS_Store b/conformance/src/main/java/build/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f17940234ba9b8c2694e83806d587a6e07ed9d52 GIT binary patch literal 6148 zcmeHKJ5Iwu5S<|@EFnZn%DqBvU?L+9kP9FaK1CwCN$-x5D{vZ0PQoF0^8p-Lq@;j1 z((Loj%-fY;;qi!wuJ)Uy$U;OaxS>4RGBwMaPwXTkbD-K8%k^!y>nC-`0>+(5D|@-$ zK8*SO`*&v7HBGziT12Yrv%BZ>x7W*Yc5@`#KaNj*0gXllr~nn90#x8%D}bJDR-FcN zr2tP_Vo|8!vS5ddhv@osqbSprxr0IU;-Ktx~~RA5jwM+^-*;w9_q z#33-~qJA^Z$(uDN6!qH?FJ3NM2XdtXRNzp7S!@^9|F7Ub%>RcZ?x+A2_)`k#yjeFZ zyi)eo$;(-a}{bi|zw C;U=R1 literal 0 HcmV?d00001 diff --git a/conformance/src/main/java/build/buf/protovalidate/conformance/FileDescriptorUtil.java b/conformance/src/main/java/build/buf/protovalidate/conformance/FileDescriptorUtil.java index b6a0d881..7a26f911 100644 --- a/conformance/src/main/java/build/buf/protovalidate/conformance/FileDescriptorUtil.java +++ b/conformance/src/main/java/build/buf/protovalidate/conformance/FileDescriptorUtil.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/conformance/src/main/java/build/buf/protovalidate/conformance/Main.java b/conformance/src/main/java/build/buf/protovalidate/conformance/Main.java index 474a701a..63f5c179 100644 --- a/conformance/src/main/java/build/buf/protovalidate/conformance/Main.java +++ b/conformance/src/main/java/build/buf/protovalidate/conformance/Main.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,15 +17,14 @@ import build.buf.protovalidate.Config; import build.buf.protovalidate.ValidationResult; import build.buf.protovalidate.Validator; +import build.buf.protovalidate.ValidatorFactory; import build.buf.protovalidate.exceptions.CompilationException; import build.buf.protovalidate.exceptions.ExecutionException; import build.buf.validate.ValidateProto; -import build.buf.validate.Violation; import build.buf.validate.Violations; import build.buf.validate.conformance.harness.TestConformanceRequest; import build.buf.validate.conformance.harness.TestConformanceResponse; import build.buf.validate.conformance.harness.TestResult; -import com.google.common.base.Splitter; import com.google.errorprone.annotations.FormatMethod; import com.google.protobuf.Any; import com.google.protobuf.ByteString; @@ -35,7 +34,6 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.TypeRegistry; import java.util.HashMap; -import java.util.List; import java.util.Map; public class Main { @@ -63,12 +61,13 @@ static TestConformanceResponse testConformance(TestConformanceRequest request) { TypeRegistry typeRegistry = FileDescriptorUtil.createTypeRegistry(fileDescriptorMap.values()); ExtensionRegistry extensionRegistry = FileDescriptorUtil.createExtensionRegistry(fileDescriptorMap.values()); - Validator validator = - new Validator( - Config.newBuilder() - .setTypeRegistry(typeRegistry) - .setExtensionRegistry(extensionRegistry) - .build()); + Config cfg = + Config.newBuilder() + .setTypeRegistry(typeRegistry) + .setExtensionRegistry(extensionRegistry) + .build(); + Validator validator = ValidatorFactory.newBuilder().withConfig(cfg).build(); + TestConformanceResponse.Builder responseBuilder = TestConformanceResponse.newBuilder(); Map resultsMap = new HashMap<>(); for (Map.Entry entry : request.getCasesMap().entrySet()) { @@ -85,8 +84,11 @@ static TestConformanceResponse testConformance(TestConformanceRequest request) { static TestResult testCase( Validator validator, Map fileDescriptors, Any testCase) throws InvalidProtocolBufferException { - List urlParts = Splitter.on('/').limit(2).splitToList(testCase.getTypeUrl()); - String fullName = urlParts.get(urlParts.size() - 1); + String fullName = testCase.getTypeUrl(); + int slash = fullName.indexOf('/'); + if (slash != -1) { + fullName = fullName.substring(slash + 1); + } Descriptors.Descriptor descriptor = fileDescriptors.get(fullName); if (descriptor == null) { return unexpectedErrorResult("Unable to find descriptor: %s", fullName); @@ -100,11 +102,11 @@ static TestResult testCase( private static TestResult validate(Validator validator, DynamicMessage dynamicMessage) { try { ValidationResult result = validator.validate(dynamicMessage); - List violations = result.getViolations(); - if (violations.isEmpty()) { + if (result.isSuccess()) { return TestResult.newBuilder().setSuccess(true).build(); } - Violations error = Violations.newBuilder().addAllViolations(violations).build(); + Violations error = + Violations.newBuilder().addAllViolations(result.toProto().getViolationsList()).build(); return TestResult.newBuilder().setValidationError(error).build(); } catch (CompilationException e) { return TestResult.newBuilder().setCompilationError(e.getMessage()).build(); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnEnum.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnEnum.java deleted file mode 100644 index 65af7adb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnEnum.java +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf enum {@code buf.validate.conformance.cases.AnEnum} - */ -public enum AnEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * AN_ENUM_UNSPECIFIED = 0; - */ - AN_ENUM_UNSPECIFIED(0), - /** - * AN_ENUM_X = 1; - */ - AN_ENUM_X(1), - /** - * AN_ENUM_Y = 2; - */ - AN_ENUM_Y(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnEnum.class.getName()); - } - /** - * AN_ENUM_UNSPECIFIED = 0; - */ - public static final int AN_ENUM_UNSPECIFIED_VALUE = 0; - /** - * AN_ENUM_X = 1; - */ - public static final int AN_ENUM_X_VALUE = 1; - /** - * AN_ENUM_Y = 2; - */ - public static final int AN_ENUM_Y_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AnEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AnEnum forNumber(int value) { - switch (value) { - case 0: return AN_ENUM_UNSPECIFIED; - case 1: return AN_ENUM_X; - case 2: return AN_ENUM_Y; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AnEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AnEnum findValueByNumber(int number) { - return AnEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.getDescriptor().getEnumTypes().get(0); - } - - private static final AnEnum[] VALUES = values(); - - public static AnEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AnEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.AnEnum) -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyIn.java deleted file mode 100644 index 31458316..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyIn.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.AnyIn} - */ -public final class AnyIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.AnyIn) - AnyInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnyIn.class.getName()); - } - // Use AnyIn.newBuilder() to construct. - private AnyIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AnyIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyIn.class, build.buf.validate.conformance.cases.AnyIn.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Any val_; - /** - * .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Any getVal() { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Any.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.AnyIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.AnyIn other = (build.buf.validate.conformance.cases.AnyIn) 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.AnyIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyIn 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.AnyIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyIn 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.AnyIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyIn 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.AnyIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.AnyIn 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.AnyIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.AnyIn 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.AnyIn 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.AnyIn 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.AnyIn 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.AnyIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.AnyIn) - build.buf.validate.conformance.cases.AnyInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyIn.class, build.buf.validate.conformance.cases.AnyIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.AnyIn.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.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.AnyIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyIn build() { - build.buf.validate.conformance.cases.AnyIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyIn buildPartial() { - build.buf.validate.conformance.cases.AnyIn result = new build.buf.validate.conformance.cases.AnyIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.AnyIn 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.AnyIn) { - return mergeFrom((build.buf.validate.conformance.cases.AnyIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.AnyIn other) { - if (other == build.buf.validate.conformance.cases.AnyIn.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.Any val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valBuilder_; - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Any getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Any.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Any.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.AnyIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.AnyIn) - private static final build.buf.validate.conformance.cases.AnyIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.AnyIn(); - } - - public static build.buf.validate.conformance.cases.AnyIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnyIn 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.AnyIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyInOrBuilder.java deleted file mode 100644 index ec6eaaef..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyInOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface AnyInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.AnyIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Any getVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.AnyOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNone.java deleted file mode 100644 index 4a67938e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNone.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.AnyNone} - */ -public final class AnyNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.AnyNone) - AnyNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnyNone.class.getName()); - } - // Use AnyNone.newBuilder() to construct. - private AnyNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AnyNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyNone.class, build.buf.validate.conformance.cases.AnyNone.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Any val_; - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Any getVal() { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Any.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.AnyNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.AnyNone other = (build.buf.validate.conformance.cases.AnyNone) 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.AnyNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyNone 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.AnyNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyNone 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.AnyNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyNone 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.AnyNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.AnyNone 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.AnyNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.AnyNone 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.AnyNone 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.AnyNone 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.AnyNone 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.AnyNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.AnyNone) - build.buf.validate.conformance.cases.AnyNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyNone.class, build.buf.validate.conformance.cases.AnyNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.AnyNone.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.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.AnyNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyNone build() { - build.buf.validate.conformance.cases.AnyNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyNone buildPartial() { - build.buf.validate.conformance.cases.AnyNone result = new build.buf.validate.conformance.cases.AnyNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.AnyNone 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.AnyNone) { - return mergeFrom((build.buf.validate.conformance.cases.AnyNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.AnyNone other) { - if (other == build.buf.validate.conformance.cases.AnyNone.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.Any val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valBuilder_; - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - * @return The val. - */ - public com.google.protobuf.Any getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - public Builder setVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - public Builder setVal( - com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - public Builder mergeVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Any.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - public com.google.protobuf.Any.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Any.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.AnyNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.AnyNone) - private static final build.buf.validate.conformance.cases.AnyNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.AnyNone(); - } - - public static build.buf.validate.conformance.cases.AnyNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnyNone 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.AnyNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNoneOrBuilder.java deleted file mode 100644 index fb0d63b3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNoneOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface AnyNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.AnyNone) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - * @return The val. - */ - com.google.protobuf.Any getVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val"]; - */ - com.google.protobuf.AnyOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotIn.java deleted file mode 100644 index 474f3609..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotIn.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.AnyNotIn} - */ -public final class AnyNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.AnyNotIn) - AnyNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnyNotIn.class.getName()); - } - // Use AnyNotIn.newBuilder() to construct. - private AnyNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AnyNotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyNotIn.class, build.buf.validate.conformance.cases.AnyNotIn.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Any val_; - /** - * .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Any getVal() { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Any.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.AnyNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.AnyNotIn other = (build.buf.validate.conformance.cases.AnyNotIn) 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.AnyNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyNotIn 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.AnyNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyNotIn 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.AnyNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyNotIn 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.AnyNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.AnyNotIn 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.AnyNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.AnyNotIn 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.AnyNotIn 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.AnyNotIn 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.AnyNotIn 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.AnyNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.AnyNotIn) - build.buf.validate.conformance.cases.AnyNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyNotIn.class, build.buf.validate.conformance.cases.AnyNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.AnyNotIn.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.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.AnyNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyNotIn build() { - build.buf.validate.conformance.cases.AnyNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyNotIn buildPartial() { - build.buf.validate.conformance.cases.AnyNotIn result = new build.buf.validate.conformance.cases.AnyNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.AnyNotIn 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.AnyNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.AnyNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.AnyNotIn other) { - if (other == build.buf.validate.conformance.cases.AnyNotIn.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.Any val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valBuilder_; - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Any getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Any.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Any.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.AnyNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.AnyNotIn) - private static final build.buf.validate.conformance.cases.AnyNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.AnyNotIn(); - } - - public static build.buf.validate.conformance.cases.AnyNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnyNotIn 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.AnyNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotInOrBuilder.java deleted file mode 100644 index 83e6f104..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyNotInOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface AnyNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.AnyNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Any getVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.AnyOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequired.java deleted file mode 100644 index 76af5307..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequired.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.AnyRequired} - */ -public final class AnyRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.AnyRequired) - AnyRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnyRequired.class.getName()); - } - // Use AnyRequired.newBuilder() to construct. - private AnyRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AnyRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyRequired.class, build.buf.validate.conformance.cases.AnyRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Any val_; - /** - * .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Any getVal() { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Any.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.AnyRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.AnyRequired other = (build.buf.validate.conformance.cases.AnyRequired) 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.AnyRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyRequired 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.AnyRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyRequired 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.AnyRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.AnyRequired 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.AnyRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.AnyRequired 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.AnyRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.AnyRequired 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.AnyRequired 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.AnyRequired 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.AnyRequired 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.AnyRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.AnyRequired) - build.buf.validate.conformance.cases.AnyRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.AnyRequired.class, build.buf.validate.conformance.cases.AnyRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.AnyRequired.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.WktAnyProto.internal_static_buf_validate_conformance_cases_AnyRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.AnyRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyRequired build() { - build.buf.validate.conformance.cases.AnyRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.AnyRequired buildPartial() { - build.buf.validate.conformance.cases.AnyRequired result = new build.buf.validate.conformance.cases.AnyRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.AnyRequired 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.AnyRequired) { - return mergeFrom((build.buf.validate.conformance.cases.AnyRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.AnyRequired other) { - if (other == build.buf.validate.conformance.cases.AnyRequired.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.Any val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valBuilder_; - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Any getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Any.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Any.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.AnyOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Any.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.AnyRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.AnyRequired) - private static final build.buf.validate.conformance.cases.AnyRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.AnyRequired(); - } - - public static build.buf.validate.conformance.cases.AnyRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnyRequired 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.AnyRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequiredOrBuilder.java deleted file mode 100644 index c712e233..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/AnyRequiredOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface AnyRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.AnyRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Any getVal(); - /** - * .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.AnyOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalse.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalse.java deleted file mode 100644 index bd5665ca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalse.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BoolConstFalse} - */ -public final class BoolConstFalse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BoolConstFalse) - BoolConstFalseOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BoolConstFalse.class.getName()); - } - // Use BoolConstFalse.newBuilder() to construct. - private BoolConstFalse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BoolConstFalse() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstFalse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstFalse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolConstFalse.class, build.buf.validate.conformance.cases.BoolConstFalse.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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 (val_ != false) { - output.writeBool(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, val_); - } - 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.BoolConstFalse)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BoolConstFalse other = (build.buf.validate.conformance.cases.BoolConstFalse) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.BoolConstFalse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolConstFalse 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.BoolConstFalse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolConstFalse 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.BoolConstFalse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolConstFalse 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.BoolConstFalse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BoolConstFalse 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.BoolConstFalse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BoolConstFalse 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.BoolConstFalse 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.BoolConstFalse 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.BoolConstFalse 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.BoolConstFalse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BoolConstFalse) - build.buf.validate.conformance.cases.BoolConstFalseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstFalse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstFalse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolConstFalse.class, build.buf.validate.conformance.cases.BoolConstFalse.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BoolConstFalse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstFalse_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolConstFalse getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BoolConstFalse.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolConstFalse build() { - build.buf.validate.conformance.cases.BoolConstFalse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolConstFalse buildPartial() { - build.buf.validate.conformance.cases.BoolConstFalse result = new build.buf.validate.conformance.cases.BoolConstFalse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BoolConstFalse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BoolConstFalse) { - return mergeFrom((build.buf.validate.conformance.cases.BoolConstFalse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BoolConstFalse other) { - if (other == build.buf.validate.conformance.cases.BoolConstFalse.getDefaultInstance()) return this; - if (other.getVal() != false) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BoolConstFalse) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BoolConstFalse) - private static final build.buf.validate.conformance.cases.BoolConstFalse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BoolConstFalse(); - } - - public static build.buf.validate.conformance.cases.BoolConstFalse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoolConstFalse 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.BoolConstFalse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalseOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalseOrBuilder.java deleted file mode 100644 index 9464a3a4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstFalseOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BoolConstFalseOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BoolConstFalse) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrue.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrue.java deleted file mode 100644 index 8706d3e8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrue.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BoolConstTrue} - */ -public final class BoolConstTrue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BoolConstTrue) - BoolConstTrueOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BoolConstTrue.class.getName()); - } - // Use BoolConstTrue.newBuilder() to construct. - private BoolConstTrue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BoolConstTrue() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstTrue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstTrue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolConstTrue.class, build.buf.validate.conformance.cases.BoolConstTrue.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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 (val_ != false) { - output.writeBool(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, val_); - } - 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.BoolConstTrue)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BoolConstTrue other = (build.buf.validate.conformance.cases.BoolConstTrue) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.BoolConstTrue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolConstTrue 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.BoolConstTrue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolConstTrue 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.BoolConstTrue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolConstTrue 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.BoolConstTrue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BoolConstTrue 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.BoolConstTrue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BoolConstTrue 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.BoolConstTrue 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.BoolConstTrue 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.BoolConstTrue 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.BoolConstTrue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BoolConstTrue) - build.buf.validate.conformance.cases.BoolConstTrueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstTrue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstTrue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolConstTrue.class, build.buf.validate.conformance.cases.BoolConstTrue.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BoolConstTrue.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolConstTrue_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolConstTrue getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BoolConstTrue.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolConstTrue build() { - build.buf.validate.conformance.cases.BoolConstTrue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolConstTrue buildPartial() { - build.buf.validate.conformance.cases.BoolConstTrue result = new build.buf.validate.conformance.cases.BoolConstTrue(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BoolConstTrue result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BoolConstTrue) { - return mergeFrom((build.buf.validate.conformance.cases.BoolConstTrue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BoolConstTrue other) { - if (other == build.buf.validate.conformance.cases.BoolConstTrue.getDefaultInstance()) return this; - if (other.getVal() != false) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BoolConstTrue) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BoolConstTrue) - private static final build.buf.validate.conformance.cases.BoolConstTrue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BoolConstTrue(); - } - - public static build.buf.validate.conformance.cases.BoolConstTrue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoolConstTrue 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.BoolConstTrue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrueOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrueOrBuilder.java deleted file mode 100644 index 3be462eb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolConstTrueOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BoolConstTrueOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BoolConstTrue) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolExample.java deleted file mode 100644 index 8d3fa5bd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolExample.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BoolExample} - */ -public final class BoolExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BoolExample) - BoolExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BoolExample.class.getName()); - } - // Use BoolExample.newBuilder() to construct. - private BoolExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BoolExample() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolExample.class, build.buf.validate.conformance.cases.BoolExample.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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 (val_ != false) { - output.writeBool(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, val_); - } - 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.BoolExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BoolExample other = (build.buf.validate.conformance.cases.BoolExample) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.BoolExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolExample 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.BoolExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolExample 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.BoolExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolExample 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.BoolExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BoolExample 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.BoolExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BoolExample 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.BoolExample 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.BoolExample 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.BoolExample 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.BoolExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BoolExample) - build.buf.validate.conformance.cases.BoolExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolExample.class, build.buf.validate.conformance.cases.BoolExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BoolExample.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BoolExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolExample build() { - build.buf.validate.conformance.cases.BoolExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolExample buildPartial() { - build.buf.validate.conformance.cases.BoolExample result = new build.buf.validate.conformance.cases.BoolExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BoolExample result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BoolExample) { - return mergeFrom((build.buf.validate.conformance.cases.BoolExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BoolExample other) { - if (other == build.buf.validate.conformance.cases.BoolExample.getDefaultInstance()) return this; - if (other.getVal() != false) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BoolExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BoolExample) - private static final build.buf.validate.conformance.cases.BoolExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BoolExample(); - } - - public static build.buf.validate.conformance.cases.BoolExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoolExample 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.BoolExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolExampleOrBuilder.java deleted file mode 100644 index cdd4b37c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BoolExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BoolExample) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolNone.java deleted file mode 100644 index b510ce54..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolNone.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BoolNone} - */ -public final class BoolNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BoolNone) - BoolNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BoolNone.class.getName()); - } - // Use BoolNone.newBuilder() to construct. - private BoolNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BoolNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolNone.class, build.buf.validate.conformance.cases.BoolNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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 (val_ != false) { - output.writeBool(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, val_); - } - 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.BoolNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BoolNone other = (build.buf.validate.conformance.cases.BoolNone) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.BoolNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolNone 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.BoolNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolNone 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.BoolNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BoolNone 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.BoolNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BoolNone 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.BoolNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BoolNone 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.BoolNone 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.BoolNone 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.BoolNone 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.BoolNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BoolNone) - build.buf.validate.conformance.cases.BoolNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BoolNone.class, build.buf.validate.conformance.cases.BoolNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BoolNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BoolProto.internal_static_buf_validate_conformance_cases_BoolNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BoolNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolNone build() { - build.buf.validate.conformance.cases.BoolNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BoolNone buildPartial() { - build.buf.validate.conformance.cases.BoolNone result = new build.buf.validate.conformance.cases.BoolNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BoolNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BoolNone) { - return mergeFrom((build.buf.validate.conformance.cases.BoolNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BoolNone other) { - if (other == build.buf.validate.conformance.cases.BoolNone.getDefaultInstance()) return this; - if (other.getVal() != false) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BoolNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BoolNone) - private static final build.buf.validate.conformance.cases.BoolNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BoolNone(); - } - - public static build.buf.validate.conformance.cases.BoolNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoolNone 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.BoolNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolNoneOrBuilder.java deleted file mode 100644 index acaf79ee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolNoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BoolNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BoolNone) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val"]; - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BoolProto.java deleted file mode 100644 index 8b84bb70..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BoolProto.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bool.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class BoolProto { - private BoolProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BoolProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BoolNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BoolNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BoolConstTrue_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BoolConstTrue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BoolConstFalse_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BoolConstFalse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BoolExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BoolExample_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)buf/validate/conformance/cases/bool.pr" + - "oto\022\036buf.validate.conformance.cases\032\033buf" + - "/validate/validate.proto\"\034\n\010BoolNone\022\020\n\003" + - "val\030\001 \001(\010R\003val\"*\n\rBoolConstTrue\022\031\n\003val\030\001" + - " \001(\010B\007\272H\004j\002\010\001R\003val\"+\n\016BoolConstFalse\022\031\n\003" + - "val\030\001 \001(\010B\007\272H\004j\002\010\000R\003val\"(\n\013BoolExample\022\031" + - "\n\003val\030\001 \001(\010B\007\272H\004j\002\020\001R\003valB\315\001\n$build.buf." + - "validate.conformance.casesB\tBoolProtoP\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\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_BoolNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_BoolNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BoolNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BoolConstTrue_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_BoolConstTrue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BoolConstTrue_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BoolConstFalse_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_BoolConstFalse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BoolConstFalse_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BoolExample_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_BoolExample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BoolExample_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesConst.java deleted file mode 100644 index 9730c55d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesConst.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesConst} - */ -public final class BytesConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesConst) - BytesConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesConst.class.getName()); - } - // Use BytesConst.newBuilder() to construct. - private BytesConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesConst() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesConst.class, build.buf.validate.conformance.cases.BytesConst.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesConst other = (build.buf.validate.conformance.cases.BytesConst) obj; - - 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(); - 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.BytesConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesConst 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.BytesConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesConst 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.BytesConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesConst 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.BytesConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesConst 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.BytesConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesConst 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.BytesConst 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.BytesConst 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.BytesConst 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.BytesConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesConst) - build.buf.validate.conformance.cases.BytesConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesConst.class, build.buf.validate.conformance.cases.BytesConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesConst.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesConst build() { - build.buf.validate.conformance.cases.BytesConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesConst buildPartial() { - build.buf.validate.conformance.cases.BytesConst result = new build.buf.validate.conformance.cases.BytesConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesConst result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesConst) { - return mergeFrom((build.buf.validate.conformance.cases.BytesConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesConst other) { - if (other == build.buf.validate.conformance.cases.BytesConst.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesConst) - private static final build.buf.validate.conformance.cases.BytesConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesConst(); - } - - public static build.buf.validate.conformance.cases.BytesConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesConst 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.BytesConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesConstOrBuilder.java deleted file mode 100644 index 1c16be73..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesConst) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesContains.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesContains.java deleted file mode 100644 index a1a9f437..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesContains.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesContains} - */ -public final class BytesContains extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesContains) - BytesContainsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesContains.class.getName()); - } - // Use BytesContains.newBuilder() to construct. - private BytesContains(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesContains() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesContains_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesContains_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesContains.class, build.buf.validate.conformance.cases.BytesContains.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesContains)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesContains other = (build.buf.validate.conformance.cases.BytesContains) obj; - - 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(); - 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.BytesContains parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesContains 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.BytesContains parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesContains 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.BytesContains parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesContains 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.BytesContains parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesContains 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.BytesContains parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesContains 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.BytesContains 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.BytesContains 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.BytesContains 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.BytesContains} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesContains) - build.buf.validate.conformance.cases.BytesContainsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesContains_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesContains_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesContains.class, build.buf.validate.conformance.cases.BytesContains.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesContains.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesContains_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesContains getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesContains.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesContains build() { - build.buf.validate.conformance.cases.BytesContains result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesContains buildPartial() { - build.buf.validate.conformance.cases.BytesContains result = new build.buf.validate.conformance.cases.BytesContains(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesContains result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesContains) { - return mergeFrom((build.buf.validate.conformance.cases.BytesContains)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesContains other) { - if (other == build.buf.validate.conformance.cases.BytesContains.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesContains) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesContains) - private static final build.buf.validate.conformance.cases.BytesContains DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesContains(); - } - - public static build.buf.validate.conformance.cases.BytesContains getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesContains 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.BytesContains getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesContainsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesContainsOrBuilder.java deleted file mode 100644 index 90833cee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesContainsOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesContainsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesContains) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLen.java deleted file mode 100644 index 61de2d8d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLen.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesEqualMinMaxLen} - */ -public final class BytesEqualMinMaxLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesEqualMinMaxLen) - BytesEqualMinMaxLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesEqualMinMaxLen.class.getName()); - } - // Use BytesEqualMinMaxLen.newBuilder() to construct. - private BytesEqualMinMaxLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesEqualMinMaxLen() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesEqualMinMaxLen.class, build.buf.validate.conformance.cases.BytesEqualMinMaxLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesEqualMinMaxLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesEqualMinMaxLen other = (build.buf.validate.conformance.cases.BytesEqualMinMaxLen) obj; - - 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(); - 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.BytesEqualMinMaxLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen 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.BytesEqualMinMaxLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesEqualMinMaxLen) - build.buf.validate.conformance.cases.BytesEqualMinMaxLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesEqualMinMaxLen.class, build.buf.validate.conformance.cases.BytesEqualMinMaxLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesEqualMinMaxLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesEqualMinMaxLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesEqualMinMaxLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesEqualMinMaxLen build() { - build.buf.validate.conformance.cases.BytesEqualMinMaxLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesEqualMinMaxLen buildPartial() { - build.buf.validate.conformance.cases.BytesEqualMinMaxLen result = new build.buf.validate.conformance.cases.BytesEqualMinMaxLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesEqualMinMaxLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesEqualMinMaxLen) { - return mergeFrom((build.buf.validate.conformance.cases.BytesEqualMinMaxLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesEqualMinMaxLen other) { - if (other == build.buf.validate.conformance.cases.BytesEqualMinMaxLen.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesEqualMinMaxLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesEqualMinMaxLen) - private static final build.buf.validate.conformance.cases.BytesEqualMinMaxLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesEqualMinMaxLen(); - } - - public static build.buf.validate.conformance.cases.BytesEqualMinMaxLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesEqualMinMaxLen 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.BytesEqualMinMaxLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLenOrBuilder.java deleted file mode 100644 index 694df730..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesEqualMinMaxLenOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesEqualMinMaxLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesEqualMinMaxLen) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesExample.java deleted file mode 100644 index 6dec6202..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesExample.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesExample} - */ -public final class BytesExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesExample) - BytesExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesExample.class.getName()); - } - // Use BytesExample.newBuilder() to construct. - private BytesExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesExample() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesExample.class, build.buf.validate.conformance.cases.BytesExample.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesExample other = (build.buf.validate.conformance.cases.BytesExample) obj; - - 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(); - 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.BytesExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesExample 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.BytesExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesExample 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.BytesExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesExample 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.BytesExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesExample 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.BytesExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesExample 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.BytesExample 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.BytesExample 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.BytesExample 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.BytesExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesExample) - build.buf.validate.conformance.cases.BytesExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesExample.class, build.buf.validate.conformance.cases.BytesExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesExample.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesExample build() { - build.buf.validate.conformance.cases.BytesExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesExample buildPartial() { - build.buf.validate.conformance.cases.BytesExample result = new build.buf.validate.conformance.cases.BytesExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesExample result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesExample) { - return mergeFrom((build.buf.validate.conformance.cases.BytesExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesExample other) { - if (other == build.buf.validate.conformance.cases.BytesExample.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesExample) - private static final build.buf.validate.conformance.cases.BytesExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesExample(); - } - - public static build.buf.validate.conformance.cases.BytesExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesExample 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.BytesExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesExampleOrBuilder.java deleted file mode 100644 index 98d2d760..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesExample) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIP.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIP.java deleted file mode 100644 index 375e071b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIP.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesIP} - */ -public final class BytesIP extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesIP) - BytesIPOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesIP.class.getName()); - } - // Use BytesIP.newBuilder() to construct. - private BytesIP(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesIP() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIP.class, build.buf.validate.conformance.cases.BytesIP.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesIP)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesIP other = (build.buf.validate.conformance.cases.BytesIP) obj; - - 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(); - 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.BytesIP parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIP 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.BytesIP parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIP 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.BytesIP parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIP 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.BytesIP parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesIP 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.BytesIP parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesIP 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.BytesIP 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.BytesIP 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.BytesIP 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.BytesIP} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesIP) - build.buf.validate.conformance.cases.BytesIPOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIP.class, build.buf.validate.conformance.cases.BytesIP.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesIP.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIP_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIP getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesIP.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIP build() { - build.buf.validate.conformance.cases.BytesIP result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIP buildPartial() { - build.buf.validate.conformance.cases.BytesIP result = new build.buf.validate.conformance.cases.BytesIP(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesIP result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesIP) { - return mergeFrom((build.buf.validate.conformance.cases.BytesIP)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesIP other) { - if (other == build.buf.validate.conformance.cases.BytesIP.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesIP) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesIP) - private static final build.buf.validate.conformance.cases.BytesIP DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesIP(); - } - - public static build.buf.validate.conformance.cases.BytesIP getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesIP 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.BytesIP getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPOrBuilder.java deleted file mode 100644 index ab2d9d85..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesIPOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesIP) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4.java deleted file mode 100644 index c65c47da..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesIPv4} - */ -public final class BytesIPv4 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesIPv4) - BytesIPv4OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesIPv4.class.getName()); - } - // Use BytesIPv4.newBuilder() to construct. - private BytesIPv4(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesIPv4() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIPv4.class, build.buf.validate.conformance.cases.BytesIPv4.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesIPv4)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesIPv4 other = (build.buf.validate.conformance.cases.BytesIPv4) obj; - - 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(); - 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.BytesIPv4 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv4 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.BytesIPv4 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv4 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.BytesIPv4 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv4 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.BytesIPv4 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesIPv4 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.BytesIPv4 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesIPv4 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.BytesIPv4 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.BytesIPv4 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.BytesIPv4 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.BytesIPv4} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesIPv4) - build.buf.validate.conformance.cases.BytesIPv4OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIPv4.class, build.buf.validate.conformance.cases.BytesIPv4.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesIPv4.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv4_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv4 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesIPv4.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv4 build() { - build.buf.validate.conformance.cases.BytesIPv4 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv4 buildPartial() { - build.buf.validate.conformance.cases.BytesIPv4 result = new build.buf.validate.conformance.cases.BytesIPv4(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesIPv4 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesIPv4) { - return mergeFrom((build.buf.validate.conformance.cases.BytesIPv4)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesIPv4 other) { - if (other == build.buf.validate.conformance.cases.BytesIPv4.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesIPv4) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesIPv4) - private static final build.buf.validate.conformance.cases.BytesIPv4 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesIPv4(); - } - - public static build.buf.validate.conformance.cases.BytesIPv4 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesIPv4 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.BytesIPv4 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4OrBuilder.java deleted file mode 100644 index d423e82e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv4OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesIPv4OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesIPv4) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6.java deleted file mode 100644 index 912bf49f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesIPv6} - */ -public final class BytesIPv6 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesIPv6) - BytesIPv6OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesIPv6.class.getName()); - } - // Use BytesIPv6.newBuilder() to construct. - private BytesIPv6(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesIPv6() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIPv6.class, build.buf.validate.conformance.cases.BytesIPv6.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesIPv6)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesIPv6 other = (build.buf.validate.conformance.cases.BytesIPv6) obj; - - 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(); - 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.BytesIPv6 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv6 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.BytesIPv6 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv6 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.BytesIPv6 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv6 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.BytesIPv6 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesIPv6 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.BytesIPv6 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesIPv6 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.BytesIPv6 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.BytesIPv6 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.BytesIPv6 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.BytesIPv6} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesIPv6) - build.buf.validate.conformance.cases.BytesIPv6OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIPv6.class, build.buf.validate.conformance.cases.BytesIPv6.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesIPv6.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv6 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesIPv6.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv6 build() { - build.buf.validate.conformance.cases.BytesIPv6 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv6 buildPartial() { - build.buf.validate.conformance.cases.BytesIPv6 result = new build.buf.validate.conformance.cases.BytesIPv6(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesIPv6 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesIPv6) { - return mergeFrom((build.buf.validate.conformance.cases.BytesIPv6)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesIPv6 other) { - if (other == build.buf.validate.conformance.cases.BytesIPv6.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesIPv6) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesIPv6) - private static final build.buf.validate.conformance.cases.BytesIPv6 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesIPv6(); - } - - public static build.buf.validate.conformance.cases.BytesIPv6 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesIPv6 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.BytesIPv6 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6Ignore.java deleted file mode 100644 index 97a4bfc9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6Ignore.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesIPv6Ignore} - */ -public final class BytesIPv6Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesIPv6Ignore) - BytesIPv6IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesIPv6Ignore.class.getName()); - } - // Use BytesIPv6Ignore.newBuilder() to construct. - private BytesIPv6Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesIPv6Ignore() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIPv6Ignore.class, build.buf.validate.conformance.cases.BytesIPv6Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesIPv6Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesIPv6Ignore other = (build.buf.validate.conformance.cases.BytesIPv6Ignore) obj; - - 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(); - 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.BytesIPv6Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv6Ignore 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.BytesIPv6Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv6Ignore 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.BytesIPv6Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIPv6Ignore 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.BytesIPv6Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesIPv6Ignore 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.BytesIPv6Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesIPv6Ignore 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.BytesIPv6Ignore 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.BytesIPv6Ignore 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.BytesIPv6Ignore 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.BytesIPv6Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesIPv6Ignore) - build.buf.validate.conformance.cases.BytesIPv6IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIPv6Ignore.class, build.buf.validate.conformance.cases.BytesIPv6Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesIPv6Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv6Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesIPv6Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv6Ignore build() { - build.buf.validate.conformance.cases.BytesIPv6Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIPv6Ignore buildPartial() { - build.buf.validate.conformance.cases.BytesIPv6Ignore result = new build.buf.validate.conformance.cases.BytesIPv6Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesIPv6Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesIPv6Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.BytesIPv6Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesIPv6Ignore other) { - if (other == build.buf.validate.conformance.cases.BytesIPv6Ignore.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesIPv6Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesIPv6Ignore) - private static final build.buf.validate.conformance.cases.BytesIPv6Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesIPv6Ignore(); - } - - public static build.buf.validate.conformance.cases.BytesIPv6Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesIPv6Ignore 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.BytesIPv6Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6IgnoreOrBuilder.java deleted file mode 100644 index f10e7a45..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesIPv6IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesIPv6Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6OrBuilder.java deleted file mode 100644 index c1ead619..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIPv6OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesIPv6OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesIPv6) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIn.java deleted file mode 100644 index 8de48af2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesIn} - */ -public final class BytesIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesIn) - BytesInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesIn.class.getName()); - } - // Use BytesIn.newBuilder() to construct. - private BytesIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesIn() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIn.class, build.buf.validate.conformance.cases.BytesIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesIn other = (build.buf.validate.conformance.cases.BytesIn) obj; - - 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(); - 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.BytesIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIn 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.BytesIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIn 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.BytesIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesIn 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.BytesIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesIn 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.BytesIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesIn 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.BytesIn 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.BytesIn 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.BytesIn 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.BytesIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesIn) - build.buf.validate.conformance.cases.BytesInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesIn.class, build.buf.validate.conformance.cases.BytesIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIn build() { - build.buf.validate.conformance.cases.BytesIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesIn buildPartial() { - build.buf.validate.conformance.cases.BytesIn result = new build.buf.validate.conformance.cases.BytesIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesIn) { - return mergeFrom((build.buf.validate.conformance.cases.BytesIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesIn other) { - if (other == build.buf.validate.conformance.cases.BytesIn.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesIn) - private static final build.buf.validate.conformance.cases.BytesIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesIn(); - } - - public static build.buf.validate.conformance.cases.BytesIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesIn 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.BytesIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesInOrBuilder.java deleted file mode 100644 index 199b8530..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesIn) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesLen.java deleted file mode 100644 index 594dee14..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesLen.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesLen} - */ -public final class BytesLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesLen) - BytesLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesLen.class.getName()); - } - // Use BytesLen.newBuilder() to construct. - private BytesLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesLen() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesLen.class, build.buf.validate.conformance.cases.BytesLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesLen other = (build.buf.validate.conformance.cases.BytesLen) obj; - - 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(); - 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.BytesLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesLen 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.BytesLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesLen 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.BytesLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesLen 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.BytesLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesLen 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.BytesLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesLen 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.BytesLen 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.BytesLen 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.BytesLen 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.BytesLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesLen) - build.buf.validate.conformance.cases.BytesLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesLen.class, build.buf.validate.conformance.cases.BytesLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesLen build() { - build.buf.validate.conformance.cases.BytesLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesLen buildPartial() { - build.buf.validate.conformance.cases.BytesLen result = new build.buf.validate.conformance.cases.BytesLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesLen) { - return mergeFrom((build.buf.validate.conformance.cases.BytesLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesLen other) { - if (other == build.buf.validate.conformance.cases.BytesLen.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesLen) - private static final build.buf.validate.conformance.cases.BytesLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesLen(); - } - - public static build.buf.validate.conformance.cases.BytesLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesLen 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.BytesLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesLenOrBuilder.java deleted file mode 100644 index 387fe503..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesLenOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesLen) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLen.java deleted file mode 100644 index 6f490f8d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLen.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesMaxLen} - */ -public final class BytesMaxLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesMaxLen) - BytesMaxLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesMaxLen.class.getName()); - } - // Use BytesMaxLen.newBuilder() to construct. - private BytesMaxLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesMaxLen() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesMaxLen.class, build.buf.validate.conformance.cases.BytesMaxLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesMaxLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesMaxLen other = (build.buf.validate.conformance.cases.BytesMaxLen) obj; - - 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(); - 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.BytesMaxLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMaxLen 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.BytesMaxLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMaxLen 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.BytesMaxLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMaxLen 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.BytesMaxLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesMaxLen 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.BytesMaxLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesMaxLen 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.BytesMaxLen 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.BytesMaxLen 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.BytesMaxLen 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.BytesMaxLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesMaxLen) - build.buf.validate.conformance.cases.BytesMaxLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesMaxLen.class, build.buf.validate.conformance.cases.BytesMaxLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesMaxLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMaxLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMaxLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesMaxLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMaxLen build() { - build.buf.validate.conformance.cases.BytesMaxLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMaxLen buildPartial() { - build.buf.validate.conformance.cases.BytesMaxLen result = new build.buf.validate.conformance.cases.BytesMaxLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesMaxLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesMaxLen) { - return mergeFrom((build.buf.validate.conformance.cases.BytesMaxLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesMaxLen other) { - if (other == build.buf.validate.conformance.cases.BytesMaxLen.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesMaxLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesMaxLen) - private static final build.buf.validate.conformance.cases.BytesMaxLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesMaxLen(); - } - - public static build.buf.validate.conformance.cases.BytesMaxLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesMaxLen 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.BytesMaxLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLenOrBuilder.java deleted file mode 100644 index 7f89de2b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMaxLenOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesMaxLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesMaxLen) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLen.java deleted file mode 100644 index 3346dd61..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLen.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesMinLen} - */ -public final class BytesMinLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesMinLen) - BytesMinLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesMinLen.class.getName()); - } - // Use BytesMinLen.newBuilder() to construct. - private BytesMinLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesMinLen() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesMinLen.class, build.buf.validate.conformance.cases.BytesMinLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesMinLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesMinLen other = (build.buf.validate.conformance.cases.BytesMinLen) obj; - - 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(); - 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.BytesMinLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMinLen 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.BytesMinLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMinLen 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.BytesMinLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMinLen 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.BytesMinLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesMinLen 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.BytesMinLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesMinLen 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.BytesMinLen 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.BytesMinLen 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.BytesMinLen 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.BytesMinLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesMinLen) - build.buf.validate.conformance.cases.BytesMinLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesMinLen.class, build.buf.validate.conformance.cases.BytesMinLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesMinLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMinLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesMinLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMinLen build() { - build.buf.validate.conformance.cases.BytesMinLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMinLen buildPartial() { - build.buf.validate.conformance.cases.BytesMinLen result = new build.buf.validate.conformance.cases.BytesMinLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesMinLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesMinLen) { - return mergeFrom((build.buf.validate.conformance.cases.BytesMinLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesMinLen other) { - if (other == build.buf.validate.conformance.cases.BytesMinLen.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesMinLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesMinLen) - private static final build.buf.validate.conformance.cases.BytesMinLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesMinLen(); - } - - public static build.buf.validate.conformance.cases.BytesMinLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesMinLen 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.BytesMinLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLenOrBuilder.java deleted file mode 100644 index 68e8e0ec..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinLenOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesMinLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesMinLen) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLen.java deleted file mode 100644 index 54f31ac5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLen.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesMinMaxLen} - */ -public final class BytesMinMaxLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesMinMaxLen) - BytesMinMaxLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesMinMaxLen.class.getName()); - } - // Use BytesMinMaxLen.newBuilder() to construct. - private BytesMinMaxLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesMinMaxLen() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesMinMaxLen.class, build.buf.validate.conformance.cases.BytesMinMaxLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesMinMaxLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesMinMaxLen other = (build.buf.validate.conformance.cases.BytesMinMaxLen) obj; - - 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(); - 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.BytesMinMaxLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMinMaxLen 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.BytesMinMaxLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMinMaxLen 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.BytesMinMaxLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesMinMaxLen 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.BytesMinMaxLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesMinMaxLen 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.BytesMinMaxLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesMinMaxLen 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.BytesMinMaxLen 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.BytesMinMaxLen 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.BytesMinMaxLen 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.BytesMinMaxLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesMinMaxLen) - build.buf.validate.conformance.cases.BytesMinMaxLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesMinMaxLen.class, build.buf.validate.conformance.cases.BytesMinMaxLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesMinMaxLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesMinMaxLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMinMaxLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesMinMaxLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMinMaxLen build() { - build.buf.validate.conformance.cases.BytesMinMaxLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesMinMaxLen buildPartial() { - build.buf.validate.conformance.cases.BytesMinMaxLen result = new build.buf.validate.conformance.cases.BytesMinMaxLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesMinMaxLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesMinMaxLen) { - return mergeFrom((build.buf.validate.conformance.cases.BytesMinMaxLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesMinMaxLen other) { - if (other == build.buf.validate.conformance.cases.BytesMinMaxLen.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesMinMaxLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesMinMaxLen) - private static final build.buf.validate.conformance.cases.BytesMinMaxLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesMinMaxLen(); - } - - public static build.buf.validate.conformance.cases.BytesMinMaxLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesMinMaxLen 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.BytesMinMaxLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLenOrBuilder.java deleted file mode 100644 index 9d8d6fc0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesMinMaxLenOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesMinMaxLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesMinMaxLen) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNone.java deleted file mode 100644 index e806844a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNone.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesNone} - */ -public final class BytesNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesNone) - BytesNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesNone.class.getName()); - } - // Use BytesNone.newBuilder() to construct. - private BytesNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesNone() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNone.class, build.buf.validate.conformance.cases.BytesNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesNone other = (build.buf.validate.conformance.cases.BytesNone) obj; - - 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(); - 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.BytesNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNone 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.BytesNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNone 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.BytesNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNone 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.BytesNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesNone 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.BytesNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesNone 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.BytesNone 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.BytesNone 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.BytesNone 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.BytesNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesNone) - build.buf.validate.conformance.cases.BytesNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNone.class, build.buf.validate.conformance.cases.BytesNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNone build() { - build.buf.validate.conformance.cases.BytesNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNone buildPartial() { - build.buf.validate.conformance.cases.BytesNone result = new build.buf.validate.conformance.cases.BytesNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesNone) { - return mergeFrom((build.buf.validate.conformance.cases.BytesNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesNone other) { - if (other == build.buf.validate.conformance.cases.BytesNone.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesNone) - private static final build.buf.validate.conformance.cases.BytesNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesNone(); - } - - public static build.buf.validate.conformance.cases.BytesNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesNone 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.BytesNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNoneOrBuilder.java deleted file mode 100644 index 096b8228..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesNone) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val"]; - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIP.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIP.java deleted file mode 100644 index 12f748cf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIP.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesNotIP} - */ -public final class BytesNotIP extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesNotIP) - BytesNotIPOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesNotIP.class.getName()); - } - // Use BytesNotIP.newBuilder() to construct. - private BytesNotIP(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesNotIP() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIP.class, build.buf.validate.conformance.cases.BytesNotIP.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesNotIP)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesNotIP other = (build.buf.validate.conformance.cases.BytesNotIP) obj; - - 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(); - 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.BytesNotIP parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIP 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.BytesNotIP parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIP 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.BytesNotIP parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIP 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.BytesNotIP parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesNotIP 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.BytesNotIP parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesNotIP 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.BytesNotIP 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.BytesNotIP 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.BytesNotIP 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.BytesNotIP} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesNotIP) - build.buf.validate.conformance.cases.BytesNotIPOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIP.class, build.buf.validate.conformance.cases.BytesNotIP.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesNotIP.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIP_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIP getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesNotIP.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIP build() { - build.buf.validate.conformance.cases.BytesNotIP result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIP buildPartial() { - build.buf.validate.conformance.cases.BytesNotIP result = new build.buf.validate.conformance.cases.BytesNotIP(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesNotIP result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesNotIP) { - return mergeFrom((build.buf.validate.conformance.cases.BytesNotIP)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesNotIP other) { - if (other == build.buf.validate.conformance.cases.BytesNotIP.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesNotIP) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesNotIP) - private static final build.buf.validate.conformance.cases.BytesNotIP DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesNotIP(); - } - - public static build.buf.validate.conformance.cases.BytesNotIP getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesNotIP 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.BytesNotIP getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPOrBuilder.java deleted file mode 100644 index 13bc597b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesNotIPOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesNotIP) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4.java deleted file mode 100644 index a52fafa5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesNotIPv4} - */ -public final class BytesNotIPv4 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesNotIPv4) - BytesNotIPv4OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesNotIPv4.class.getName()); - } - // Use BytesNotIPv4.newBuilder() to construct. - private BytesNotIPv4(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesNotIPv4() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIPv4.class, build.buf.validate.conformance.cases.BytesNotIPv4.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesNotIPv4)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesNotIPv4 other = (build.buf.validate.conformance.cases.BytesNotIPv4) obj; - - 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(); - 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.BytesNotIPv4 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIPv4 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.BytesNotIPv4 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIPv4 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.BytesNotIPv4 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIPv4 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.BytesNotIPv4 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesNotIPv4 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.BytesNotIPv4 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesNotIPv4 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.BytesNotIPv4 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.BytesNotIPv4 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.BytesNotIPv4 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.BytesNotIPv4} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesNotIPv4) - build.buf.validate.conformance.cases.BytesNotIPv4OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIPv4.class, build.buf.validate.conformance.cases.BytesNotIPv4.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesNotIPv4.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv4_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIPv4 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesNotIPv4.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIPv4 build() { - build.buf.validate.conformance.cases.BytesNotIPv4 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIPv4 buildPartial() { - build.buf.validate.conformance.cases.BytesNotIPv4 result = new build.buf.validate.conformance.cases.BytesNotIPv4(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesNotIPv4 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesNotIPv4) { - return mergeFrom((build.buf.validate.conformance.cases.BytesNotIPv4)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesNotIPv4 other) { - if (other == build.buf.validate.conformance.cases.BytesNotIPv4.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesNotIPv4) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesNotIPv4) - private static final build.buf.validate.conformance.cases.BytesNotIPv4 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesNotIPv4(); - } - - public static build.buf.validate.conformance.cases.BytesNotIPv4 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesNotIPv4 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.BytesNotIPv4 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4OrBuilder.java deleted file mode 100644 index eb9374c9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv4OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesNotIPv4OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesNotIPv4) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6.java deleted file mode 100644 index c3089fc4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesNotIPv6} - */ -public final class BytesNotIPv6 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesNotIPv6) - BytesNotIPv6OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesNotIPv6.class.getName()); - } - // Use BytesNotIPv6.newBuilder() to construct. - private BytesNotIPv6(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesNotIPv6() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIPv6.class, build.buf.validate.conformance.cases.BytesNotIPv6.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesNotIPv6)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesNotIPv6 other = (build.buf.validate.conformance.cases.BytesNotIPv6) obj; - - 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(); - 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.BytesNotIPv6 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIPv6 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.BytesNotIPv6 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIPv6 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.BytesNotIPv6 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIPv6 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.BytesNotIPv6 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesNotIPv6 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.BytesNotIPv6 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesNotIPv6 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.BytesNotIPv6 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.BytesNotIPv6 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.BytesNotIPv6 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.BytesNotIPv6} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesNotIPv6) - build.buf.validate.conformance.cases.BytesNotIPv6OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIPv6.class, build.buf.validate.conformance.cases.BytesNotIPv6.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesNotIPv6.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIPv6_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIPv6 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesNotIPv6.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIPv6 build() { - build.buf.validate.conformance.cases.BytesNotIPv6 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIPv6 buildPartial() { - build.buf.validate.conformance.cases.BytesNotIPv6 result = new build.buf.validate.conformance.cases.BytesNotIPv6(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesNotIPv6 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesNotIPv6) { - return mergeFrom((build.buf.validate.conformance.cases.BytesNotIPv6)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesNotIPv6 other) { - if (other == build.buf.validate.conformance.cases.BytesNotIPv6.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesNotIPv6) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesNotIPv6) - private static final build.buf.validate.conformance.cases.BytesNotIPv6 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesNotIPv6(); - } - - public static build.buf.validate.conformance.cases.BytesNotIPv6 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesNotIPv6 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.BytesNotIPv6 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6OrBuilder.java deleted file mode 100644 index 5dfb5d74..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIPv6OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesNotIPv6OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesNotIPv6) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIn.java deleted file mode 100644 index 203ef8e2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesNotIn} - */ -public final class BytesNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesNotIn) - BytesNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesNotIn.class.getName()); - } - // Use BytesNotIn.newBuilder() to construct. - private BytesNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesNotIn() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIn.class, build.buf.validate.conformance.cases.BytesNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesNotIn other = (build.buf.validate.conformance.cases.BytesNotIn) obj; - - 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(); - 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.BytesNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIn 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.BytesNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIn 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.BytesNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesNotIn 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.BytesNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesNotIn 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.BytesNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesNotIn 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.BytesNotIn 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.BytesNotIn 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.BytesNotIn 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.BytesNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesNotIn) - build.buf.validate.conformance.cases.BytesNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesNotIn.class, build.buf.validate.conformance.cases.BytesNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIn build() { - build.buf.validate.conformance.cases.BytesNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesNotIn buildPartial() { - build.buf.validate.conformance.cases.BytesNotIn result = new build.buf.validate.conformance.cases.BytesNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.BytesNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesNotIn other) { - if (other == build.buf.validate.conformance.cases.BytesNotIn.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesNotIn) - private static final build.buf.validate.conformance.cases.BytesNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesNotIn(); - } - - public static build.buf.validate.conformance.cases.BytesNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesNotIn 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.BytesNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotInOrBuilder.java deleted file mode 100644 index b7eed4c2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesNotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPattern.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPattern.java deleted file mode 100644 index 7674101b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPattern.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesPattern} - */ -public final class BytesPattern extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesPattern) - BytesPatternOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesPattern.class.getName()); - } - // Use BytesPattern.newBuilder() to construct. - private BytesPattern(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesPattern() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesPattern.class, build.buf.validate.conformance.cases.BytesPattern.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesPattern)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesPattern other = (build.buf.validate.conformance.cases.BytesPattern) obj; - - 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(); - 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.BytesPattern parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesPattern 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.BytesPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesPattern 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.BytesPattern parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesPattern 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.BytesPattern parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesPattern 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.BytesPattern parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesPattern 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.BytesPattern 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.BytesPattern 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.BytesPattern 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.BytesPattern} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesPattern) - build.buf.validate.conformance.cases.BytesPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesPattern.class, build.buf.validate.conformance.cases.BytesPattern.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesPattern.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPattern_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesPattern getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesPattern.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesPattern build() { - build.buf.validate.conformance.cases.BytesPattern result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesPattern buildPartial() { - build.buf.validate.conformance.cases.BytesPattern result = new build.buf.validate.conformance.cases.BytesPattern(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesPattern result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesPattern) { - return mergeFrom((build.buf.validate.conformance.cases.BytesPattern)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesPattern other) { - if (other == build.buf.validate.conformance.cases.BytesPattern.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesPattern) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesPattern) - private static final build.buf.validate.conformance.cases.BytesPattern DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesPattern(); - } - - public static build.buf.validate.conformance.cases.BytesPattern getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesPattern 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.BytesPattern getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPatternOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPatternOrBuilder.java deleted file mode 100644 index e4671bcb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPatternOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesPatternOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefix.java deleted file mode 100644 index 1694585d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefix.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesPrefix} - */ -public final class BytesPrefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesPrefix) - BytesPrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesPrefix.class.getName()); - } - // Use BytesPrefix.newBuilder() to construct. - private BytesPrefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesPrefix() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesPrefix.class, build.buf.validate.conformance.cases.BytesPrefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesPrefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesPrefix other = (build.buf.validate.conformance.cases.BytesPrefix) obj; - - 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(); - 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.BytesPrefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesPrefix 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.BytesPrefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesPrefix 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.BytesPrefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesPrefix 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.BytesPrefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesPrefix 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.BytesPrefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesPrefix 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.BytesPrefix 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.BytesPrefix 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.BytesPrefix 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.BytesPrefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesPrefix) - build.buf.validate.conformance.cases.BytesPrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesPrefix.class, build.buf.validate.conformance.cases.BytesPrefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesPrefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesPrefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesPrefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesPrefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesPrefix build() { - build.buf.validate.conformance.cases.BytesPrefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesPrefix buildPartial() { - build.buf.validate.conformance.cases.BytesPrefix result = new build.buf.validate.conformance.cases.BytesPrefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesPrefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesPrefix) { - return mergeFrom((build.buf.validate.conformance.cases.BytesPrefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesPrefix other) { - if (other == build.buf.validate.conformance.cases.BytesPrefix.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesPrefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesPrefix) - private static final build.buf.validate.conformance.cases.BytesPrefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesPrefix(); - } - - public static build.buf.validate.conformance.cases.BytesPrefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesPrefix 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.BytesPrefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefixOrBuilder.java deleted file mode 100644 index 11b26861..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesPrefixOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesPrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesPrefix) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesProto.java deleted file mode 100644 index fc0ac7d6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesProto.java +++ /dev/null @@ -1,316 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class BytesProto { - private BytesProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesMinLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesMinLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesMaxLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesMaxLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesMinMaxLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesMinMaxLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesPattern_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesPattern_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesPrefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesPrefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesContains_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesContains_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesSuffix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesSuffix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesIP_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesIP_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesNotIP_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesNotIP_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesIPv4_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesIPv4_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesNotIPv4_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesNotIPv4_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesIPv6_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesIPv6_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesNotIPv6_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesNotIPv6_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_BytesExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_BytesExample_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*buf/validate/conformance/cases/bytes.p" + - "roto\022\036buf.validate.conformance.cases\032\033bu" + - "f/validate/validate.proto\"\035\n\tBytesNone\022\020" + - "\n\003val\030\001 \001(\014R\003val\"*\n\nBytesConst\022\034\n\003val\030\001 " + - "\001(\014B\n\272H\007z\005\n\003fooR\003val\",\n\007BytesIn\022!\n\003val\030\001" + - " \001(\014B\017\272H\014z\nB\003barB\003bazR\003val\"1\n\nBytesNotIn" + - "\022#\n\003val\030\001 \001(\014B\021\272H\016z\014J\004fizzJ\004buzzR\003val\"%\n" + - "\010BytesLen\022\031\n\003val\030\001 \001(\014B\007\272H\004z\002h\003R\003val\"(\n\013" + - "BytesMinLen\022\031\n\003val\030\001 \001(\014B\007\272H\004z\002\020\003R\003val\"(" + - "\n\013BytesMaxLen\022\031\n\003val\030\001 \001(\014B\007\272H\004z\002\030\005R\003val" + - "\"-\n\016BytesMinMaxLen\022\033\n\003val\030\001 \001(\014B\t\272H\006z\004\020\003" + - "\030\005R\003val\"2\n\023BytesEqualMinMaxLen\022\033\n\003val\030\001 " + - "\001(\014B\t\272H\006z\004\020\005\030\005R\003val\"7\n\014BytesPattern\022\'\n\003v" + - "al\030\001 \001(\014B\025\272H\022z\020\"\016^[\\x00-\\x7F]+$R\003val\")\n\013" + - "BytesPrefix\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003*\001\231R\003val\"" + - "-\n\rBytesContains\022\034\n\003val\030\001 \001(\014B\n\272H\007z\005:\003ba" + - "rR\003val\",\n\013BytesSuffix\022\035\n\003val\030\001 \001(\014B\013\272H\010z" + - "\0062\004buzzR\003val\"$\n\007BytesIP\022\031\n\003val\030\001 \001(\014B\007\272H" + - "\004z\002P\001R\003val\"\'\n\nBytesNotIP\022\031\n\003val\030\001 \001(\014B\007\272" + - "H\004z\002P\000R\003val\"&\n\tBytesIPv4\022\031\n\003val\030\001 \001(\014B\007\272" + - "H\004z\002X\001R\003val\")\n\014BytesNotIPv4\022\031\n\003val\030\001 \001(\014" + - "B\007\272H\004z\002X\000R\003val\"&\n\tBytesIPv6\022\031\n\003val\030\001 \001(\014" + - "B\007\272H\004z\002`\001R\003val\")\n\014BytesNotIPv6\022\031\n\003val\030\001 " + - "\001(\014B\007\272H\004z\002`\000R\003val\"/\n\017BytesIPv6Ignore\022\034\n\003" + - "val\030\001 \001(\014B\n\272H\007z\002`\001\320\001\001R\003val\"*\n\014BytesExamp" + - "le\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003r\001\231R\003valB\316\001\n$build" + - ".buf.validate.conformance.casesB\nBytesPr" + - "otoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance." + - "Cases\312\002\036Buf\\Validate\\Conformance\\Cases\342\002" + - "*Buf\\Validate\\Conformance\\Cases\\GPBMetad" + - "ata\352\002!Buf::Validate::Conformance::Casesb" + - "\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_BytesNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_BytesNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesConst_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_BytesConst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesConst_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesIn_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_BytesIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesNotIn_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_BytesNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesLen_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_BytesLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesMinLen_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_BytesMinLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesMinLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesMaxLen_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_BytesMaxLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesMaxLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesMinMaxLen_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_BytesMinMaxLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesMinMaxLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesEqualMinMaxLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesPattern_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_BytesPattern_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesPattern_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesPrefix_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_BytesPrefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesPrefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesContains_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_BytesContains_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesContains_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesSuffix_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_BytesSuffix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesSuffix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesIP_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_BytesIP_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesIP_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesNotIP_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_BytesNotIP_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesNotIP_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesIPv4_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_BytesIPv4_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesIPv4_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesNotIPv4_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_BytesNotIPv4_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesNotIPv4_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesIPv6_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_BytesIPv6_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesIPv6_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesNotIPv6_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_BytesNotIPv6_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesNotIPv6_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesIPv6Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_BytesExample_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_BytesExample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_BytesExample_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffix.java deleted file mode 100644 index 974832ed..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffix.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.BytesSuffix} - */ -public final class BytesSuffix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.BytesSuffix) - BytesSuffixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesSuffix.class.getName()); - } - // Use BytesSuffix.newBuilder() to construct. - private BytesSuffix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BytesSuffix() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesSuffix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesSuffix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesSuffix.class, build.buf.validate.conformance.cases.BytesSuffix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.BytesSuffix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.BytesSuffix other = (build.buf.validate.conformance.cases.BytesSuffix) obj; - - 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(); - 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.BytesSuffix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesSuffix 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.BytesSuffix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesSuffix 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.BytesSuffix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.BytesSuffix 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.BytesSuffix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.BytesSuffix 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.BytesSuffix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.BytesSuffix 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.BytesSuffix 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.BytesSuffix 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.BytesSuffix 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.BytesSuffix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.BytesSuffix) - build.buf.validate.conformance.cases.BytesSuffixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesSuffix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesSuffix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.BytesSuffix.class, build.buf.validate.conformance.cases.BytesSuffix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.BytesSuffix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.BytesProto.internal_static_buf_validate_conformance_cases_BytesSuffix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesSuffix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.BytesSuffix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesSuffix build() { - build.buf.validate.conformance.cases.BytesSuffix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.BytesSuffix buildPartial() { - build.buf.validate.conformance.cases.BytesSuffix result = new build.buf.validate.conformance.cases.BytesSuffix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.BytesSuffix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.BytesSuffix) { - return mergeFrom((build.buf.validate.conformance.cases.BytesSuffix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.BytesSuffix other) { - if (other == build.buf.validate.conformance.cases.BytesSuffix.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.BytesSuffix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.BytesSuffix) - private static final build.buf.validate.conformance.cases.BytesSuffix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.BytesSuffix(); - } - - public static build.buf.validate.conformance.cases.BytesSuffix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesSuffix 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.BytesSuffix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffixOrBuilder.java deleted file mode 100644 index 81cc6801..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/BytesSuffixOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/bytes.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface BytesSuffixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.BytesSuffix) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestEnum.java b/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestEnum.java deleted file mode 100644 index 636e0ae1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestEnum.java +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/kitchen_sink.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf enum {@code buf.validate.conformance.cases.ComplexTestEnum} - */ -public enum ComplexTestEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * COMPLEX_TEST_ENUM_UNSPECIFIED = 0; - */ - COMPLEX_TEST_ENUM_UNSPECIFIED(0), - /** - * COMPLEX_TEST_ENUM_ONE = 1; - */ - COMPLEX_TEST_ENUM_ONE(1), - /** - * COMPLEX_TEST_ENUM_TWO = 2; - */ - COMPLEX_TEST_ENUM_TWO(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - ComplexTestEnum.class.getName()); - } - /** - * COMPLEX_TEST_ENUM_UNSPECIFIED = 0; - */ - public static final int COMPLEX_TEST_ENUM_UNSPECIFIED_VALUE = 0; - /** - * COMPLEX_TEST_ENUM_ONE = 1; - */ - public static final int COMPLEX_TEST_ENUM_ONE_VALUE = 1; - /** - * COMPLEX_TEST_ENUM_TWO = 2; - */ - public static final int COMPLEX_TEST_ENUM_TWO_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ComplexTestEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ComplexTestEnum forNumber(int value) { - switch (value) { - case 0: return COMPLEX_TEST_ENUM_UNSPECIFIED; - case 1: return COMPLEX_TEST_ENUM_ONE; - case 2: return COMPLEX_TEST_ENUM_TWO; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ComplexTestEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ComplexTestEnum findValueByNumber(int number) { - return ComplexTestEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.KitchenSinkProto.getDescriptor().getEnumTypes().get(0); - } - - private static final ComplexTestEnum[] VALUES = values(); - - public static ComplexTestEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ComplexTestEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.ComplexTestEnum) -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsg.java b/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsg.java deleted file mode 100644 index 6291d0c3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsg.java +++ /dev/null @@ -1,3022 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/kitchen_sink.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.ComplexTestMsg} - */ -public final class ComplexTestMsg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.ComplexTestMsg) - ComplexTestMsgOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - ComplexTestMsg.class.getName()); - } - // Use ComplexTestMsg.newBuilder() to construct. - private ComplexTestMsg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ComplexTestMsg() { - const_ = ""; - enumConst_ = 0; - repTsVal_ = java.util.Collections.emptyList(); - bytesVal_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 14: - return internalGetMapVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_ComplexTestMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.ComplexTestMsg.class, build.buf.validate.conformance.cases.ComplexTestMsg.Builder.class); - } - - private int bitField0_; - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - X(16), - Y(17), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 16: return X; - case 17: return Y; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object const_ = ""; - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The const. - */ - @java.lang.Override - public java.lang.String getConst() { - java.lang.Object ref = const_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - const_ = s; - return s; - } - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The bytes for const. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstBytes() { - java.lang.Object ref = const_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - const_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NESTED_FIELD_NUMBER = 2; - private build.buf.validate.conformance.cases.ComplexTestMsg nested_; - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - * @return Whether the nested field is set. - */ - @java.lang.Override - public boolean hasNested() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - * @return The nested. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsg getNested() { - return nested_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : nested_; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getNestedOrBuilder() { - return nested_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : nested_; - } - - public static final int INT_CONST_FIELD_NUMBER = 3; - private int intConst_ = 0; - /** - * int32 int_const = 3 [json_name = "intConst", (.buf.validate.field) = { ... } - * @return The intConst. - */ - @java.lang.Override - public int getIntConst() { - return intConst_; - } - - public static final int BOOL_CONST_FIELD_NUMBER = 4; - private boolean boolConst_ = false; - /** - * bool bool_const = 4 [json_name = "boolConst", (.buf.validate.field) = { ... } - * @return The boolConst. - */ - @java.lang.Override - public boolean getBoolConst() { - return boolConst_; - } - - public static final int FLOAT_VAL_FIELD_NUMBER = 5; - private com.google.protobuf.FloatValue floatVal_; - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - * @return Whether the floatVal field is set. - */ - @java.lang.Override - public boolean hasFloatVal() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - * @return The floatVal. - */ - @java.lang.Override - public com.google.protobuf.FloatValue getFloatVal() { - return floatVal_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : floatVal_; - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.FloatValueOrBuilder getFloatValOrBuilder() { - return floatVal_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : floatVal_; - } - - public static final int DUR_VAL_FIELD_NUMBER = 6; - private com.google.protobuf.Duration durVal_; - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - * @return Whether the durVal field is set. - */ - @java.lang.Override - public boolean hasDurVal() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - * @return The durVal. - */ - @java.lang.Override - public com.google.protobuf.Duration getDurVal() { - return durVal_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durVal_; - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getDurValOrBuilder() { - return durVal_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durVal_; - } - - public static final int TS_VAL_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp tsVal_; - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - * @return Whether the tsVal field is set. - */ - @java.lang.Override - public boolean hasTsVal() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - * @return The tsVal. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getTsVal() { - return tsVal_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : tsVal_; - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getTsValOrBuilder() { - return tsVal_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : tsVal_; - } - - public static final int ANOTHER_FIELD_NUMBER = 8; - private build.buf.validate.conformance.cases.ComplexTestMsg another_; - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - * @return Whether the another field is set. - */ - @java.lang.Override - public boolean hasAnother() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - * @return The another. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsg getAnother() { - return another_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : another_; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getAnotherOrBuilder() { - return another_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : another_; - } - - public static final int FLOAT_CONST_FIELD_NUMBER = 9; - private float floatConst_ = 0F; - /** - * float float_const = 9 [json_name = "floatConst", (.buf.validate.field) = { ... } - * @return The floatConst. - */ - @java.lang.Override - public float getFloatConst() { - return floatConst_; - } - - public static final int DOUBLE_IN_FIELD_NUMBER = 10; - private double doubleIn_ = 0D; - /** - * double double_in = 10 [json_name = "doubleIn", (.buf.validate.field) = { ... } - * @return The doubleIn. - */ - @java.lang.Override - public double getDoubleIn() { - return doubleIn_; - } - - public static final int ENUM_CONST_FIELD_NUMBER = 11; - private int enumConst_ = 0; - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for enumConst. - */ - @java.lang.Override public int getEnumConstValue() { - return enumConst_; - } - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return The enumConst. - */ - @java.lang.Override public build.buf.validate.conformance.cases.ComplexTestEnum getEnumConst() { - build.buf.validate.conformance.cases.ComplexTestEnum result = build.buf.validate.conformance.cases.ComplexTestEnum.forNumber(enumConst_); - return result == null ? build.buf.validate.conformance.cases.ComplexTestEnum.UNRECOGNIZED : result; - } - - public static final int ANY_VAL_FIELD_NUMBER = 12; - private com.google.protobuf.Any anyVal_; - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - * @return Whether the anyVal field is set. - */ - @java.lang.Override - public boolean hasAnyVal() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - * @return The anyVal. - */ - @java.lang.Override - public com.google.protobuf.Any getAnyVal() { - return anyVal_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyVal_; - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getAnyValOrBuilder() { - return anyVal_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyVal_; - } - - public static final int REP_TS_VAL_FIELD_NUMBER = 13; - @SuppressWarnings("serial") - private java.util.List repTsVal_; - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getRepTsValList() { - return repTsVal_; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getRepTsValOrBuilderList() { - return repTsVal_; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getRepTsValCount() { - return repTsVal_.size(); - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRepTsVal(int index) { - return repTsVal_.get(index); - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRepTsValOrBuilder( - int index) { - return repTsVal_.get(index); - } - - public static final int MAP_VAL_FIELD_NUMBER = 14; - private static final class MapValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_ComplexTestMsg_MapValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.SINT32, - 0, - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.String> mapVal_; - private com.google.protobuf.MapField - internalGetMapVal() { - if (mapVal_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MapValDefaultEntryHolder.defaultEntry); - } - return mapVal_; - } - public int getMapValCount() { - return internalGetMapVal().getMap().size(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsMapVal( - int key) { - - return internalGetMapVal().getMap().containsKey(key); - } - /** - * Use {@link #getMapValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMapVal() { - return getMapValMap(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getMapValMap() { - return internalGetMapVal().getMap(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getMapValOrDefault( - int key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetMapVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getMapValOrThrow( - int key) { - - java.util.Map map = - internalGetMapVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int BYTES_VAL_FIELD_NUMBER = 15; - private com.google.protobuf.ByteString bytesVal_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes bytes_val = 15 [json_name = "bytesVal", (.buf.validate.field) = { ... } - * @return The bytesVal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBytesVal() { - return bytesVal_; - } - - public static final int X_FIELD_NUMBER = 16; - /** - * string x = 16 [json_name = "x"]; - * @return Whether the x field is set. - */ - public boolean hasX() { - return oCase_ == 16; - } - /** - * string x = 16 [json_name = "x"]; - * @return The x. - */ - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 16) { - ref = o_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 16) { - o_ = s; - } - return s; - } - } - /** - * string x = 16 [json_name = "x"]; - * @return The bytes for x. - */ - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 16) { - ref = o_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 16) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int Y_FIELD_NUMBER = 17; - /** - * int32 y = 17 [json_name = "y"]; - * @return Whether the y field is set. - */ - @java.lang.Override - public boolean hasY() { - return oCase_ == 17; - } - /** - * int32 y = 17 [json_name = "y"]; - * @return The y. - */ - @java.lang.Override - public int getY() { - if (oCase_ == 17) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(const_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, const_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getNested()); - } - if (intConst_ != 0) { - output.writeInt32(3, intConst_); - } - if (boolConst_ != false) { - output.writeBool(4, boolConst_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getFloatVal()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(6, getDurVal()); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(7, getTsVal()); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(8, getAnother()); - } - if (java.lang.Float.floatToRawIntBits(floatConst_) != 0) { - output.writeFloat(9, floatConst_); - } - if (java.lang.Double.doubleToRawLongBits(doubleIn_) != 0) { - output.writeDouble(10, doubleIn_); - } - if (enumConst_ != build.buf.validate.conformance.cases.ComplexTestEnum.COMPLEX_TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(11, enumConst_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(12, getAnyVal()); - } - for (int i = 0; i < repTsVal_.size(); i++) { - output.writeMessage(13, repTsVal_.get(i)); - } - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetMapVal(), - MapValDefaultEntryHolder.defaultEntry, - 14); - if (!bytesVal_.isEmpty()) { - output.writeBytes(15, bytesVal_); - } - if (oCase_ == 16) { - com.google.protobuf.GeneratedMessage.writeString(output, 16, o_); - } - if (oCase_ == 17) { - output.writeInt32( - 17, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(const_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, const_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getNested()); - } - if (intConst_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, intConst_); - } - if (boolConst_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, boolConst_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getFloatVal()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getDurVal()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getTsVal()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getAnother()); - } - if (java.lang.Float.floatToRawIntBits(floatConst_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(9, floatConst_); - } - if (java.lang.Double.doubleToRawLongBits(doubleIn_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(10, doubleIn_); - } - if (enumConst_ != build.buf.validate.conformance.cases.ComplexTestEnum.COMPLEX_TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, enumConst_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getAnyVal()); - } - for (int i = 0; i < repTsVal_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, repTsVal_.get(i)); - } - for (java.util.Map.Entry entry - : internalGetMapVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - mapVal__ = MapValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, mapVal__); - } - if (!bytesVal_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(15, bytesVal_); - } - if (oCase_ == 16) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(16, o_); - } - if (oCase_ == 17) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 17, (int)((java.lang.Integer) o_)); - } - 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.ComplexTestMsg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.ComplexTestMsg other = (build.buf.validate.conformance.cases.ComplexTestMsg) obj; - - if (!getConst() - .equals(other.getConst())) return false; - if (hasNested() != other.hasNested()) return false; - if (hasNested()) { - if (!getNested() - .equals(other.getNested())) return false; - } - if (getIntConst() - != other.getIntConst()) return false; - if (getBoolConst() - != other.getBoolConst()) return false; - if (hasFloatVal() != other.hasFloatVal()) return false; - if (hasFloatVal()) { - if (!getFloatVal() - .equals(other.getFloatVal())) return false; - } - if (hasDurVal() != other.hasDurVal()) return false; - if (hasDurVal()) { - if (!getDurVal() - .equals(other.getDurVal())) return false; - } - if (hasTsVal() != other.hasTsVal()) return false; - if (hasTsVal()) { - if (!getTsVal() - .equals(other.getTsVal())) return false; - } - if (hasAnother() != other.hasAnother()) return false; - if (hasAnother()) { - if (!getAnother() - .equals(other.getAnother())) return false; - } - if (java.lang.Float.floatToIntBits(getFloatConst()) - != java.lang.Float.floatToIntBits( - other.getFloatConst())) return false; - if (java.lang.Double.doubleToLongBits(getDoubleIn()) - != java.lang.Double.doubleToLongBits( - other.getDoubleIn())) return false; - if (enumConst_ != other.enumConst_) return false; - if (hasAnyVal() != other.hasAnyVal()) return false; - if (hasAnyVal()) { - if (!getAnyVal() - .equals(other.getAnyVal())) return false; - } - if (!getRepTsValList() - .equals(other.getRepTsValList())) return false; - if (!internalGetMapVal().equals( - other.internalGetMapVal())) return false; - if (!getBytesVal() - .equals(other.getBytesVal())) return false; - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 16: - if (!getX() - .equals(other.getX())) return false; - break; - case 17: - if (getY() - != other.getY()) return false; - break; - case 0: - default: - } - 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(); - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst().hashCode(); - if (hasNested()) { - hash = (37 * hash) + NESTED_FIELD_NUMBER; - hash = (53 * hash) + getNested().hashCode(); - } - hash = (37 * hash) + INT_CONST_FIELD_NUMBER; - hash = (53 * hash) + getIntConst(); - hash = (37 * hash) + BOOL_CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBoolConst()); - if (hasFloatVal()) { - hash = (37 * hash) + FLOAT_VAL_FIELD_NUMBER; - hash = (53 * hash) + getFloatVal().hashCode(); - } - if (hasDurVal()) { - hash = (37 * hash) + DUR_VAL_FIELD_NUMBER; - hash = (53 * hash) + getDurVal().hashCode(); - } - if (hasTsVal()) { - hash = (37 * hash) + TS_VAL_FIELD_NUMBER; - hash = (53 * hash) + getTsVal().hashCode(); - } - if (hasAnother()) { - hash = (37 * hash) + ANOTHER_FIELD_NUMBER; - hash = (53 * hash) + getAnother().hashCode(); - } - hash = (37 * hash) + FLOAT_CONST_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getFloatConst()); - hash = (37 * hash) + DOUBLE_IN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getDoubleIn())); - hash = (37 * hash) + ENUM_CONST_FIELD_NUMBER; - hash = (53 * hash) + enumConst_; - if (hasAnyVal()) { - hash = (37 * hash) + ANY_VAL_FIELD_NUMBER; - hash = (53 * hash) + getAnyVal().hashCode(); - } - if (getRepTsValCount() > 0) { - hash = (37 * hash) + REP_TS_VAL_FIELD_NUMBER; - hash = (53 * hash) + getRepTsValList().hashCode(); - } - if (!internalGetMapVal().getMap().isEmpty()) { - hash = (37 * hash) + MAP_VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetMapVal().hashCode(); - } - hash = (37 * hash) + BYTES_VAL_FIELD_NUMBER; - hash = (53 * hash) + getBytesVal().hashCode(); - switch (oCase_) { - case 16: - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX().hashCode(); - break; - case 17: - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.ComplexTestMsg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.ComplexTestMsg 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.ComplexTestMsg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.ComplexTestMsg 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.ComplexTestMsg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.ComplexTestMsg 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.ComplexTestMsg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.ComplexTestMsg 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.ComplexTestMsg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.ComplexTestMsg 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.ComplexTestMsg 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.ComplexTestMsg 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.ComplexTestMsg 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.ComplexTestMsg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.ComplexTestMsg) - build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 14: - return internalGetMapVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 14: - return internalGetMutableMapVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_ComplexTestMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.ComplexTestMsg.class, build.buf.validate.conformance.cases.ComplexTestMsg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.ComplexTestMsg.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getNestedFieldBuilder(); - getFloatValFieldBuilder(); - getDurValFieldBuilder(); - getTsValFieldBuilder(); - getAnotherFieldBuilder(); - getAnyValFieldBuilder(); - getRepTsValFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = ""; - nested_ = null; - if (nestedBuilder_ != null) { - nestedBuilder_.dispose(); - nestedBuilder_ = null; - } - intConst_ = 0; - boolConst_ = false; - floatVal_ = null; - if (floatValBuilder_ != null) { - floatValBuilder_.dispose(); - floatValBuilder_ = null; - } - durVal_ = null; - if (durValBuilder_ != null) { - durValBuilder_.dispose(); - durValBuilder_ = null; - } - tsVal_ = null; - if (tsValBuilder_ != null) { - tsValBuilder_.dispose(); - tsValBuilder_ = null; - } - another_ = null; - if (anotherBuilder_ != null) { - anotherBuilder_.dispose(); - anotherBuilder_ = null; - } - floatConst_ = 0F; - doubleIn_ = 0D; - enumConst_ = 0; - anyVal_ = null; - if (anyValBuilder_ != null) { - anyValBuilder_.dispose(); - anyValBuilder_ = null; - } - if (repTsValBuilder_ == null) { - repTsVal_ = java.util.Collections.emptyList(); - } else { - repTsVal_ = null; - repTsValBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00001000); - internalGetMutableMapVal().clear(); - bytesVal_ = com.google.protobuf.ByteString.EMPTY; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsg build() { - build.buf.validate.conformance.cases.ComplexTestMsg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsg buildPartial() { - build.buf.validate.conformance.cases.ComplexTestMsg result = new build.buf.validate.conformance.cases.ComplexTestMsg(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.ComplexTestMsg result) { - if (repTsValBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0)) { - repTsVal_ = java.util.Collections.unmodifiableList(repTsVal_); - bitField0_ = (bitField0_ & ~0x00001000); - } - result.repTsVal_ = repTsVal_; - } else { - result.repTsVal_ = repTsValBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.conformance.cases.ComplexTestMsg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nested_ = nestedBuilder_ == null - ? nested_ - : nestedBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.intConst_ = intConst_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.boolConst_ = boolConst_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.floatVal_ = floatValBuilder_ == null - ? floatVal_ - : floatValBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.durVal_ = durValBuilder_ == null - ? durVal_ - : durValBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.tsVal_ = tsValBuilder_ == null - ? tsVal_ - : tsValBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.another_ = anotherBuilder_ == null - ? another_ - : anotherBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.floatConst_ = floatConst_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.doubleIn_ = doubleIn_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.enumConst_ = enumConst_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.anyVal_ = anyValBuilder_ == null - ? anyVal_ - : anyValBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.mapVal_ = internalGetMapVal(); - result.mapVal_.makeImmutable(); - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.bytesVal_ = bytesVal_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.ComplexTestMsg result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.ComplexTestMsg) { - return mergeFrom((build.buf.validate.conformance.cases.ComplexTestMsg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.ComplexTestMsg other) { - if (other == build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance()) return this; - if (!other.getConst().isEmpty()) { - const_ = other.const_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNested()) { - mergeNested(other.getNested()); - } - if (other.getIntConst() != 0) { - setIntConst(other.getIntConst()); - } - if (other.getBoolConst() != false) { - setBoolConst(other.getBoolConst()); - } - if (other.hasFloatVal()) { - mergeFloatVal(other.getFloatVal()); - } - if (other.hasDurVal()) { - mergeDurVal(other.getDurVal()); - } - if (other.hasTsVal()) { - mergeTsVal(other.getTsVal()); - } - if (other.hasAnother()) { - mergeAnother(other.getAnother()); - } - if (other.getFloatConst() != 0F) { - setFloatConst(other.getFloatConst()); - } - if (other.getDoubleIn() != 0D) { - setDoubleIn(other.getDoubleIn()); - } - if (other.enumConst_ != 0) { - setEnumConstValue(other.getEnumConstValue()); - } - if (other.hasAnyVal()) { - mergeAnyVal(other.getAnyVal()); - } - if (repTsValBuilder_ == null) { - if (!other.repTsVal_.isEmpty()) { - if (repTsVal_.isEmpty()) { - repTsVal_ = other.repTsVal_; - bitField0_ = (bitField0_ & ~0x00001000); - } else { - ensureRepTsValIsMutable(); - repTsVal_.addAll(other.repTsVal_); - } - onChanged(); - } - } else { - if (!other.repTsVal_.isEmpty()) { - if (repTsValBuilder_.isEmpty()) { - repTsValBuilder_.dispose(); - repTsValBuilder_ = null; - repTsVal_ = other.repTsVal_; - bitField0_ = (bitField0_ & ~0x00001000); - repTsValBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRepTsValFieldBuilder() : null; - } else { - repTsValBuilder_.addAllMessages(other.repTsVal_); - } - } - } - internalGetMutableMapVal().mergeFrom( - other.internalGetMapVal()); - bitField0_ |= 0x00002000; - if (other.getBytesVal() != com.google.protobuf.ByteString.EMPTY) { - setBytesVal(other.getBytesVal()); - } - switch (other.getOCase()) { - case X: { - oCase_ = 16; - o_ = other.o_; - onChanged(); - break; - } - case Y: { - setY(other.getY()); - break; - } - case O_NOT_SET: { - break; - } - } - 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: { - const_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getNestedFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - intConst_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: { - boolConst_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - input.readMessage( - getFloatValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getDurValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - input.readMessage( - getTsValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: { - input.readMessage( - getAnotherFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 77: { - floatConst_ = input.readFloat(); - bitField0_ |= 0x00000100; - break; - } // case 77 - case 81: { - doubleIn_ = input.readDouble(); - bitField0_ |= 0x00000200; - break; - } // case 81 - case 88: { - enumConst_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 98: { - input.readMessage( - getAnyValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: { - com.google.protobuf.Timestamp m = - input.readMessage( - com.google.protobuf.Timestamp.parser(), - extensionRegistry); - if (repTsValBuilder_ == null) { - ensureRepTsValIsMutable(); - repTsVal_.add(m); - } else { - repTsValBuilder_.addMessage(m); - } - break; - } // case 106 - case 114: { - com.google.protobuf.MapEntry - mapVal__ = input.readMessage( - MapValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableMapVal().getMutableMap().put( - mapVal__.getKey(), mapVal__.getValue()); - bitField0_ |= 0x00002000; - break; - } // case 114 - case 122: { - bytesVal_ = input.readBytes(); - bitField0_ |= 0x00004000; - break; - } // case 122 - case 130: { - java.lang.String s = input.readStringRequireUtf8(); - oCase_ = 16; - o_ = s; - break; - } // case 130 - case 136: { - o_ = input.readInt32(); - oCase_ = 17; - break; - } // case 136 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object const_ = ""; - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The const. - */ - public java.lang.String getConst() { - java.lang.Object ref = const_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - const_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The bytes for const. - */ - public com.google.protobuf.ByteString - getConstBytes() { - java.lang.Object ref = const_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - const_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - const_ = getDefaultInstance().getConst(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @param value The bytes for const to set. - * @return This builder for chaining. - */ - public Builder setConstBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.ComplexTestMsg nested_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder> nestedBuilder_; - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - * @return Whether the nested field is set. - */ - public boolean hasNested() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - * @return The nested. - */ - public build.buf.validate.conformance.cases.ComplexTestMsg getNested() { - if (nestedBuilder_ == null) { - return nested_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : nested_; - } else { - return nestedBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - public Builder setNested(build.buf.validate.conformance.cases.ComplexTestMsg value) { - if (nestedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nested_ = value; - } else { - nestedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - public Builder setNested( - build.buf.validate.conformance.cases.ComplexTestMsg.Builder builderForValue) { - if (nestedBuilder_ == null) { - nested_ = builderForValue.build(); - } else { - nestedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - public Builder mergeNested(build.buf.validate.conformance.cases.ComplexTestMsg value) { - if (nestedBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - nested_ != null && - nested_ != build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance()) { - getNestedBuilder().mergeFrom(value); - } else { - nested_ = value; - } - } else { - nestedBuilder_.mergeFrom(value); - } - if (nested_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - public Builder clearNested() { - bitField0_ = (bitField0_ & ~0x00000002); - nested_ = null; - if (nestedBuilder_ != null) { - nestedBuilder_.dispose(); - nestedBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - public build.buf.validate.conformance.cases.ComplexTestMsg.Builder getNestedBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNestedFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - public build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getNestedOrBuilder() { - if (nestedBuilder_ != null) { - return nestedBuilder_.getMessageOrBuilder(); - } else { - return nested_ == null ? - build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : nested_; - } - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder> - getNestedFieldBuilder() { - if (nestedBuilder_ == null) { - nestedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder>( - getNested(), - getParentForChildren(), - isClean()); - nested_ = null; - } - return nestedBuilder_; - } - - private int intConst_ ; - /** - * int32 int_const = 3 [json_name = "intConst", (.buf.validate.field) = { ... } - * @return The intConst. - */ - @java.lang.Override - public int getIntConst() { - return intConst_; - } - /** - * int32 int_const = 3 [json_name = "intConst", (.buf.validate.field) = { ... } - * @param value The intConst to set. - * @return This builder for chaining. - */ - public Builder setIntConst(int value) { - - intConst_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * int32 int_const = 3 [json_name = "intConst", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearIntConst() { - bitField0_ = (bitField0_ & ~0x00000004); - intConst_ = 0; - onChanged(); - return this; - } - - private boolean boolConst_ ; - /** - * bool bool_const = 4 [json_name = "boolConst", (.buf.validate.field) = { ... } - * @return The boolConst. - */ - @java.lang.Override - public boolean getBoolConst() { - return boolConst_; - } - /** - * bool bool_const = 4 [json_name = "boolConst", (.buf.validate.field) = { ... } - * @param value The boolConst to set. - * @return This builder for chaining. - */ - public Builder setBoolConst(boolean value) { - - boolConst_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * bool bool_const = 4 [json_name = "boolConst", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearBoolConst() { - bitField0_ = (bitField0_ & ~0x00000008); - boolConst_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.FloatValue floatVal_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> floatValBuilder_; - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - * @return Whether the floatVal field is set. - */ - public boolean hasFloatVal() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - * @return The floatVal. - */ - public com.google.protobuf.FloatValue getFloatVal() { - if (floatValBuilder_ == null) { - return floatVal_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : floatVal_; - } else { - return floatValBuilder_.getMessage(); - } - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - public Builder setFloatVal(com.google.protobuf.FloatValue value) { - if (floatValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - floatVal_ = value; - } else { - floatValBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - public Builder setFloatVal( - com.google.protobuf.FloatValue.Builder builderForValue) { - if (floatValBuilder_ == null) { - floatVal_ = builderForValue.build(); - } else { - floatValBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - public Builder mergeFloatVal(com.google.protobuf.FloatValue value) { - if (floatValBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - floatVal_ != null && - floatVal_ != com.google.protobuf.FloatValue.getDefaultInstance()) { - getFloatValBuilder().mergeFrom(value); - } else { - floatVal_ = value; - } - } else { - floatValBuilder_.mergeFrom(value); - } - if (floatVal_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - public Builder clearFloatVal() { - bitField0_ = (bitField0_ & ~0x00000010); - floatVal_ = null; - if (floatValBuilder_ != null) { - floatValBuilder_.dispose(); - floatValBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.FloatValue.Builder getFloatValBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getFloatValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.FloatValueOrBuilder getFloatValOrBuilder() { - if (floatValBuilder_ != null) { - return floatValBuilder_.getMessageOrBuilder(); - } else { - return floatVal_ == null ? - com.google.protobuf.FloatValue.getDefaultInstance() : floatVal_; - } - } - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> - getFloatValFieldBuilder() { - if (floatValBuilder_ == null) { - floatValBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( - getFloatVal(), - getParentForChildren(), - isClean()); - floatVal_ = null; - } - return floatValBuilder_; - } - - private com.google.protobuf.Duration durVal_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> durValBuilder_; - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - * @return Whether the durVal field is set. - */ - public boolean hasDurVal() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - * @return The durVal. - */ - public com.google.protobuf.Duration getDurVal() { - if (durValBuilder_ == null) { - return durVal_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durVal_; - } else { - return durValBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - public Builder setDurVal(com.google.protobuf.Duration value) { - if (durValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - durVal_ = value; - } else { - durValBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - public Builder setDurVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (durValBuilder_ == null) { - durVal_ = builderForValue.build(); - } else { - durValBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - public Builder mergeDurVal(com.google.protobuf.Duration value) { - if (durValBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - durVal_ != null && - durVal_ != com.google.protobuf.Duration.getDefaultInstance()) { - getDurValBuilder().mergeFrom(value); - } else { - durVal_ = value; - } - } else { - durValBuilder_.mergeFrom(value); - } - if (durVal_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - public Builder clearDurVal() { - bitField0_ = (bitField0_ & ~0x00000020); - durVal_ = null; - if (durValBuilder_ != null) { - durValBuilder_.dispose(); - durValBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getDurValBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getDurValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getDurValOrBuilder() { - if (durValBuilder_ != null) { - return durValBuilder_.getMessageOrBuilder(); - } else { - return durVal_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : durVal_; - } - } - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getDurValFieldBuilder() { - if (durValBuilder_ == null) { - durValBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getDurVal(), - getParentForChildren(), - isClean()); - durVal_ = null; - } - return durValBuilder_; - } - - private com.google.protobuf.Timestamp tsVal_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> tsValBuilder_; - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - * @return Whether the tsVal field is set. - */ - public boolean hasTsVal() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - * @return The tsVal. - */ - public com.google.protobuf.Timestamp getTsVal() { - if (tsValBuilder_ == null) { - return tsVal_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : tsVal_; - } else { - return tsValBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - public Builder setTsVal(com.google.protobuf.Timestamp value) { - if (tsValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tsVal_ = value; - } else { - tsValBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - public Builder setTsVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (tsValBuilder_ == null) { - tsVal_ = builderForValue.build(); - } else { - tsValBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - public Builder mergeTsVal(com.google.protobuf.Timestamp value) { - if (tsValBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) && - tsVal_ != null && - tsVal_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getTsValBuilder().mergeFrom(value); - } else { - tsVal_ = value; - } - } else { - tsValBuilder_.mergeFrom(value); - } - if (tsVal_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - public Builder clearTsVal() { - bitField0_ = (bitField0_ & ~0x00000040); - tsVal_ = null; - if (tsValBuilder_ != null) { - tsValBuilder_.dispose(); - tsValBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getTsValBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getTsValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getTsValOrBuilder() { - if (tsValBuilder_ != null) { - return tsValBuilder_.getMessageOrBuilder(); - } else { - return tsVal_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : tsVal_; - } - } - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTsValFieldBuilder() { - if (tsValBuilder_ == null) { - tsValBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getTsVal(), - getParentForChildren(), - isClean()); - tsVal_ = null; - } - return tsValBuilder_; - } - - private build.buf.validate.conformance.cases.ComplexTestMsg another_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder> anotherBuilder_; - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - * @return Whether the another field is set. - */ - public boolean hasAnother() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - * @return The another. - */ - public build.buf.validate.conformance.cases.ComplexTestMsg getAnother() { - if (anotherBuilder_ == null) { - return another_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : another_; - } else { - return anotherBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - public Builder setAnother(build.buf.validate.conformance.cases.ComplexTestMsg value) { - if (anotherBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - another_ = value; - } else { - anotherBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - public Builder setAnother( - build.buf.validate.conformance.cases.ComplexTestMsg.Builder builderForValue) { - if (anotherBuilder_ == null) { - another_ = builderForValue.build(); - } else { - anotherBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - public Builder mergeAnother(build.buf.validate.conformance.cases.ComplexTestMsg value) { - if (anotherBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - another_ != null && - another_ != build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance()) { - getAnotherBuilder().mergeFrom(value); - } else { - another_ = value; - } - } else { - anotherBuilder_.mergeFrom(value); - } - if (another_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - public Builder clearAnother() { - bitField0_ = (bitField0_ & ~0x00000080); - another_ = null; - if (anotherBuilder_ != null) { - anotherBuilder_.dispose(); - anotherBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - public build.buf.validate.conformance.cases.ComplexTestMsg.Builder getAnotherBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getAnotherFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - public build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getAnotherOrBuilder() { - if (anotherBuilder_ != null) { - return anotherBuilder_.getMessageOrBuilder(); - } else { - return another_ == null ? - build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : another_; - } - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder> - getAnotherFieldBuilder() { - if (anotherBuilder_ == null) { - anotherBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder>( - getAnother(), - getParentForChildren(), - isClean()); - another_ = null; - } - return anotherBuilder_; - } - - private float floatConst_ ; - /** - * float float_const = 9 [json_name = "floatConst", (.buf.validate.field) = { ... } - * @return The floatConst. - */ - @java.lang.Override - public float getFloatConst() { - return floatConst_; - } - /** - * float float_const = 9 [json_name = "floatConst", (.buf.validate.field) = { ... } - * @param value The floatConst to set. - * @return This builder for chaining. - */ - public Builder setFloatConst(float value) { - - floatConst_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * float float_const = 9 [json_name = "floatConst", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearFloatConst() { - bitField0_ = (bitField0_ & ~0x00000100); - floatConst_ = 0F; - onChanged(); - return this; - } - - private double doubleIn_ ; - /** - * double double_in = 10 [json_name = "doubleIn", (.buf.validate.field) = { ... } - * @return The doubleIn. - */ - @java.lang.Override - public double getDoubleIn() { - return doubleIn_; - } - /** - * double double_in = 10 [json_name = "doubleIn", (.buf.validate.field) = { ... } - * @param value The doubleIn to set. - * @return This builder for chaining. - */ - public Builder setDoubleIn(double value) { - - doubleIn_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * double double_in = 10 [json_name = "doubleIn", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearDoubleIn() { - bitField0_ = (bitField0_ & ~0x00000200); - doubleIn_ = 0D; - onChanged(); - return this; - } - - private int enumConst_ = 0; - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for enumConst. - */ - @java.lang.Override public int getEnumConstValue() { - return enumConst_; - } - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for enumConst to set. - * @return This builder for chaining. - */ - public Builder setEnumConstValue(int value) { - enumConst_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return The enumConst. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestEnum getEnumConst() { - build.buf.validate.conformance.cases.ComplexTestEnum result = build.buf.validate.conformance.cases.ComplexTestEnum.forNumber(enumConst_); - return result == null ? build.buf.validate.conformance.cases.ComplexTestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @param value The enumConst to set. - * @return This builder for chaining. - */ - public Builder setEnumConst(build.buf.validate.conformance.cases.ComplexTestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - enumConst_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearEnumConst() { - bitField0_ = (bitField0_ & ~0x00000400); - enumConst_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Any anyVal_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> anyValBuilder_; - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - * @return Whether the anyVal field is set. - */ - public boolean hasAnyVal() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - * @return The anyVal. - */ - public com.google.protobuf.Any getAnyVal() { - if (anyValBuilder_ == null) { - return anyVal_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyVal_; - } else { - return anyValBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - public Builder setAnyVal(com.google.protobuf.Any value) { - if (anyValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - anyVal_ = value; - } else { - anyValBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - public Builder setAnyVal( - com.google.protobuf.Any.Builder builderForValue) { - if (anyValBuilder_ == null) { - anyVal_ = builderForValue.build(); - } else { - anyValBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - public Builder mergeAnyVal(com.google.protobuf.Any value) { - if (anyValBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) && - anyVal_ != null && - anyVal_ != com.google.protobuf.Any.getDefaultInstance()) { - getAnyValBuilder().mergeFrom(value); - } else { - anyVal_ = value; - } - } else { - anyValBuilder_.mergeFrom(value); - } - if (anyVal_ != null) { - bitField0_ |= 0x00000800; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - public Builder clearAnyVal() { - bitField0_ = (bitField0_ & ~0x00000800); - anyVal_ = null; - if (anyValBuilder_ != null) { - anyValBuilder_.dispose(); - anyValBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder getAnyValBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return getAnyValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.AnyOrBuilder getAnyValOrBuilder() { - if (anyValBuilder_ != null) { - return anyValBuilder_.getMessageOrBuilder(); - } else { - return anyVal_ == null ? - com.google.protobuf.Any.getDefaultInstance() : anyVal_; - } - } - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getAnyValFieldBuilder() { - if (anyValBuilder_ == null) { - anyValBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getAnyVal(), - getParentForChildren(), - isClean()); - anyVal_ = null; - } - return anyValBuilder_; - } - - private java.util.List repTsVal_ = - java.util.Collections.emptyList(); - private void ensureRepTsValIsMutable() { - if (!((bitField0_ & 0x00001000) != 0)) { - repTsVal_ = new java.util.ArrayList(repTsVal_); - bitField0_ |= 0x00001000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> repTsValBuilder_; - - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public java.util.List getRepTsValList() { - if (repTsValBuilder_ == null) { - return java.util.Collections.unmodifiableList(repTsVal_); - } else { - return repTsValBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public int getRepTsValCount() { - if (repTsValBuilder_ == null) { - return repTsVal_.size(); - } else { - return repTsValBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp getRepTsVal(int index) { - if (repTsValBuilder_ == null) { - return repTsVal_.get(index); - } else { - return repTsValBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder setRepTsVal( - int index, com.google.protobuf.Timestamp value) { - if (repTsValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRepTsValIsMutable(); - repTsVal_.set(index, value); - onChanged(); - } else { - repTsValBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder setRepTsVal( - int index, com.google.protobuf.Timestamp.Builder builderForValue) { - if (repTsValBuilder_ == null) { - ensureRepTsValIsMutable(); - repTsVal_.set(index, builderForValue.build()); - onChanged(); - } else { - repTsValBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder addRepTsVal(com.google.protobuf.Timestamp value) { - if (repTsValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRepTsValIsMutable(); - repTsVal_.add(value); - onChanged(); - } else { - repTsValBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder addRepTsVal( - int index, com.google.protobuf.Timestamp value) { - if (repTsValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRepTsValIsMutable(); - repTsVal_.add(index, value); - onChanged(); - } else { - repTsValBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder addRepTsVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (repTsValBuilder_ == null) { - ensureRepTsValIsMutable(); - repTsVal_.add(builderForValue.build()); - onChanged(); - } else { - repTsValBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder addRepTsVal( - int index, com.google.protobuf.Timestamp.Builder builderForValue) { - if (repTsValBuilder_ == null) { - ensureRepTsValIsMutable(); - repTsVal_.add(index, builderForValue.build()); - onChanged(); - } else { - repTsValBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder addAllRepTsVal( - java.lang.Iterable values) { - if (repTsValBuilder_ == null) { - ensureRepTsValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, repTsVal_); - onChanged(); - } else { - repTsValBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder clearRepTsVal() { - if (repTsValBuilder_ == null) { - repTsVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); - onChanged(); - } else { - repTsValBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public Builder removeRepTsVal(int index) { - if (repTsValBuilder_ == null) { - ensureRepTsValIsMutable(); - repTsVal_.remove(index); - onChanged(); - } else { - repTsValBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getRepTsValBuilder( - int index) { - return getRepTsValFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getRepTsValOrBuilder( - int index) { - if (repTsValBuilder_ == null) { - return repTsVal_.get(index); } else { - return repTsValBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public java.util.List - getRepTsValOrBuilderList() { - if (repTsValBuilder_ != null) { - return repTsValBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(repTsVal_); - } - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder addRepTsValBuilder() { - return getRepTsValFieldBuilder().addBuilder( - com.google.protobuf.Timestamp.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder addRepTsValBuilder( - int index) { - return getRepTsValFieldBuilder().addBuilder( - index, com.google.protobuf.Timestamp.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - public java.util.List - getRepTsValBuilderList() { - return getRepTsValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getRepTsValFieldBuilder() { - if (repTsValBuilder_ == null) { - repTsValBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - repTsVal_, - ((bitField0_ & 0x00001000) != 0), - getParentForChildren(), - isClean()); - repTsVal_ = null; - } - return repTsValBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.String> mapVal_; - private com.google.protobuf.MapField - internalGetMapVal() { - if (mapVal_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MapValDefaultEntryHolder.defaultEntry); - } - return mapVal_; - } - private com.google.protobuf.MapField - internalGetMutableMapVal() { - if (mapVal_ == null) { - mapVal_ = com.google.protobuf.MapField.newMapField( - MapValDefaultEntryHolder.defaultEntry); - } - if (!mapVal_.isMutable()) { - mapVal_ = mapVal_.copy(); - } - bitField0_ |= 0x00002000; - onChanged(); - return mapVal_; - } - public int getMapValCount() { - return internalGetMapVal().getMap().size(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsMapVal( - int key) { - - return internalGetMapVal().getMap().containsKey(key); - } - /** - * Use {@link #getMapValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMapVal() { - return getMapValMap(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getMapValMap() { - return internalGetMapVal().getMap(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getMapValOrDefault( - int key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetMapVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getMapValOrThrow( - int key) { - - java.util.Map map = - internalGetMapVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearMapVal() { - bitField0_ = (bitField0_ & ~0x00002000); - internalGetMutableMapVal().getMutableMap() - .clear(); - return this; - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - public Builder removeMapVal( - int key) { - - internalGetMutableMapVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableMapVal() { - bitField0_ |= 0x00002000; - return internalGetMutableMapVal().getMutableMap(); - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - public Builder putMapVal( - int key, - java.lang.String value) { - - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableMapVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00002000; - return this; - } - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - public Builder putAllMapVal( - java.util.Map values) { - internalGetMutableMapVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00002000; - return this; - } - - private com.google.protobuf.ByteString bytesVal_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes bytes_val = 15 [json_name = "bytesVal", (.buf.validate.field) = { ... } - * @return The bytesVal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBytesVal() { - return bytesVal_; - } - /** - * bytes bytes_val = 15 [json_name = "bytesVal", (.buf.validate.field) = { ... } - * @param value The bytesVal to set. - * @return This builder for chaining. - */ - public Builder setBytesVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - bytesVal_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - /** - * bytes bytes_val = 15 [json_name = "bytesVal", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearBytesVal() { - bitField0_ = (bitField0_ & ~0x00004000); - bytesVal_ = getDefaultInstance().getBytesVal(); - onChanged(); - return this; - } - - /** - * string x = 16 [json_name = "x"]; - * @return Whether the x field is set. - */ - @java.lang.Override - public boolean hasX() { - return oCase_ == 16; - } - /** - * string x = 16 [json_name = "x"]; - * @return The x. - */ - @java.lang.Override - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 16) { - ref = o_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 16) { - o_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string x = 16 [json_name = "x"]; - * @return The bytes for x. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 16) { - ref = o_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 16) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string x = 16 [json_name = "x"]; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - oCase_ = 16; - o_ = value; - onChanged(); - return this; - } - /** - * string x = 16 [json_name = "x"]; - * @return This builder for chaining. - */ - public Builder clearX() { - if (oCase_ == 16) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - /** - * string x = 16 [json_name = "x"]; - * @param value The bytes for x to set. - * @return This builder for chaining. - */ - public Builder setXBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - oCase_ = 16; - o_ = value; - onChanged(); - return this; - } - - /** - * int32 y = 17 [json_name = "y"]; - * @return Whether the y field is set. - */ - public boolean hasY() { - return oCase_ == 17; - } - /** - * int32 y = 17 [json_name = "y"]; - * @return The y. - */ - public int getY() { - if (oCase_ == 17) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 y = 17 [json_name = "y"]; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - oCase_ = 17; - o_ = value; - onChanged(); - return this; - } - /** - * int32 y = 17 [json_name = "y"]; - * @return This builder for chaining. - */ - public Builder clearY() { - if (oCase_ == 17) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.ComplexTestMsg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.ComplexTestMsg) - private static final build.buf.validate.conformance.cases.ComplexTestMsg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.ComplexTestMsg(); - } - - public static build.buf.validate.conformance.cases.ComplexTestMsg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComplexTestMsg 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.ComplexTestMsg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsgOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsgOrBuilder.java deleted file mode 100644 index b55f5e3d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/ComplexTestMsgOrBuilder.java +++ /dev/null @@ -1,242 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/kitchen_sink.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface ComplexTestMsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.ComplexTestMsg) - com.google.protobuf.MessageOrBuilder { - - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The const. - */ - java.lang.String getConst(); - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The bytes for const. - */ - com.google.protobuf.ByteString - getConstBytes(); - - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - * @return Whether the nested field is set. - */ - boolean hasNested(); - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - * @return The nested. - */ - build.buf.validate.conformance.cases.ComplexTestMsg getNested(); - /** - * .buf.validate.conformance.cases.ComplexTestMsg nested = 2 [json_name = "nested"]; - */ - build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getNestedOrBuilder(); - - /** - * int32 int_const = 3 [json_name = "intConst", (.buf.validate.field) = { ... } - * @return The intConst. - */ - int getIntConst(); - - /** - * bool bool_const = 4 [json_name = "boolConst", (.buf.validate.field) = { ... } - * @return The boolConst. - */ - boolean getBoolConst(); - - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - * @return Whether the floatVal field is set. - */ - boolean hasFloatVal(); - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - * @return The floatVal. - */ - com.google.protobuf.FloatValue getFloatVal(); - /** - * .google.protobuf.FloatValue float_val = 5 [json_name = "floatVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.FloatValueOrBuilder getFloatValOrBuilder(); - - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - * @return Whether the durVal field is set. - */ - boolean hasDurVal(); - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - * @return The durVal. - */ - com.google.protobuf.Duration getDurVal(); - /** - * .google.protobuf.Duration dur_val = 6 [json_name = "durVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getDurValOrBuilder(); - - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - * @return Whether the tsVal field is set. - */ - boolean hasTsVal(); - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - * @return The tsVal. - */ - com.google.protobuf.Timestamp getTsVal(); - /** - * .google.protobuf.Timestamp ts_val = 7 [json_name = "tsVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getTsValOrBuilder(); - - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - * @return Whether the another field is set. - */ - boolean hasAnother(); - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - * @return The another. - */ - build.buf.validate.conformance.cases.ComplexTestMsg getAnother(); - /** - * .buf.validate.conformance.cases.ComplexTestMsg another = 8 [json_name = "another"]; - */ - build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getAnotherOrBuilder(); - - /** - * float float_const = 9 [json_name = "floatConst", (.buf.validate.field) = { ... } - * @return The floatConst. - */ - float getFloatConst(); - - /** - * double double_in = 10 [json_name = "doubleIn", (.buf.validate.field) = { ... } - * @return The doubleIn. - */ - double getDoubleIn(); - - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for enumConst. - */ - int getEnumConstValue(); - /** - * .buf.validate.conformance.cases.ComplexTestEnum enum_const = 11 [json_name = "enumConst", (.buf.validate.field) = { ... } - * @return The enumConst. - */ - build.buf.validate.conformance.cases.ComplexTestEnum getEnumConst(); - - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - * @return Whether the anyVal field is set. - */ - boolean hasAnyVal(); - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - * @return The anyVal. - */ - com.google.protobuf.Any getAnyVal(); - /** - * .google.protobuf.Any any_val = 12 [json_name = "anyVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.AnyOrBuilder getAnyValOrBuilder(); - - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - java.util.List - getRepTsValList(); - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.Timestamp getRepTsVal(int index); - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - int getRepTsValCount(); - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - java.util.List - getRepTsValOrBuilderList(); - /** - * repeated .google.protobuf.Timestamp rep_ts_val = 13 [json_name = "repTsVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getRepTsValOrBuilder( - int index); - - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - int getMapValCount(); - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - boolean containsMapVal( - int key); - /** - * Use {@link #getMapValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getMapVal(); - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - java.util.Map - getMapValMap(); - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getMapValOrDefault( - int key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<sint32, string> map_val = 14 [json_name = "mapVal", (.buf.validate.field) = { ... } - */ - java.lang.String getMapValOrThrow( - int key); - - /** - * bytes bytes_val = 15 [json_name = "bytesVal", (.buf.validate.field) = { ... } - * @return The bytesVal. - */ - com.google.protobuf.ByteString getBytesVal(); - - /** - * string x = 16 [json_name = "x"]; - * @return Whether the x field is set. - */ - boolean hasX(); - /** - * string x = 16 [json_name = "x"]; - * @return The x. - */ - java.lang.String getX(); - /** - * string x = 16 [json_name = "x"]; - * @return The bytes for x. - */ - com.google.protobuf.ByteString - getXBytes(); - - /** - * int32 y = 17 [json_name = "y"]; - * @return Whether the y field is set. - */ - boolean hasY(); - /** - * int32 y = 17 [json_name = "y"]; - * @return The y. - */ - int getY(); - - build.buf.validate.conformance.cases.ComplexTestMsg.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConst.java deleted file mode 100644 index d08732d2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConst.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleConst} - */ -public final class DoubleConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleConst) - DoubleConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleConst.class.getName()); - } - // Use DoubleConst.newBuilder() to construct. - private DoubleConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleConst() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleConst.class, build.buf.validate.conformance.cases.DoubleConst.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleConst other = (build.buf.validate.conformance.cases.DoubleConst) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleConst 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.DoubleConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleConst 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.DoubleConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleConst 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.DoubleConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleConst 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.DoubleConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleConst 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.DoubleConst 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.DoubleConst 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.DoubleConst 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.DoubleConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleConst) - build.buf.validate.conformance.cases.DoubleConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleConst.class, build.buf.validate.conformance.cases.DoubleConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleConst.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleConst build() { - build.buf.validate.conformance.cases.DoubleConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleConst buildPartial() { - build.buf.validate.conformance.cases.DoubleConst result = new build.buf.validate.conformance.cases.DoubleConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleConst result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleConst) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleConst other) { - if (other == build.buf.validate.conformance.cases.DoubleConst.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleConst) - private static final build.buf.validate.conformance.cases.DoubleConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleConst(); - } - - public static build.buf.validate.conformance.cases.DoubleConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleConst 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.DoubleConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConstOrBuilder.java deleted file mode 100644 index a604c355..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleConst) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTE.java deleted file mode 100644 index 303dfdea..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleExGTELTE} - */ -public final class DoubleExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleExGTELTE) - DoubleExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleExGTELTE.class.getName()); - } - // Use DoubleExGTELTE.newBuilder() to construct. - private DoubleExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleExGTELTE.class, build.buf.validate.conformance.cases.DoubleExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleExGTELTE other = (build.buf.validate.conformance.cases.DoubleExGTELTE) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExGTELTE 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.DoubleExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExGTELTE 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.DoubleExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExGTELTE 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.DoubleExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleExGTELTE 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.DoubleExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleExGTELTE 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.DoubleExGTELTE 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.DoubleExGTELTE 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.DoubleExGTELTE 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.DoubleExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleExGTELTE) - build.buf.validate.conformance.cases.DoubleExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleExGTELTE.class, build.buf.validate.conformance.cases.DoubleExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExGTELTE build() { - build.buf.validate.conformance.cases.DoubleExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExGTELTE buildPartial() { - build.buf.validate.conformance.cases.DoubleExGTELTE result = new build.buf.validate.conformance.cases.DoubleExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleExGTELTE other) { - if (other == build.buf.validate.conformance.cases.DoubleExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleExGTELTE) - private static final build.buf.validate.conformance.cases.DoubleExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleExGTELTE(); - } - - public static build.buf.validate.conformance.cases.DoubleExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleExGTELTE 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.DoubleExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTEOrBuilder.java deleted file mode 100644 index 5643d31b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGT.java deleted file mode 100644 index ba9b462a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleExLTGT} - */ -public final class DoubleExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleExLTGT) - DoubleExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleExLTGT.class.getName()); - } - // Use DoubleExLTGT.newBuilder() to construct. - private DoubleExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleExLTGT.class, build.buf.validate.conformance.cases.DoubleExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleExLTGT other = (build.buf.validate.conformance.cases.DoubleExLTGT) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExLTGT 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.DoubleExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExLTGT 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.DoubleExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExLTGT 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.DoubleExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleExLTGT 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.DoubleExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleExLTGT 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.DoubleExLTGT 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.DoubleExLTGT 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.DoubleExLTGT 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.DoubleExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleExLTGT) - build.buf.validate.conformance.cases.DoubleExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleExLTGT.class, build.buf.validate.conformance.cases.DoubleExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExLTGT build() { - build.buf.validate.conformance.cases.DoubleExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExLTGT buildPartial() { - build.buf.validate.conformance.cases.DoubleExLTGT result = new build.buf.validate.conformance.cases.DoubleExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleExLTGT other) { - if (other == build.buf.validate.conformance.cases.DoubleExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleExLTGT) - private static final build.buf.validate.conformance.cases.DoubleExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleExLTGT(); - } - - public static build.buf.validate.conformance.cases.DoubleExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleExLTGT 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.DoubleExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGTOrBuilder.java deleted file mode 100644 index 9e464153..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExample.java deleted file mode 100644 index 83dbfdd7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExample.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleExample} - */ -public final class DoubleExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleExample) - DoubleExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleExample.class.getName()); - } - // Use DoubleExample.newBuilder() to construct. - private DoubleExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleExample() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleExample.class, build.buf.validate.conformance.cases.DoubleExample.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleExample other = (build.buf.validate.conformance.cases.DoubleExample) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExample 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.DoubleExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExample 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.DoubleExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleExample 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.DoubleExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleExample 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.DoubleExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleExample 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.DoubleExample 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.DoubleExample 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.DoubleExample 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.DoubleExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleExample) - build.buf.validate.conformance.cases.DoubleExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleExample.class, build.buf.validate.conformance.cases.DoubleExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleExample.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExample build() { - build.buf.validate.conformance.cases.DoubleExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleExample buildPartial() { - build.buf.validate.conformance.cases.DoubleExample result = new build.buf.validate.conformance.cases.DoubleExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleExample result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleExample) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleExample other) { - if (other == build.buf.validate.conformance.cases.DoubleExample.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleExample) - private static final build.buf.validate.conformance.cases.DoubleExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleExample(); - } - - public static build.buf.validate.conformance.cases.DoubleExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleExample 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.DoubleExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExampleOrBuilder.java deleted file mode 100644 index 9635b70b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleExample) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFinite.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFinite.java deleted file mode 100644 index 185566e5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFinite.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleFinite} - */ -public final class DoubleFinite extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleFinite) - DoubleFiniteOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleFinite.class.getName()); - } - // Use DoubleFinite.newBuilder() to construct. - private DoubleFinite(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleFinite() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleFinite.class, build.buf.validate.conformance.cases.DoubleFinite.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleFinite)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleFinite other = (build.buf.validate.conformance.cases.DoubleFinite) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleFinite parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleFinite 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.DoubleFinite parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleFinite 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.DoubleFinite parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleFinite 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.DoubleFinite parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleFinite 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.DoubleFinite parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleFinite 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.DoubleFinite 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.DoubleFinite 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.DoubleFinite 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.DoubleFinite} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleFinite) - build.buf.validate.conformance.cases.DoubleFiniteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleFinite.class, build.buf.validate.conformance.cases.DoubleFinite.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleFinite.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleFinite_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleFinite getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleFinite.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleFinite build() { - build.buf.validate.conformance.cases.DoubleFinite result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleFinite buildPartial() { - build.buf.validate.conformance.cases.DoubleFinite result = new build.buf.validate.conformance.cases.DoubleFinite(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleFinite result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleFinite) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleFinite)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleFinite other) { - if (other == build.buf.validate.conformance.cases.DoubleFinite.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleFinite) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleFinite) - private static final build.buf.validate.conformance.cases.DoubleFinite DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleFinite(); - } - - public static build.buf.validate.conformance.cases.DoubleFinite getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleFinite 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.DoubleFinite getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFiniteOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFiniteOrBuilder.java deleted file mode 100644 index 6b65e546..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleFiniteOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleFiniteOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleFinite) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGT.java deleted file mode 100644 index ffe2f770..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleGT} - */ -public final class DoubleGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleGT) - DoubleGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleGT.class.getName()); - } - // Use DoubleGT.newBuilder() to construct. - private DoubleGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGT.class, build.buf.validate.conformance.cases.DoubleGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleGT other = (build.buf.validate.conformance.cases.DoubleGT) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGT 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.DoubleGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGT 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.DoubleGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGT 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.DoubleGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleGT 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.DoubleGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleGT 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.DoubleGT 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.DoubleGT 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.DoubleGT 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.DoubleGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleGT) - build.buf.validate.conformance.cases.DoubleGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGT.class, build.buf.validate.conformance.cases.DoubleGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGT build() { - build.buf.validate.conformance.cases.DoubleGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGT buildPartial() { - build.buf.validate.conformance.cases.DoubleGT result = new build.buf.validate.conformance.cases.DoubleGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleGT) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleGT other) { - if (other == build.buf.validate.conformance.cases.DoubleGT.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleGT) - private static final build.buf.validate.conformance.cases.DoubleGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleGT(); - } - - public static build.buf.validate.conformance.cases.DoubleGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleGT 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.DoubleGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTE.java deleted file mode 100644 index db846358..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleGTE} - */ -public final class DoubleGTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleGTE) - DoubleGTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleGTE.class.getName()); - } - // Use DoubleGTE.newBuilder() to construct. - private DoubleGTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleGTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGTE.class, build.buf.validate.conformance.cases.DoubleGTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleGTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleGTE other = (build.buf.validate.conformance.cases.DoubleGTE) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleGTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTE 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.DoubleGTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTE 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.DoubleGTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTE 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.DoubleGTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleGTE 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.DoubleGTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleGTE 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.DoubleGTE 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.DoubleGTE 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.DoubleGTE 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.DoubleGTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleGTE) - build.buf.validate.conformance.cases.DoubleGTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGTE.class, build.buf.validate.conformance.cases.DoubleGTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleGTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleGTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTE build() { - build.buf.validate.conformance.cases.DoubleGTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTE buildPartial() { - build.buf.validate.conformance.cases.DoubleGTE result = new build.buf.validate.conformance.cases.DoubleGTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleGTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleGTE) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleGTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleGTE other) { - if (other == build.buf.validate.conformance.cases.DoubleGTE.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleGTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleGTE) - private static final build.buf.validate.conformance.cases.DoubleGTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleGTE(); - } - - public static build.buf.validate.conformance.cases.DoubleGTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleGTE 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.DoubleGTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTE.java deleted file mode 100644 index 2512870d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleGTELTE} - */ -public final class DoubleGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleGTELTE) - DoubleGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleGTELTE.class.getName()); - } - // Use DoubleGTELTE.newBuilder() to construct. - private DoubleGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGTELTE.class, build.buf.validate.conformance.cases.DoubleGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleGTELTE other = (build.buf.validate.conformance.cases.DoubleGTELTE) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTELTE 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.DoubleGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTELTE 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.DoubleGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTELTE 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.DoubleGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleGTELTE 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.DoubleGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleGTELTE 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.DoubleGTELTE 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.DoubleGTELTE 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.DoubleGTELTE 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.DoubleGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleGTELTE) - build.buf.validate.conformance.cases.DoubleGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGTELTE.class, build.buf.validate.conformance.cases.DoubleGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTELTE build() { - build.buf.validate.conformance.cases.DoubleGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTELTE buildPartial() { - build.buf.validate.conformance.cases.DoubleGTELTE result = new build.buf.validate.conformance.cases.DoubleGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleGTELTE other) { - if (other == build.buf.validate.conformance.cases.DoubleGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleGTELTE) - private static final build.buf.validate.conformance.cases.DoubleGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleGTELTE(); - } - - public static build.buf.validate.conformance.cases.DoubleGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleGTELTE 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.DoubleGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTEOrBuilder.java deleted file mode 100644 index 7adacc4a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTEOrBuilder.java deleted file mode 100644 index d49a76ee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleGTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleGTE) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLT.java deleted file mode 100644 index 2a26f8df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleGTLT} - */ -public final class DoubleGTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleGTLT) - DoubleGTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleGTLT.class.getName()); - } - // Use DoubleGTLT.newBuilder() to construct. - private DoubleGTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleGTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGTLT.class, build.buf.validate.conformance.cases.DoubleGTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleGTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleGTLT other = (build.buf.validate.conformance.cases.DoubleGTLT) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleGTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTLT 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.DoubleGTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTLT 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.DoubleGTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleGTLT 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.DoubleGTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleGTLT 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.DoubleGTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleGTLT 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.DoubleGTLT 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.DoubleGTLT 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.DoubleGTLT 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.DoubleGTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleGTLT) - build.buf.validate.conformance.cases.DoubleGTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleGTLT.class, build.buf.validate.conformance.cases.DoubleGTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleGTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleGTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleGTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTLT build() { - build.buf.validate.conformance.cases.DoubleGTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleGTLT buildPartial() { - build.buf.validate.conformance.cases.DoubleGTLT result = new build.buf.validate.conformance.cases.DoubleGTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleGTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleGTLT) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleGTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleGTLT other) { - if (other == build.buf.validate.conformance.cases.DoubleGTLT.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleGTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleGTLT) - private static final build.buf.validate.conformance.cases.DoubleGTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleGTLT(); - } - - public static build.buf.validate.conformance.cases.DoubleGTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleGTLT 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.DoubleGTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLTOrBuilder.java deleted file mode 100644 index 964284fe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleGTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleGTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTOrBuilder.java deleted file mode 100644 index 7fe5cc82..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleGT) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnore.java deleted file mode 100644 index 00eecc4a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnore.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleIgnore} - */ -public final class DoubleIgnore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleIgnore) - DoubleIgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleIgnore.class.getName()); - } - // Use DoubleIgnore.newBuilder() to construct. - private DoubleIgnore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleIgnore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleIgnore.class, build.buf.validate.conformance.cases.DoubleIgnore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleIgnore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleIgnore other = (build.buf.validate.conformance.cases.DoubleIgnore) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleIgnore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIgnore 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.DoubleIgnore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIgnore 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.DoubleIgnore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIgnore 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.DoubleIgnore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleIgnore 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.DoubleIgnore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleIgnore 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.DoubleIgnore 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.DoubleIgnore 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.DoubleIgnore 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.DoubleIgnore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleIgnore) - build.buf.validate.conformance.cases.DoubleIgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleIgnore.class, build.buf.validate.conformance.cases.DoubleIgnore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleIgnore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIgnore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIgnore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleIgnore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIgnore build() { - build.buf.validate.conformance.cases.DoubleIgnore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIgnore buildPartial() { - build.buf.validate.conformance.cases.DoubleIgnore result = new build.buf.validate.conformance.cases.DoubleIgnore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleIgnore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleIgnore) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleIgnore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleIgnore other) { - if (other == build.buf.validate.conformance.cases.DoubleIgnore.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleIgnore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleIgnore) - private static final build.buf.validate.conformance.cases.DoubleIgnore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleIgnore(); - } - - public static build.buf.validate.conformance.cases.DoubleIgnore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleIgnore 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.DoubleIgnore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnoreOrBuilder.java deleted file mode 100644 index 24354908..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleIgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleIgnore) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIn.java deleted file mode 100644 index ef2f1439..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIn.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleIn} - */ -public final class DoubleIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleIn) - DoubleInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleIn.class.getName()); - } - // Use DoubleIn.newBuilder() to construct. - private DoubleIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleIn.class, build.buf.validate.conformance.cases.DoubleIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleIn other = (build.buf.validate.conformance.cases.DoubleIn) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIn 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.DoubleIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIn 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.DoubleIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIn 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.DoubleIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleIn 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.DoubleIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleIn 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.DoubleIn 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.DoubleIn 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.DoubleIn 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.DoubleIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleIn) - build.buf.validate.conformance.cases.DoubleInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleIn.class, build.buf.validate.conformance.cases.DoubleIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIn build() { - build.buf.validate.conformance.cases.DoubleIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIn buildPartial() { - build.buf.validate.conformance.cases.DoubleIn result = new build.buf.validate.conformance.cases.DoubleIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleIn) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleIn other) { - if (other == build.buf.validate.conformance.cases.DoubleIn.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleIn) - private static final build.buf.validate.conformance.cases.DoubleIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleIn(); - } - - public static build.buf.validate.conformance.cases.DoubleIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleIn 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.DoubleIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleInOrBuilder.java deleted file mode 100644 index 13e91fac..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleIn) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectType.java deleted file mode 100644 index d2066daf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectType.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleIncorrectType} - */ -public final class DoubleIncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleIncorrectType) - DoubleIncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleIncorrectType.class.getName()); - } - // Use DoubleIncorrectType.newBuilder() to construct. - private DoubleIncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleIncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleIncorrectType.class, build.buf.validate.conformance.cases.DoubleIncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleIncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleIncorrectType other = (build.buf.validate.conformance.cases.DoubleIncorrectType) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleIncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIncorrectType 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.DoubleIncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIncorrectType 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.DoubleIncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleIncorrectType 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.DoubleIncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleIncorrectType 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.DoubleIncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleIncorrectType 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.DoubleIncorrectType 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.DoubleIncorrectType 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.DoubleIncorrectType 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.DoubleIncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleIncorrectType) - build.buf.validate.conformance.cases.DoubleIncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleIncorrectType.class, build.buf.validate.conformance.cases.DoubleIncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleIncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleIncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleIncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIncorrectType build() { - build.buf.validate.conformance.cases.DoubleIncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleIncorrectType buildPartial() { - build.buf.validate.conformance.cases.DoubleIncorrectType result = new build.buf.validate.conformance.cases.DoubleIncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleIncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleIncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleIncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleIncorrectType other) { - if (other == build.buf.validate.conformance.cases.DoubleIncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleIncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleIncorrectType) - private static final build.buf.validate.conformance.cases.DoubleIncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleIncorrectType(); - } - - public static build.buf.validate.conformance.cases.DoubleIncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleIncorrectType 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.DoubleIncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectTypeOrBuilder.java deleted file mode 100644 index 514c5d8a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleIncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleIncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleIncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLT.java deleted file mode 100644 index 73f1ef98..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleLT} - */ -public final class DoubleLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleLT) - DoubleLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleLT.class.getName()); - } - // Use DoubleLT.newBuilder() to construct. - private DoubleLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleLT.class, build.buf.validate.conformance.cases.DoubleLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleLT other = (build.buf.validate.conformance.cases.DoubleLT) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleLT 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.DoubleLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleLT 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.DoubleLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleLT 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.DoubleLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleLT 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.DoubleLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleLT 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.DoubleLT 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.DoubleLT 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.DoubleLT 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.DoubleLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleLT) - build.buf.validate.conformance.cases.DoubleLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleLT.class, build.buf.validate.conformance.cases.DoubleLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleLT build() { - build.buf.validate.conformance.cases.DoubleLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleLT buildPartial() { - build.buf.validate.conformance.cases.DoubleLT result = new build.buf.validate.conformance.cases.DoubleLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleLT) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleLT other) { - if (other == build.buf.validate.conformance.cases.DoubleLT.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleLT) - private static final build.buf.validate.conformance.cases.DoubleLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleLT(); - } - - public static build.buf.validate.conformance.cases.DoubleLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleLT 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.DoubleLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTE.java deleted file mode 100644 index 1569e9d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleLTE} - */ -public final class DoubleLTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleLTE) - DoubleLTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleLTE.class.getName()); - } - // Use DoubleLTE.newBuilder() to construct. - private DoubleLTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleLTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleLTE.class, build.buf.validate.conformance.cases.DoubleLTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleLTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleLTE other = (build.buf.validate.conformance.cases.DoubleLTE) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleLTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleLTE 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.DoubleLTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleLTE 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.DoubleLTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleLTE 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.DoubleLTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleLTE 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.DoubleLTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleLTE 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.DoubleLTE 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.DoubleLTE 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.DoubleLTE 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.DoubleLTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleLTE) - build.buf.validate.conformance.cases.DoubleLTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleLTE.class, build.buf.validate.conformance.cases.DoubleLTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleLTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleLTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleLTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleLTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleLTE build() { - build.buf.validate.conformance.cases.DoubleLTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleLTE buildPartial() { - build.buf.validate.conformance.cases.DoubleLTE result = new build.buf.validate.conformance.cases.DoubleLTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleLTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleLTE) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleLTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleLTE other) { - if (other == build.buf.validate.conformance.cases.DoubleLTE.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleLTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleLTE) - private static final build.buf.validate.conformance.cases.DoubleLTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleLTE(); - } - - public static build.buf.validate.conformance.cases.DoubleLTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleLTE 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.DoubleLTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTEOrBuilder.java deleted file mode 100644 index 74fafe84..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleLTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleLTE) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTOrBuilder.java deleted file mode 100644 index 08127e43..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleLT) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNone.java deleted file mode 100644 index 19f6fbe1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNone.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleNone} - */ -public final class DoubleNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleNone) - DoubleNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleNone.class.getName()); - } - // Use DoubleNone.newBuilder() to construct. - private DoubleNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleNone.class, build.buf.validate.conformance.cases.DoubleNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleNone other = (build.buf.validate.conformance.cases.DoubleNone) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNone 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.DoubleNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNone 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.DoubleNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNone 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.DoubleNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleNone 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.DoubleNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleNone 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.DoubleNone 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.DoubleNone 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.DoubleNone 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.DoubleNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleNone) - build.buf.validate.conformance.cases.DoubleNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleNone.class, build.buf.validate.conformance.cases.DoubleNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNone build() { - build.buf.validate.conformance.cases.DoubleNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNone buildPartial() { - build.buf.validate.conformance.cases.DoubleNone result = new build.buf.validate.conformance.cases.DoubleNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleNone) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleNone other) { - if (other == build.buf.validate.conformance.cases.DoubleNone.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleNone) - private static final build.buf.validate.conformance.cases.DoubleNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleNone(); - } - - public static build.buf.validate.conformance.cases.DoubleNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleNone 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.DoubleNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNoneOrBuilder.java deleted file mode 100644 index 03957ed6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleNone) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val"]; - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFinite.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFinite.java deleted file mode 100644 index 0ba80ecb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFinite.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleNotFinite} - */ -public final class DoubleNotFinite extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleNotFinite) - DoubleNotFiniteOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleNotFinite.class.getName()); - } - // Use DoubleNotFinite.newBuilder() to construct. - private DoubleNotFinite(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleNotFinite() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleNotFinite.class, build.buf.validate.conformance.cases.DoubleNotFinite.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleNotFinite)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleNotFinite other = (build.buf.validate.conformance.cases.DoubleNotFinite) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleNotFinite parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNotFinite 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.DoubleNotFinite parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNotFinite 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.DoubleNotFinite parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNotFinite 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.DoubleNotFinite parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleNotFinite 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.DoubleNotFinite parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleNotFinite 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.DoubleNotFinite 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.DoubleNotFinite 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.DoubleNotFinite 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.DoubleNotFinite} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleNotFinite) - build.buf.validate.conformance.cases.DoubleNotFiniteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleNotFinite.class, build.buf.validate.conformance.cases.DoubleNotFinite.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleNotFinite.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotFinite_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNotFinite getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleNotFinite.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNotFinite build() { - build.buf.validate.conformance.cases.DoubleNotFinite result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNotFinite buildPartial() { - build.buf.validate.conformance.cases.DoubleNotFinite result = new build.buf.validate.conformance.cases.DoubleNotFinite(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleNotFinite result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleNotFinite) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleNotFinite)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleNotFinite other) { - if (other == build.buf.validate.conformance.cases.DoubleNotFinite.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleNotFinite) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleNotFinite) - private static final build.buf.validate.conformance.cases.DoubleNotFinite DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleNotFinite(); - } - - public static build.buf.validate.conformance.cases.DoubleNotFinite getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleNotFinite 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.DoubleNotFinite getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFiniteOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFiniteOrBuilder.java deleted file mode 100644 index 557b343c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotFiniteOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleNotFiniteOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleNotFinite) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotIn.java deleted file mode 100644 index 5fb30f92..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotIn.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DoubleNotIn} - */ -public final class DoubleNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DoubleNotIn) - DoubleNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleNotIn.class.getName()); - } - // Use DoubleNotIn.newBuilder() to construct. - private DoubleNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleNotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleNotIn.class, build.buf.validate.conformance.cases.DoubleNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.DoubleNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DoubleNotIn other = (build.buf.validate.conformance.cases.DoubleNotIn) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DoubleNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNotIn 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.DoubleNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNotIn 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.DoubleNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DoubleNotIn 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.DoubleNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DoubleNotIn 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.DoubleNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DoubleNotIn 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.DoubleNotIn 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.DoubleNotIn 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.DoubleNotIn 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.DoubleNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DoubleNotIn) - build.buf.validate.conformance.cases.DoubleNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DoubleNotIn.class, build.buf.validate.conformance.cases.DoubleNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DoubleNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_DoubleNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DoubleNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNotIn build() { - build.buf.validate.conformance.cases.DoubleNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DoubleNotIn buildPartial() { - build.buf.validate.conformance.cases.DoubleNotIn result = new build.buf.validate.conformance.cases.DoubleNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DoubleNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DoubleNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.DoubleNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DoubleNotIn other) { - if (other == build.buf.validate.conformance.cases.DoubleNotIn.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DoubleNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DoubleNotIn) - private static final build.buf.validate.conformance.cases.DoubleNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DoubleNotIn(); - } - - public static build.buf.validate.conformance.cases.DoubleNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleNotIn 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.DoubleNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotInOrBuilder.java deleted file mode 100644 index f6972694..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DoubleNotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DoubleNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DoubleNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationConst.java deleted file mode 100644 index d22a54bb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationConst.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationConst} - */ -public final class DurationConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationConst) - DurationConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationConst.class.getName()); - } - // Use DurationConst.newBuilder() to construct. - private DurationConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationConst() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationConst.class, build.buf.validate.conformance.cases.DurationConst.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationConst other = (build.buf.validate.conformance.cases.DurationConst) 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.DurationConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationConst 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.DurationConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationConst 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.DurationConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationConst 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.DurationConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationConst 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.DurationConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationConst 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.DurationConst 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.DurationConst 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.DurationConst 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.DurationConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationConst) - build.buf.validate.conformance.cases.DurationConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationConst.class, build.buf.validate.conformance.cases.DurationConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationConst.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationConst build() { - build.buf.validate.conformance.cases.DurationConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationConst buildPartial() { - build.buf.validate.conformance.cases.DurationConst result = new build.buf.validate.conformance.cases.DurationConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationConst 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.DurationConst) { - return mergeFrom((build.buf.validate.conformance.cases.DurationConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationConst other) { - if (other == build.buf.validate.conformance.cases.DurationConst.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationConst) - private static final build.buf.validate.conformance.cases.DurationConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationConst(); - } - - public static build.buf.validate.conformance.cases.DurationConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationConst 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.DurationConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationConstOrBuilder.java deleted file mode 100644 index ab6c3424..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationConstOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationConst) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTE.java deleted file mode 100644 index 342d840c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationExGTELTE} - */ -public final class DurationExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationExGTELTE) - DurationExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationExGTELTE.class.getName()); - } - // Use DurationExGTELTE.newBuilder() to construct. - private DurationExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationExGTELTE.class, build.buf.validate.conformance.cases.DurationExGTELTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationExGTELTE other = (build.buf.validate.conformance.cases.DurationExGTELTE) 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.DurationExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExGTELTE 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.DurationExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExGTELTE 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.DurationExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExGTELTE 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.DurationExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationExGTELTE 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.DurationExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationExGTELTE 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.DurationExGTELTE 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.DurationExGTELTE 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.DurationExGTELTE 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.DurationExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationExGTELTE) - build.buf.validate.conformance.cases.DurationExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationExGTELTE.class, build.buf.validate.conformance.cases.DurationExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationExGTELTE.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExGTELTE build() { - build.buf.validate.conformance.cases.DurationExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExGTELTE buildPartial() { - build.buf.validate.conformance.cases.DurationExGTELTE result = new build.buf.validate.conformance.cases.DurationExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationExGTELTE 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.DurationExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.DurationExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationExGTELTE other) { - if (other == build.buf.validate.conformance.cases.DurationExGTELTE.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationExGTELTE) - private static final build.buf.validate.conformance.cases.DurationExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationExGTELTE(); - } - - public static build.buf.validate.conformance.cases.DurationExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationExGTELTE 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.DurationExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTEOrBuilder.java deleted file mode 100644 index 8bdd5158..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExGTELTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGT.java deleted file mode 100644 index 345f62b4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationExLTGT} - */ -public final class DurationExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationExLTGT) - DurationExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationExLTGT.class.getName()); - } - // Use DurationExLTGT.newBuilder() to construct. - private DurationExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationExLTGT.class, build.buf.validate.conformance.cases.DurationExLTGT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationExLTGT other = (build.buf.validate.conformance.cases.DurationExLTGT) 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.DurationExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExLTGT 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.DurationExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExLTGT 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.DurationExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExLTGT 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.DurationExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationExLTGT 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.DurationExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationExLTGT 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.DurationExLTGT 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.DurationExLTGT 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.DurationExLTGT 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.DurationExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationExLTGT) - build.buf.validate.conformance.cases.DurationExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationExLTGT.class, build.buf.validate.conformance.cases.DurationExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationExLTGT.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExLTGT build() { - build.buf.validate.conformance.cases.DurationExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExLTGT buildPartial() { - build.buf.validate.conformance.cases.DurationExLTGT result = new build.buf.validate.conformance.cases.DurationExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationExLTGT 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.DurationExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.DurationExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationExLTGT other) { - if (other == build.buf.validate.conformance.cases.DurationExLTGT.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationExLTGT) - private static final build.buf.validate.conformance.cases.DurationExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationExLTGT(); - } - - public static build.buf.validate.conformance.cases.DurationExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationExLTGT 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.DurationExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGTOrBuilder.java deleted file mode 100644 index f8975ce7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExLTGTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExample.java deleted file mode 100644 index 8c45be0b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExample.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationExample} - */ -public final class DurationExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationExample) - DurationExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationExample.class.getName()); - } - // Use DurationExample.newBuilder() to construct. - private DurationExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationExample() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationExample.class, build.buf.validate.conformance.cases.DurationExample.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationExample other = (build.buf.validate.conformance.cases.DurationExample) 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.DurationExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExample 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.DurationExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExample 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.DurationExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationExample 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.DurationExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationExample 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.DurationExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationExample 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.DurationExample 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.DurationExample 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.DurationExample 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.DurationExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationExample) - build.buf.validate.conformance.cases.DurationExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationExample.class, build.buf.validate.conformance.cases.DurationExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationExample.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExample build() { - build.buf.validate.conformance.cases.DurationExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationExample buildPartial() { - build.buf.validate.conformance.cases.DurationExample result = new build.buf.validate.conformance.cases.DurationExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationExample 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.DurationExample) { - return mergeFrom((build.buf.validate.conformance.cases.DurationExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationExample other) { - if (other == build.buf.validate.conformance.cases.DurationExample.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationExample) - private static final build.buf.validate.conformance.cases.DurationExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationExample(); - } - - public static build.buf.validate.conformance.cases.DurationExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationExample 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.DurationExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExampleOrBuilder.java deleted file mode 100644 index 2f71310c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationExampleOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationExample) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFields.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFields.java deleted file mode 100644 index 8145f0cc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFields.java +++ /dev/null @@ -1,634 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - *

- * Regression for earlier bug where missing Duration field would short circuit
- * evaluation in C++.
- * 
- * - * Protobuf type {@code buf.validate.conformance.cases.DurationFieldWithOtherFields} - */ -public final class DurationFieldWithOtherFields extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationFieldWithOtherFields) - DurationFieldWithOtherFieldsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationFieldWithOtherFields.class.getName()); - } - // Use DurationFieldWithOtherFields.newBuilder() to construct. - private DurationFieldWithOtherFields(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationFieldWithOtherFields() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationFieldWithOtherFields.class, build.buf.validate.conformance.cases.DurationFieldWithOtherFields.Builder.class); - } - - private int bitField0_; - public static final int DURATION_VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration durationVal_; - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - * @return Whether the durationVal field is set. - */ - @java.lang.Override - public boolean hasDurationVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - * @return The durationVal. - */ - @java.lang.Override - public com.google.protobuf.Duration getDurationVal() { - return durationVal_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationVal_; - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getDurationValOrBuilder() { - return durationVal_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationVal_; - } - - public static final int INT_VAL_FIELD_NUMBER = 2; - private int intVal_ = 0; - /** - * int32 int_val = 2 [json_name = "intVal", (.buf.validate.field) = { ... } - * @return The intVal. - */ - @java.lang.Override - public int getIntVal() { - return intVal_; - } - - 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, getDurationVal()); - } - if (intVal_ != 0) { - output.writeInt32(2, intVal_); - } - 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, getDurationVal()); - } - if (intVal_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, intVal_); - } - 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.DurationFieldWithOtherFields)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationFieldWithOtherFields other = (build.buf.validate.conformance.cases.DurationFieldWithOtherFields) obj; - - if (hasDurationVal() != other.hasDurationVal()) return false; - if (hasDurationVal()) { - if (!getDurationVal() - .equals(other.getDurationVal())) return false; - } - if (getIntVal() - != other.getIntVal()) 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 (hasDurationVal()) { - hash = (37 * hash) + DURATION_VAL_FIELD_NUMBER; - hash = (53 * hash) + getDurationVal().hashCode(); - } - hash = (37 * hash) + INT_VAL_FIELD_NUMBER; - hash = (53 * hash) + getIntVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields 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.DurationFieldWithOtherFields 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; - } - /** - *
-   * Regression for earlier bug where missing Duration field would short circuit
-   * evaluation in C++.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.cases.DurationFieldWithOtherFields} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationFieldWithOtherFields) - build.buf.validate.conformance.cases.DurationFieldWithOtherFieldsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationFieldWithOtherFields.class, build.buf.validate.conformance.cases.DurationFieldWithOtherFields.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationFieldWithOtherFields.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getDurationValFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - durationVal_ = null; - if (durationValBuilder_ != null) { - durationValBuilder_.dispose(); - durationValBuilder_ = null; - } - intVal_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationFieldWithOtherFields getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationFieldWithOtherFields.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationFieldWithOtherFields build() { - build.buf.validate.conformance.cases.DurationFieldWithOtherFields result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationFieldWithOtherFields buildPartial() { - build.buf.validate.conformance.cases.DurationFieldWithOtherFields result = new build.buf.validate.conformance.cases.DurationFieldWithOtherFields(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationFieldWithOtherFields result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.durationVal_ = durationValBuilder_ == null - ? durationVal_ - : durationValBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.intVal_ = intVal_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.DurationFieldWithOtherFields) { - return mergeFrom((build.buf.validate.conformance.cases.DurationFieldWithOtherFields)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationFieldWithOtherFields other) { - if (other == build.buf.validate.conformance.cases.DurationFieldWithOtherFields.getDefaultInstance()) return this; - if (other.hasDurationVal()) { - mergeDurationVal(other.getDurationVal()); - } - if (other.getIntVal() != 0) { - setIntVal(other.getIntVal()); - } - 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( - getDurationValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - intVal_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - 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.Duration durationVal_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> durationValBuilder_; - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - * @return Whether the durationVal field is set. - */ - public boolean hasDurationVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - * @return The durationVal. - */ - public com.google.protobuf.Duration getDurationVal() { - if (durationValBuilder_ == null) { - return durationVal_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationVal_; - } else { - return durationValBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - public Builder setDurationVal(com.google.protobuf.Duration value) { - if (durationValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - durationVal_ = value; - } else { - durationValBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - public Builder setDurationVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (durationValBuilder_ == null) { - durationVal_ = builderForValue.build(); - } else { - durationValBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - public Builder mergeDurationVal(com.google.protobuf.Duration value) { - if (durationValBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - durationVal_ != null && - durationVal_ != com.google.protobuf.Duration.getDefaultInstance()) { - getDurationValBuilder().mergeFrom(value); - } else { - durationVal_ = value; - } - } else { - durationValBuilder_.mergeFrom(value); - } - if (durationVal_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - public Builder clearDurationVal() { - bitField0_ = (bitField0_ & ~0x00000001); - durationVal_ = null; - if (durationValBuilder_ != null) { - durationValBuilder_.dispose(); - durationValBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getDurationValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getDurationValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getDurationValOrBuilder() { - if (durationValBuilder_ != null) { - return durationValBuilder_.getMessageOrBuilder(); - } else { - return durationVal_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : durationVal_; - } - } - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getDurationValFieldBuilder() { - if (durationValBuilder_ == null) { - durationValBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getDurationVal(), - getParentForChildren(), - isClean()); - durationVal_ = null; - } - return durationValBuilder_; - } - - private int intVal_ ; - /** - * int32 int_val = 2 [json_name = "intVal", (.buf.validate.field) = { ... } - * @return The intVal. - */ - @java.lang.Override - public int getIntVal() { - return intVal_; - } - /** - * int32 int_val = 2 [json_name = "intVal", (.buf.validate.field) = { ... } - * @param value The intVal to set. - * @return This builder for chaining. - */ - public Builder setIntVal(int value) { - - intVal_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * int32 int_val = 2 [json_name = "intVal", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearIntVal() { - bitField0_ = (bitField0_ & ~0x00000002); - intVal_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationFieldWithOtherFields) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationFieldWithOtherFields) - private static final build.buf.validate.conformance.cases.DurationFieldWithOtherFields DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationFieldWithOtherFields(); - } - - public static build.buf.validate.conformance.cases.DurationFieldWithOtherFields getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationFieldWithOtherFields 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.DurationFieldWithOtherFields getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFieldsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFieldsOrBuilder.java deleted file mode 100644 index 0118cdae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationFieldWithOtherFieldsOrBuilder.java +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationFieldWithOtherFieldsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationFieldWithOtherFields) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - * @return Whether the durationVal field is set. - */ - boolean hasDurationVal(); - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - * @return The durationVal. - */ - com.google.protobuf.Duration getDurationVal(); - /** - * .google.protobuf.Duration duration_val = 1 [json_name = "durationVal", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getDurationValOrBuilder(); - - /** - * int32 int_val = 2 [json_name = "intVal", (.buf.validate.field) = { ... } - * @return The intVal. - */ - int getIntVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGT.java deleted file mode 100644 index 76b4ed3b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationGT} - */ -public final class DurationGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationGT) - DurationGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationGT.class.getName()); - } - // Use DurationGT.newBuilder() to construct. - private DurationGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGT.class, build.buf.validate.conformance.cases.DurationGT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationGT other = (build.buf.validate.conformance.cases.DurationGT) 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.DurationGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGT 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.DurationGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGT 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.DurationGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGT 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.DurationGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationGT 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.DurationGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationGT 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.DurationGT 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.DurationGT 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.DurationGT 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.DurationGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationGT) - build.buf.validate.conformance.cases.DurationGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGT.class, build.buf.validate.conformance.cases.DurationGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationGT.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGT build() { - build.buf.validate.conformance.cases.DurationGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGT buildPartial() { - build.buf.validate.conformance.cases.DurationGT result = new build.buf.validate.conformance.cases.DurationGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationGT 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.DurationGT) { - return mergeFrom((build.buf.validate.conformance.cases.DurationGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationGT other) { - if (other == build.buf.validate.conformance.cases.DurationGT.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationGT) - private static final build.buf.validate.conformance.cases.DurationGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationGT(); - } - - public static build.buf.validate.conformance.cases.DurationGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationGT 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.DurationGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTE.java deleted file mode 100644 index ada2c41e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationGTE} - */ -public final class DurationGTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationGTE) - DurationGTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationGTE.class.getName()); - } - // Use DurationGTE.newBuilder() to construct. - private DurationGTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationGTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGTE.class, build.buf.validate.conformance.cases.DurationGTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationGTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationGTE other = (build.buf.validate.conformance.cases.DurationGTE) 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.DurationGTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTE 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.DurationGTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTE 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.DurationGTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTE 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.DurationGTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationGTE 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.DurationGTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationGTE 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.DurationGTE 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.DurationGTE 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.DurationGTE 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.DurationGTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationGTE) - build.buf.validate.conformance.cases.DurationGTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGTE.class, build.buf.validate.conformance.cases.DurationGTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationGTE.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationGTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTE build() { - build.buf.validate.conformance.cases.DurationGTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTE buildPartial() { - build.buf.validate.conformance.cases.DurationGTE result = new build.buf.validate.conformance.cases.DurationGTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationGTE 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.DurationGTE) { - return mergeFrom((build.buf.validate.conformance.cases.DurationGTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationGTE other) { - if (other == build.buf.validate.conformance.cases.DurationGTE.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationGTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationGTE) - private static final build.buf.validate.conformance.cases.DurationGTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationGTE(); - } - - public static build.buf.validate.conformance.cases.DurationGTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationGTE 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.DurationGTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTE.java deleted file mode 100644 index 5c0ffd4e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationGTELTE} - */ -public final class DurationGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationGTELTE) - DurationGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationGTELTE.class.getName()); - } - // Use DurationGTELTE.newBuilder() to construct. - private DurationGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGTELTE.class, build.buf.validate.conformance.cases.DurationGTELTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationGTELTE other = (build.buf.validate.conformance.cases.DurationGTELTE) 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.DurationGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTELTE 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.DurationGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTELTE 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.DurationGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTELTE 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.DurationGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationGTELTE 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.DurationGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationGTELTE 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.DurationGTELTE 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.DurationGTELTE 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.DurationGTELTE 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.DurationGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationGTELTE) - build.buf.validate.conformance.cases.DurationGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGTELTE.class, build.buf.validate.conformance.cases.DurationGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationGTELTE.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTELTE build() { - build.buf.validate.conformance.cases.DurationGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTELTE buildPartial() { - build.buf.validate.conformance.cases.DurationGTELTE result = new build.buf.validate.conformance.cases.DurationGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationGTELTE 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.DurationGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.DurationGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationGTELTE other) { - if (other == build.buf.validate.conformance.cases.DurationGTELTE.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationGTELTE) - private static final build.buf.validate.conformance.cases.DurationGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationGTELTE(); - } - - public static build.buf.validate.conformance.cases.DurationGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationGTELTE 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.DurationGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTEOrBuilder.java deleted file mode 100644 index abf245b6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTELTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTEOrBuilder.java deleted file mode 100644 index f3a65c29..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationGTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationGTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLT.java deleted file mode 100644 index 2a3c2768..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationGTLT} - */ -public final class DurationGTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationGTLT) - DurationGTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationGTLT.class.getName()); - } - // Use DurationGTLT.newBuilder() to construct. - private DurationGTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationGTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGTLT.class, build.buf.validate.conformance.cases.DurationGTLT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationGTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationGTLT other = (build.buf.validate.conformance.cases.DurationGTLT) 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.DurationGTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTLT 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.DurationGTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTLT 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.DurationGTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationGTLT 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.DurationGTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationGTLT 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.DurationGTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationGTLT 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.DurationGTLT 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.DurationGTLT 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.DurationGTLT 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.DurationGTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationGTLT) - build.buf.validate.conformance.cases.DurationGTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationGTLT.class, build.buf.validate.conformance.cases.DurationGTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationGTLT.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationGTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationGTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTLT build() { - build.buf.validate.conformance.cases.DurationGTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationGTLT buildPartial() { - build.buf.validate.conformance.cases.DurationGTLT result = new build.buf.validate.conformance.cases.DurationGTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationGTLT 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.DurationGTLT) { - return mergeFrom((build.buf.validate.conformance.cases.DurationGTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationGTLT other) { - if (other == build.buf.validate.conformance.cases.DurationGTLT.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationGTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationGTLT) - private static final build.buf.validate.conformance.cases.DurationGTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationGTLT(); - } - - public static build.buf.validate.conformance.cases.DurationGTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationGTLT 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.DurationGTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLTOrBuilder.java deleted file mode 100644 index 90c73f19..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTLTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationGTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationGTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTOrBuilder.java deleted file mode 100644 index 246f9e37..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationGTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationGT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationIn.java deleted file mode 100644 index 84d345e2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationIn.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationIn} - */ -public final class DurationIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationIn) - DurationInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationIn.class.getName()); - } - // Use DurationIn.newBuilder() to construct. - private DurationIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationIn.class, build.buf.validate.conformance.cases.DurationIn.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationIn other = (build.buf.validate.conformance.cases.DurationIn) 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.DurationIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationIn 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.DurationIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationIn 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.DurationIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationIn 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.DurationIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationIn 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.DurationIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationIn 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.DurationIn 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.DurationIn 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.DurationIn 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.DurationIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationIn) - build.buf.validate.conformance.cases.DurationInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationIn.class, build.buf.validate.conformance.cases.DurationIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationIn.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationIn build() { - build.buf.validate.conformance.cases.DurationIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationIn buildPartial() { - build.buf.validate.conformance.cases.DurationIn result = new build.buf.validate.conformance.cases.DurationIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationIn 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.DurationIn) { - return mergeFrom((build.buf.validate.conformance.cases.DurationIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationIn other) { - if (other == build.buf.validate.conformance.cases.DurationIn.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationIn) - private static final build.buf.validate.conformance.cases.DurationIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationIn(); - } - - public static build.buf.validate.conformance.cases.DurationIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationIn 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.DurationIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationInOrBuilder.java deleted file mode 100644 index 4e98f707..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationInOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLT.java deleted file mode 100644 index 3c67aafa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationLT} - */ -public final class DurationLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationLT) - DurationLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationLT.class.getName()); - } - // Use DurationLT.newBuilder() to construct. - private DurationLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationLT.class, build.buf.validate.conformance.cases.DurationLT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationLT other = (build.buf.validate.conformance.cases.DurationLT) 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.DurationLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationLT 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.DurationLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationLT 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.DurationLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationLT 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.DurationLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationLT 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.DurationLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationLT 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.DurationLT 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.DurationLT 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.DurationLT 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.DurationLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationLT) - build.buf.validate.conformance.cases.DurationLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationLT.class, build.buf.validate.conformance.cases.DurationLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationLT.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationLT build() { - build.buf.validate.conformance.cases.DurationLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationLT buildPartial() { - build.buf.validate.conformance.cases.DurationLT result = new build.buf.validate.conformance.cases.DurationLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationLT 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.DurationLT) { - return mergeFrom((build.buf.validate.conformance.cases.DurationLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationLT other) { - if (other == build.buf.validate.conformance.cases.DurationLT.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationLT) - private static final build.buf.validate.conformance.cases.DurationLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationLT(); - } - - public static build.buf.validate.conformance.cases.DurationLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationLT 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.DurationLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTE.java deleted file mode 100644 index e70b0ee5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationLTE} - */ -public final class DurationLTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationLTE) - DurationLTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationLTE.class.getName()); - } - // Use DurationLTE.newBuilder() to construct. - private DurationLTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationLTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationLTE.class, build.buf.validate.conformance.cases.DurationLTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationLTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationLTE other = (build.buf.validate.conformance.cases.DurationLTE) 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.DurationLTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationLTE 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.DurationLTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationLTE 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.DurationLTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationLTE 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.DurationLTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationLTE 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.DurationLTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationLTE 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.DurationLTE 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.DurationLTE 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.DurationLTE 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.DurationLTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationLTE) - build.buf.validate.conformance.cases.DurationLTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationLTE.class, build.buf.validate.conformance.cases.DurationLTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationLTE.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationLTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationLTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationLTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationLTE build() { - build.buf.validate.conformance.cases.DurationLTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationLTE buildPartial() { - build.buf.validate.conformance.cases.DurationLTE result = new build.buf.validate.conformance.cases.DurationLTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationLTE 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.DurationLTE) { - return mergeFrom((build.buf.validate.conformance.cases.DurationLTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationLTE other) { - if (other == build.buf.validate.conformance.cases.DurationLTE.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationLTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationLTE) - private static final build.buf.validate.conformance.cases.DurationLTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationLTE(); - } - - public static build.buf.validate.conformance.cases.DurationLTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationLTE 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.DurationLTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTEOrBuilder.java deleted file mode 100644 index 65f6ff63..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationLTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationLTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTOrBuilder.java deleted file mode 100644 index 78741a9b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationLTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationLT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNone.java deleted file mode 100644 index 9e0bd366..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNone.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationNone} - */ -public final class DurationNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationNone) - DurationNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationNone.class.getName()); - } - // Use DurationNone.newBuilder() to construct. - private DurationNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationNone.class, build.buf.validate.conformance.cases.DurationNone.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationNone other = (build.buf.validate.conformance.cases.DurationNone) 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.DurationNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationNone 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.DurationNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationNone 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.DurationNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationNone 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.DurationNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationNone 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.DurationNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationNone 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.DurationNone 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.DurationNone 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.DurationNone 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.DurationNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationNone) - build.buf.validate.conformance.cases.DurationNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationNone.class, build.buf.validate.conformance.cases.DurationNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationNone.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationNone build() { - build.buf.validate.conformance.cases.DurationNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationNone buildPartial() { - build.buf.validate.conformance.cases.DurationNone result = new build.buf.validate.conformance.cases.DurationNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationNone 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.DurationNone) { - return mergeFrom((build.buf.validate.conformance.cases.DurationNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationNone other) { - if (other == build.buf.validate.conformance.cases.DurationNone.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationNone) - private static final build.buf.validate.conformance.cases.DurationNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationNone(); - } - - public static build.buf.validate.conformance.cases.DurationNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationNone 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.DurationNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNoneOrBuilder.java deleted file mode 100644 index 75875a85..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNoneOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationNone) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val"]; - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotIn.java deleted file mode 100644 index 38472a1c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotIn.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationNotIn} - */ -public final class DurationNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationNotIn) - DurationNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationNotIn.class.getName()); - } - // Use DurationNotIn.newBuilder() to construct. - private DurationNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationNotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationNotIn.class, build.buf.validate.conformance.cases.DurationNotIn.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationNotIn other = (build.buf.validate.conformance.cases.DurationNotIn) 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.DurationNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationNotIn 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.DurationNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationNotIn 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.DurationNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationNotIn 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.DurationNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationNotIn 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.DurationNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationNotIn 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.DurationNotIn 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.DurationNotIn 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.DurationNotIn 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.DurationNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationNotIn) - build.buf.validate.conformance.cases.DurationNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationNotIn.class, build.buf.validate.conformance.cases.DurationNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationNotIn.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationNotIn build() { - build.buf.validate.conformance.cases.DurationNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationNotIn buildPartial() { - build.buf.validate.conformance.cases.DurationNotIn result = new build.buf.validate.conformance.cases.DurationNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationNotIn 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.DurationNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.DurationNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationNotIn other) { - if (other == build.buf.validate.conformance.cases.DurationNotIn.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationNotIn) - private static final build.buf.validate.conformance.cases.DurationNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationNotIn(); - } - - public static build.buf.validate.conformance.cases.DurationNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationNotIn 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.DurationNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotInOrBuilder.java deleted file mode 100644 index 6e0ce072..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationNotInOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequired.java deleted file mode 100644 index 99aa137e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequired.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.DurationRequired} - */ -public final class DurationRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.DurationRequired) - DurationRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationRequired.class.getName()); - } - // Use DurationRequired.newBuilder() to construct. - private DurationRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DurationRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationRequired.class, build.buf.validate.conformance.cases.DurationRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.DurationRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.DurationRequired other = (build.buf.validate.conformance.cases.DurationRequired) 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.DurationRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationRequired 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.DurationRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationRequired 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.DurationRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.DurationRequired 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.DurationRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.DurationRequired 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.DurationRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.DurationRequired 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.DurationRequired 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.DurationRequired 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.DurationRequired 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.DurationRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.DurationRequired) - build.buf.validate.conformance.cases.DurationRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.DurationRequired.class, build.buf.validate.conformance.cases.DurationRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.DurationRequired.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.WktDurationProto.internal_static_buf_validate_conformance_cases_DurationRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.DurationRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationRequired build() { - build.buf.validate.conformance.cases.DurationRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.DurationRequired buildPartial() { - build.buf.validate.conformance.cases.DurationRequired result = new build.buf.validate.conformance.cases.DurationRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.DurationRequired 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.DurationRequired) { - return mergeFrom((build.buf.validate.conformance.cases.DurationRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.DurationRequired other) { - if (other == build.buf.validate.conformance.cases.DurationRequired.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.DurationRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.DurationRequired) - private static final build.buf.validate.conformance.cases.DurationRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.DurationRequired(); - } - - public static build.buf.validate.conformance.cases.DurationRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationRequired 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.DurationRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequiredOrBuilder.java deleted file mode 100644 index 6ed19c25..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/DurationRequiredOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface DurationRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.DurationRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefault.java deleted file mode 100644 index 33a3e3b3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapIgnoreDefault} - */ -public final class EditionsMapIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapIgnoreDefault) - EditionsMapIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapIgnoreDefault.class.getName()); - } - // Use EditionsMapIgnoreDefault.newBuilder() to construct. - private EditionsMapIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMapIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMapIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMapIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMapIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMapIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMapIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMapIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapIgnoreDefault 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.EditionsMapIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefaultOrBuilder.java deleted file mode 100644 index 352097eb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmpty.java deleted file mode 100644 index dd743384..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapIgnoreEmpty} - */ -public final class EditionsMapIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapIgnoreEmpty) - EditionsMapIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapIgnoreEmpty.class.getName()); - } - // Use EditionsMapIgnoreEmpty.newBuilder() to construct. - private EditionsMapIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMapIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapIgnoreEmpty 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.EditionsMapIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmptyOrBuilder.java deleted file mode 100644 index 52b621dc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecified.java deleted file mode 100644 index 6bf54c09..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapIgnoreUnspecified} - */ -public final class EditionsMapIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) - EditionsMapIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapIgnoreUnspecified.class.getName()); - } - // Use EditionsMapIgnoreUnspecified.newBuilder() to construct. - private EditionsMapIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMapIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapIgnoreUnspecified 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.EditionsMapIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index ecc0c4db..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefault.java deleted file mode 100644 index 4e855320..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault} - */ -public final class EditionsMapKeyIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) - EditionsMapKeyIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapKeyIgnoreDefault.class.getName()); - } - // Use EditionsMapKeyIgnoreDefault.newBuilder() to construct. - private EditionsMapKeyIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapKeyIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapKeyIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapKeyIgnoreDefault 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.EditionsMapKeyIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefaultOrBuilder.java deleted file mode 100644 index de58c189..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapKeyIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapKeyIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmpty.java deleted file mode 100644 index 9946c01d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty} - */ -public final class EditionsMapKeyIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) - EditionsMapKeyIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapKeyIgnoreEmpty.class.getName()); - } - // Use EditionsMapKeyIgnoreEmpty.newBuilder() to construct. - private EditionsMapKeyIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapKeyIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapKeyIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapKeyIgnoreEmpty 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.EditionsMapKeyIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmptyOrBuilder.java deleted file mode 100644 index 3cfffaa0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapKeyIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapKeyIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecified.java deleted file mode 100644 index 181aa047..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified} - */ -public final class EditionsMapKeyIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) - EditionsMapKeyIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapKeyIgnoreUnspecified.class.getName()); - } - // Use EditionsMapKeyIgnoreUnspecified.newBuilder() to construct. - private EditionsMapKeyIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapKeyIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapKeyIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapKeyIgnoreUnspecified 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.EditionsMapKeyIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 2cffa215..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapKeyIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapKeyIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapKeyIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefault.java deleted file mode 100644 index 5aaa970d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapValueIgnoreDefault} - */ -public final class EditionsMapValueIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) - EditionsMapValueIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapValueIgnoreDefault.class.getName()); - } - // Use EditionsMapValueIgnoreDefault.newBuilder() to construct. - private EditionsMapValueIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapValueIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapValueIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapValueIgnoreDefault 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.EditionsMapValueIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefaultOrBuilder.java deleted file mode 100644 index 38cc9b69..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapValueIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapValueIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmpty.java deleted file mode 100644 index 3cf0ca4a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty} - */ -public final class EditionsMapValueIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) - EditionsMapValueIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapValueIgnoreEmpty.class.getName()); - } - // Use EditionsMapValueIgnoreEmpty.newBuilder() to construct. - private EditionsMapValueIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapValueIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapValueIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapValueIgnoreEmpty 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.EditionsMapValueIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmptyOrBuilder.java deleted file mode 100644 index 29589a0c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapValueIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapValueIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecified.java deleted file mode 100644 index 48d58d9d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified} - */ -public final class EditionsMapValueIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) - EditionsMapValueIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMapValueIgnoreUnspecified.class.getName()); - } - // Use EditionsMapValueIgnoreUnspecified.newBuilder() to construct. - private EditionsMapValueIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMapValueIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.EditionsMapValueIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMapValueIgnoreUnspecified 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.EditionsMapValueIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index a0c6c3ab..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMapValueIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMapValueIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMapValueIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefault.java deleted file mode 100644 index 0acb90a2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefault.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault} - */ -public final class EditionsMessageExplicitPresenceDelimitedIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) - EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageExplicitPresenceDelimitedIgnoreDefault.class.getName()); - } - // Use EditionsMessageExplicitPresenceDelimitedIgnoreDefault.newBuilder() to construct. - private EditionsMessageExplicitPresenceDelimitedIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageExplicitPresenceDelimitedIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.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.writeGroup(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 - .computeGroupSize(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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageExplicitPresenceDelimitedIgnoreDefault 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.EditionsMessageExplicitPresenceDelimitedIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder.java deleted file mode 100644 index 79e8b782..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageExplicitPresenceDelimitedIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.java deleted file mode 100644 index b17fcdc8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty} - */ -public final class EditionsMessageExplicitPresenceDelimitedIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) - EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.class.getName()); - } - // Use EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.newBuilder() to construct. - private EditionsMessageExplicitPresenceDelimitedIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageExplicitPresenceDelimitedIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.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.writeGroup(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 - .computeGroupSize(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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageExplicitPresenceDelimitedIgnoreEmpty 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.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder.java deleted file mode 100644 index 94aa6ad3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageExplicitPresenceDelimitedIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.java deleted file mode 100644 index d9b2e594..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified} - */ -public final class EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) - EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.class.getName()); - } - // Use EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.newBuilder() to construct. - private EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.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.writeGroup(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 - .computeGroupSize(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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified 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.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index a4586a01..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageExplicitPresenceDelimitedIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefault.java deleted file mode 100644 index 61972027..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefault.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault} - */ -public final class EditionsMessageExplicitPresenceIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault) - EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageExplicitPresenceIgnoreDefault.class.getName()); - } - // Use EditionsMessageExplicitPresenceIgnoreDefault.newBuilder() to construct. - private EditionsMessageExplicitPresenceIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageExplicitPresenceIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg) 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageExplicitPresenceIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.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.EditionsMessageExplicitPresenceIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault) 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.EditionsMessageExplicitPresenceIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.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 build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg 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; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageExplicitPresenceIgnoreDefault 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.EditionsMessageExplicitPresenceIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder.java deleted file mode 100644 index 5bb71a9a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageExplicitPresenceIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmpty.java deleted file mode 100644 index 66b3a343..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmpty.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty} - */ -public final class EditionsMessageExplicitPresenceIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty) - EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageExplicitPresenceIgnoreEmpty.class.getName()); - } - // Use EditionsMessageExplicitPresenceIgnoreEmpty.newBuilder() to construct. - private EditionsMessageExplicitPresenceIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageExplicitPresenceIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageExplicitPresenceIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.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.EditionsMessageExplicitPresenceIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty) 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.EditionsMessageExplicitPresenceIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.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 build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg 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; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageExplicitPresenceIgnoreEmpty 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.EditionsMessageExplicitPresenceIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder.java deleted file mode 100644 index 827c6ba0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageExplicitPresenceIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecified.java deleted file mode 100644 index 26bba3ba..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecified.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified} - */ -public final class EditionsMessageExplicitPresenceIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified) - EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageExplicitPresenceIgnoreUnspecified.class.getName()); - } - // Use EditionsMessageExplicitPresenceIgnoreUnspecified.newBuilder() to construct. - private EditionsMessageExplicitPresenceIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageExplicitPresenceIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.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.EditionsMessageExplicitPresenceIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified) 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.EditionsMessageExplicitPresenceIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.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 build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg 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; - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageExplicitPresenceIgnoreUnspecified 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.EditionsMessageExplicitPresenceIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 295aa9db..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageExplicitPresenceIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageExplicitPresenceIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefault.java deleted file mode 100644 index 9150164a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefault.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault} - */ -public final class EditionsMessageLegacyRequiredDelimitedIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) - EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageLegacyRequiredDelimitedIgnoreDefault.class.getName()); - } - // Use EditionsMessageLegacyRequiredDelimitedIgnoreDefault.newBuilder() to construct. - private EditionsMessageLegacyRequiredDelimitedIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageLegacyRequiredDelimitedIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeGroup(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 - .computeGroupSize(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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageLegacyRequiredDelimitedIgnoreDefault 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.EditionsMessageLegacyRequiredDelimitedIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder.java deleted file mode 100644 index ca85af02..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageLegacyRequiredDelimitedIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.java deleted file mode 100644 index 5bb8199a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty} - */ -public final class EditionsMessageLegacyRequiredDelimitedIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) - EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.class.getName()); - } - // Use EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.newBuilder() to construct. - private EditionsMessageLegacyRequiredDelimitedIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageLegacyRequiredDelimitedIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeGroup(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 - .computeGroupSize(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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageLegacyRequiredDelimitedIgnoreEmpty 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.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder.java deleted file mode 100644 index 633441d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageLegacyRequiredDelimitedIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.java deleted file mode 100644 index 48a396c5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified} - */ -public final class EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) - EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.class.getName()); - } - // Use EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.newBuilder() to construct. - private EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeGroup(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 - .computeGroupSize(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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified 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.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index e17f534f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageLegacyRequiredDelimitedIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefault.java deleted file mode 100644 index d9100d2c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefault.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault} - */ -public final class EditionsMessageLegacyRequiredIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault) - EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageLegacyRequiredIgnoreDefault.class.getName()); - } - // Use EditionsMessageLegacyRequiredIgnoreDefault.newBuilder() to construct. - private EditionsMessageLegacyRequiredIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageLegacyRequiredIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg) 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageLegacyRequiredIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.EditionsMessageLegacyRequiredIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault) 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.EditionsMessageLegacyRequiredIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageLegacyRequiredIgnoreDefault 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.EditionsMessageLegacyRequiredIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder.java deleted file mode 100644 index 67a3329b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageLegacyRequiredIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmpty.java deleted file mode 100644 index ea97f3f8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmpty.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty} - */ -public final class EditionsMessageLegacyRequiredIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty) - EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageLegacyRequiredIgnoreEmpty.class.getName()); - } - // Use EditionsMessageLegacyRequiredIgnoreEmpty.newBuilder() to construct. - private EditionsMessageLegacyRequiredIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageLegacyRequiredIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageLegacyRequiredIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.EditionsMessageLegacyRequiredIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty) 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.EditionsMessageLegacyRequiredIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageLegacyRequiredIgnoreEmpty 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.EditionsMessageLegacyRequiredIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder.java deleted file mode 100644 index 96f48f22..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageLegacyRequiredIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecified.java deleted file mode 100644 index 261ef150..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecified.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified} - */ -public final class EditionsMessageLegacyRequiredIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified) - EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsMessageLegacyRequiredIgnoreUnspecified.class.getName()); - } - // Use EditionsMessageLegacyRequiredIgnoreUnspecified.newBuilder() to construct. - private EditionsMessageLegacyRequiredIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsMessageLegacyRequiredIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.EditionsMessageLegacyRequiredIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified) 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.EditionsMessageLegacyRequiredIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.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.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsMessageLegacyRequiredIgnoreUnspecified 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.EditionsMessageLegacyRequiredIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index c48de776..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsMessageLegacyRequiredIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg getVal(); - /** - * .buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.EditionsMessageLegacyRequiredIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefault.java deleted file mode 100644 index 28980d6a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsOneofIgnoreDefault} - */ -public final class EditionsOneofIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsOneofIgnoreDefault) - EditionsOneofIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsOneofIgnoreDefault.class.getName()); - } - // Use EditionsOneofIgnoreDefault.newBuilder() to construct. - private EditionsOneofIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsOneofIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.EditionsOneofIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsOneofIgnoreDefault) - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsOneofIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsOneofIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsOneofIgnoreDefault 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.EditionsOneofIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultOrBuilder.java deleted file mode 100644 index 7affedc2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsOneofIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsOneofIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefault.java deleted file mode 100644 index 2ceddb28..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault} - */ -public final class EditionsOneofIgnoreDefaultWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) - EditionsOneofIgnoreDefaultWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsOneofIgnoreDefaultWithDefault.class.getName()); - } - // Use EditionsOneofIgnoreDefaultWithDefault.newBuilder() to construct. - private EditionsOneofIgnoreDefaultWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsOneofIgnoreDefaultWithDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.EditionsOneofIgnoreDefaultWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault other = (build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault build() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault result = new build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) - private static final build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsOneofIgnoreDefaultWithDefault 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.EditionsOneofIgnoreDefaultWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefaultOrBuilder.java deleted file mode 100644 index 0586d071..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreDefaultWithDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsOneofIgnoreDefaultWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.EditionsOneofIgnoreDefaultWithDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmpty.java deleted file mode 100644 index a501a7e7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmpty.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsOneofIgnoreEmpty} - */ -public final class EditionsOneofIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) - EditionsOneofIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsOneofIgnoreEmpty.class.getName()); - } - // Use EditionsOneofIgnoreEmpty.newBuilder() to construct. - private EditionsOneofIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsOneofIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.EditionsOneofIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsOneofIgnoreEmpty 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.EditionsOneofIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyOrBuilder.java deleted file mode 100644 index 3a65737d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsOneofIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsOneofIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmpty.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefault.java deleted file mode 100644 index 6a64d16e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault} - */ -public final class EditionsOneofIgnoreEmptyWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) - EditionsOneofIgnoreEmptyWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsOneofIgnoreEmptyWithDefault.class.getName()); - } - // Use EditionsOneofIgnoreEmptyWithDefault.newBuilder() to construct. - private EditionsOneofIgnoreEmptyWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsOneofIgnoreEmptyWithDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.EditionsOneofIgnoreEmptyWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault other = (build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault build() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault result = new build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) - private static final build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsOneofIgnoreEmptyWithDefault 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.EditionsOneofIgnoreEmptyWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefaultOrBuilder.java deleted file mode 100644 index 899219e0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreEmptyWithDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsOneofIgnoreEmptyWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.EditionsOneofIgnoreEmptyWithDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecified.java deleted file mode 100644 index 07a01a12..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecified.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified} - */ -public final class EditionsOneofIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) - EditionsOneofIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsOneofIgnoreUnspecified.class.getName()); - } - // Use EditionsOneofIgnoreUnspecified.newBuilder() to construct. - private EditionsOneofIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsOneofIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.EditionsOneofIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsOneofIgnoreUnspecified 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.EditionsOneofIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index dcb87e2e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsOneofIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecified.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefault.java deleted file mode 100644 index 9cfe59d5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault} - */ -public final class EditionsOneofIgnoreUnspecifiedWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) - EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsOneofIgnoreUnspecifiedWithDefault.class.getName()); - } - // Use EditionsOneofIgnoreUnspecifiedWithDefault.newBuilder() to construct. - private EditionsOneofIgnoreUnspecifiedWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsOneofIgnoreUnspecifiedWithDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.EditionsOneofIgnoreUnspecifiedWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault other = (build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault build() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault result = new build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) - private static final build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsOneofIgnoreUnspecifiedWithDefault 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.EditionsOneofIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder.java deleted file mode 100644 index 4ef464f4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsOneofIgnoreUnspecifiedWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.EditionsOneofIgnoreUnspecifiedWithDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefault.java deleted file mode 100644 index 0fe4e78c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefault.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault} - */ -public final class EditionsRepeatedExpandedIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) - EditionsRepeatedExpandedIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedExpandedIgnoreDefault.class.getName()); - } - // Use EditionsRepeatedExpandedIgnoreDefault.newBuilder() to construct. - private EditionsRepeatedExpandedIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedExpandedIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.EditionsRepeatedExpandedIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) 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.EditionsRepeatedExpandedIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedExpandedIgnoreDefault 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.EditionsRepeatedExpandedIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefaultOrBuilder.java deleted file mode 100644 index e558879d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedExpandedIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmpty.java deleted file mode 100644 index 819c878b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmpty.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty} - */ -public final class EditionsRepeatedExpandedIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) - EditionsRepeatedExpandedIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedExpandedIgnoreEmpty.class.getName()); - } - // Use EditionsRepeatedExpandedIgnoreEmpty.newBuilder() to construct. - private EditionsRepeatedExpandedIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedExpandedIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.EditionsRepeatedExpandedIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) 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.EditionsRepeatedExpandedIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedExpandedIgnoreEmpty 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.EditionsRepeatedExpandedIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmptyOrBuilder.java deleted file mode 100644 index ec83e767..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedExpandedIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecified.java deleted file mode 100644 index 3fcd366b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecified.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified} - */ -public final class EditionsRepeatedExpandedIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) - EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedExpandedIgnoreUnspecified.class.getName()); - } - // Use EditionsRepeatedExpandedIgnoreUnspecified.newBuilder() to construct. - private EditionsRepeatedExpandedIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedExpandedIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.EditionsRepeatedExpandedIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) 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.EditionsRepeatedExpandedIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedExpandedIgnoreUnspecified 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.EditionsRepeatedExpandedIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index f365866e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedExpandedIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedExpandedIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefault.java deleted file mode 100644 index 390c6453..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefault.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault} - */ -public final class EditionsRepeatedExpandedItemIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) - EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedExpandedItemIgnoreDefault.class.getName()); - } - // Use EditionsRepeatedExpandedItemIgnoreDefault.newBuilder() to construct. - private EditionsRepeatedExpandedItemIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedExpandedItemIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.EditionsRepeatedExpandedItemIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) 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.EditionsRepeatedExpandedItemIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedExpandedItemIgnoreDefault 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.EditionsRepeatedExpandedItemIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder.java deleted file mode 100644 index 38dfc2ad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedExpandedItemIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmpty.java deleted file mode 100644 index 65d669cf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmpty.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty} - */ -public final class EditionsRepeatedExpandedItemIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) - EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedExpandedItemIgnoreEmpty.class.getName()); - } - // Use EditionsRepeatedExpandedItemIgnoreEmpty.newBuilder() to construct. - private EditionsRepeatedExpandedItemIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedExpandedItemIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.EditionsRepeatedExpandedItemIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) 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.EditionsRepeatedExpandedItemIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedExpandedItemIgnoreEmpty 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.EditionsRepeatedExpandedItemIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder.java deleted file mode 100644 index 9951c652..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedExpandedItemIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecified.java deleted file mode 100644 index 9792fe9f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecified.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified} - */ -public final class EditionsRepeatedExpandedItemIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) - EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedExpandedItemIgnoreUnspecified.class.getName()); - } - // Use EditionsRepeatedExpandedItemIgnoreUnspecified.newBuilder() to construct. - private EditionsRepeatedExpandedItemIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedExpandedItemIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.EditionsRepeatedExpandedItemIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) 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.EditionsRepeatedExpandedItemIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedExpandedItemIgnoreUnspecified 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.EditionsRepeatedExpandedItemIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 5aa63979..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedExpandedItemIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedExpandedItemIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefault.java deleted file mode 100644 index cf69e83b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefault.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault} - */ -public final class EditionsRepeatedIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) - EditionsRepeatedIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedIgnoreDefault.class.getName()); - } - // Use EditionsRepeatedIgnoreDefault.newBuilder() to construct. - private EditionsRepeatedIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.EditionsRepeatedIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) 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.EditionsRepeatedIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedIgnoreDefault 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.EditionsRepeatedIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefaultOrBuilder.java deleted file mode 100644 index 51ef6187..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmpty.java deleted file mode 100644 index cbacaf7b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmpty.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty} - */ -public final class EditionsRepeatedIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) - EditionsRepeatedIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedIgnoreEmpty.class.getName()); - } - // Use EditionsRepeatedIgnoreEmpty.newBuilder() to construct. - private EditionsRepeatedIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.EditionsRepeatedIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) 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.EditionsRepeatedIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedIgnoreEmpty 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.EditionsRepeatedIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmptyOrBuilder.java deleted file mode 100644 index 1ec592b4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecified.java deleted file mode 100644 index db8916e2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecified.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified} - */ -public final class EditionsRepeatedIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) - EditionsRepeatedIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedIgnoreUnspecified.class.getName()); - } - // Use EditionsRepeatedIgnoreUnspecified.newBuilder() to construct. - private EditionsRepeatedIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.EditionsRepeatedIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) 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.EditionsRepeatedIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedIgnoreUnspecified 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.EditionsRepeatedIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index a24e7a77..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefault.java deleted file mode 100644 index 1f0da9f0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefault.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault} - */ -public final class EditionsRepeatedItemIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) - EditionsRepeatedItemIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedItemIgnoreDefault.class.getName()); - } - // Use EditionsRepeatedItemIgnoreDefault.newBuilder() to construct. - private EditionsRepeatedItemIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedItemIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.EditionsRepeatedItemIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) 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.EditionsRepeatedItemIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedItemIgnoreDefault 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.EditionsRepeatedItemIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefaultOrBuilder.java deleted file mode 100644 index de4649ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedItemIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmpty.java deleted file mode 100644 index ea1d2177..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmpty.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty} - */ -public final class EditionsRepeatedItemIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) - EditionsRepeatedItemIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedItemIgnoreEmpty.class.getName()); - } - // Use EditionsRepeatedItemIgnoreEmpty.newBuilder() to construct. - private EditionsRepeatedItemIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedItemIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.EditionsRepeatedItemIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) 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.EditionsRepeatedItemIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedItemIgnoreEmpty 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.EditionsRepeatedItemIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmptyOrBuilder.java deleted file mode 100644 index 7ceade5d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedItemIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecified.java deleted file mode 100644 index 5c8cb126..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecified.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified} - */ -public final class EditionsRepeatedItemIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) - EditionsRepeatedItemIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsRepeatedItemIgnoreUnspecified.class.getName()); - } - // Use EditionsRepeatedItemIgnoreUnspecified.newBuilder() to construct. - private EditionsRepeatedItemIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsRepeatedItemIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.EditionsRepeatedItemIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) 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.EditionsRepeatedItemIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsRepeatedItemIgnoreUnspecified 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.EditionsRepeatedItemIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 810ae425..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsRepeatedItemIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsRepeatedItemIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsRepeatedItemIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefault.java deleted file mode 100644 index c3808519..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefault.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault} - */ -public final class EditionsScalarExplicitPresenceIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault) - EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarExplicitPresenceIgnoreDefault.class.getName()); - } - // Use EditionsScalarExplicitPresenceIgnoreDefault.newBuilder() to construct. - private EditionsScalarExplicitPresenceIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarExplicitPresenceIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarExplicitPresenceIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault) - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarExplicitPresenceIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarExplicitPresenceIgnoreDefault 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.EditionsScalarExplicitPresenceIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder.java deleted file mode 100644 index 81c792cc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarExplicitPresenceIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.java deleted file mode 100644 index fd81a9fa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault} - */ -public final class EditionsScalarExplicitPresenceIgnoreDefaultWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) - EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.class.getName()); - } - // Use EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.newBuilder() to construct. - private EditionsScalarExplicitPresenceIgnoreDefaultWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarExplicitPresenceIgnoreDefaultWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault other = (build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault build() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault result = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarExplicitPresenceIgnoreDefaultWithDefault 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.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder.java deleted file mode 100644 index f311e100..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarExplicitPresenceIgnoreDefaultWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreDefaultWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmpty.java deleted file mode 100644 index f61c9860..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmpty.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty} - */ -public final class EditionsScalarExplicitPresenceIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty) - EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarExplicitPresenceIgnoreEmpty.class.getName()); - } - // Use EditionsScalarExplicitPresenceIgnoreEmpty.newBuilder() to construct. - private EditionsScalarExplicitPresenceIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarExplicitPresenceIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarExplicitPresenceIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarExplicitPresenceIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarExplicitPresenceIgnoreEmpty 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.EditionsScalarExplicitPresenceIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder.java deleted file mode 100644 index ebb8aaa7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarExplicitPresenceIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.java deleted file mode 100644 index bc68a3b8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault} - */ -public final class EditionsScalarExplicitPresenceIgnoreEmptyWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) - EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.class.getName()); - } - // Use EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.newBuilder() to construct. - private EditionsScalarExplicitPresenceIgnoreEmptyWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarExplicitPresenceIgnoreEmptyWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault other = (build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault build() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault result = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarExplicitPresenceIgnoreEmptyWithDefault 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.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder.java deleted file mode 100644 index 706ee6fc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarExplicitPresenceIgnoreEmptyWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreEmptyWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecified.java deleted file mode 100644 index 0c6dc8b8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecified.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified} - */ -public final class EditionsScalarExplicitPresenceIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified) - EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarExplicitPresenceIgnoreUnspecified.class.getName()); - } - // Use EditionsScalarExplicitPresenceIgnoreUnspecified.newBuilder() to construct. - private EditionsScalarExplicitPresenceIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarExplicitPresenceIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarExplicitPresenceIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarExplicitPresenceIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarExplicitPresenceIgnoreUnspecified 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.EditionsScalarExplicitPresenceIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 69d8b7e3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarExplicitPresenceIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.java deleted file mode 100644 index f68e4f42..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault} - */ -public final class EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) - EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.class.getName()); - } - // Use EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.newBuilder() to construct. - private EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault other = (build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault build() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault result = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault 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.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder.java deleted file mode 100644 index 3c73c302..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefault.java deleted file mode 100644 index ba4aa277..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefault.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault} - */ -public final class EditionsScalarImplicitPresenceIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) - EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarImplicitPresenceIgnoreDefault.class.getName()); - } - // Use EditionsScalarImplicitPresenceIgnoreDefault.newBuilder() to construct. - private EditionsScalarImplicitPresenceIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarImplicitPresenceIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.EditionsScalarImplicitPresenceIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarImplicitPresenceIgnoreDefault 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.EditionsScalarImplicitPresenceIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder.java deleted file mode 100644 index 0ad5e4f0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarImplicitPresenceIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmpty.java deleted file mode 100644 index 17057c2a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmpty.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty} - */ -public final class EditionsScalarImplicitPresenceIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) - EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarImplicitPresenceIgnoreEmpty.class.getName()); - } - // Use EditionsScalarImplicitPresenceIgnoreEmpty.newBuilder() to construct. - private EditionsScalarImplicitPresenceIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarImplicitPresenceIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.EditionsScalarImplicitPresenceIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarImplicitPresenceIgnoreEmpty 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.EditionsScalarImplicitPresenceIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder.java deleted file mode 100644 index 38bc71b0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarImplicitPresenceIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecified.java deleted file mode 100644 index 262e5588..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecified.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified} - */ -public final class EditionsScalarImplicitPresenceIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) - EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarImplicitPresenceIgnoreUnspecified.class.getName()); - } - // Use EditionsScalarImplicitPresenceIgnoreUnspecified.newBuilder() to construct. - private EditionsScalarImplicitPresenceIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarImplicitPresenceIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.EditionsScalarImplicitPresenceIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarImplicitPresenceIgnoreUnspecified 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.EditionsScalarImplicitPresenceIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 8fe6d6d5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarImplicitPresenceIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarImplicitPresenceIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefault.java deleted file mode 100644 index bc43e250..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefault.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault} - */ -public final class EditionsScalarLegacyRequiredIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault) - EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarLegacyRequiredIgnoreDefault.class.getName()); - } - // Use EditionsScalarLegacyRequiredIgnoreDefault.newBuilder() to construct. - private EditionsScalarLegacyRequiredIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarLegacyRequiredIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarLegacyRequiredIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault other = (build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault) - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault build() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault result = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarLegacyRequiredIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarLegacyRequiredIgnoreDefault 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.EditionsScalarLegacyRequiredIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder.java deleted file mode 100644 index 456cd319..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarLegacyRequiredIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.java deleted file mode 100644 index 88860cc7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault} - */ -public final class EditionsScalarLegacyRequiredIgnoreDefaultWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) - EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.class.getName()); - } - // Use EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.newBuilder() to construct. - private EditionsScalarLegacyRequiredIgnoreDefaultWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarLegacyRequiredIgnoreDefaultWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault other = (build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault build() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault result = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarLegacyRequiredIgnoreDefaultWithDefault 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.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder.java deleted file mode 100644 index 9a803766..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarLegacyRequiredIgnoreDefaultWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreDefaultWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmpty.java deleted file mode 100644 index f56dd3fb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmpty.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty} - */ -public final class EditionsScalarLegacyRequiredIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty) - EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarLegacyRequiredIgnoreEmpty.class.getName()); - } - // Use EditionsScalarLegacyRequiredIgnoreEmpty.newBuilder() to construct. - private EditionsScalarLegacyRequiredIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarLegacyRequiredIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarLegacyRequiredIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty other = (build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty) - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty build() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty result = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarLegacyRequiredIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty) - private static final build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarLegacyRequiredIgnoreEmpty 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.EditionsScalarLegacyRequiredIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder.java deleted file mode 100644 index c12920b7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarLegacyRequiredIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.java deleted file mode 100644 index 03ee5a82..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault} - */ -public final class EditionsScalarLegacyRequiredIgnoreEmptyWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) - EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.class.getName()); - } - // Use EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.newBuilder() to construct. - private EditionsScalarLegacyRequiredIgnoreEmptyWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarLegacyRequiredIgnoreEmptyWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault other = (build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault build() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault result = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarLegacyRequiredIgnoreEmptyWithDefault 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.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder.java deleted file mode 100644 index b47dd121..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarLegacyRequiredIgnoreEmptyWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreEmptyWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecified.java deleted file mode 100644 index 29590802..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecified.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified} - */ -public final class EditionsScalarLegacyRequiredIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified) - EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarLegacyRequiredIgnoreUnspecified.class.getName()); - } - // Use EditionsScalarLegacyRequiredIgnoreUnspecified.newBuilder() to construct. - private EditionsScalarLegacyRequiredIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarLegacyRequiredIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarLegacyRequiredIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified other = (build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified) - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified build() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified result = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarLegacyRequiredIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarLegacyRequiredIgnoreUnspecified 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.EditionsScalarLegacyRequiredIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 46f70d7d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarLegacyRequiredIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.java deleted file mode 100644 index 3ded1059..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault} - */ -public final class EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) - EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.class.getName()); - } - // Use EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.newBuilder() to construct. - private EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault other = (build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProtoEditionsProto.internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault build() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault buildPartial() { - build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault result = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault other) { - if (other == build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) - private static final build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault(); - } - - public static build.buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault 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.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java deleted file mode 100644 index 3daae004..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Embed.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Embed.java deleted file mode 100644 index 6c3791e4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Embed.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Embed} - */ -public final class Embed extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Embed) - EmbedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Embed.class.getName()); - } - // Use Embed.newBuilder() to construct. - private Embed(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Embed() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_Embed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_Embed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Embed.class, build.buf.validate.conformance.cases.Embed.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Embed)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Embed other = (build.buf.validate.conformance.cases.Embed) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Embed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Embed 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.Embed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Embed 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.Embed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Embed 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.Embed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Embed 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.Embed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Embed 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.Embed 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.Embed 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.Embed 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.Embed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Embed) - build.buf.validate.conformance.cases.EmbedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_Embed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_Embed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Embed.class, build.buf.validate.conformance.cases.Embed.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Embed.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_Embed_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Embed getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Embed.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Embed build() { - build.buf.validate.conformance.cases.Embed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Embed buildPartial() { - build.buf.validate.conformance.cases.Embed result = new build.buf.validate.conformance.cases.Embed(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Embed result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Embed) { - return mergeFrom((build.buf.validate.conformance.cases.Embed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Embed other) { - if (other == build.buf.validate.conformance.cases.Embed.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Embed) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Embed) - private static final build.buf.validate.conformance.cases.Embed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Embed(); - } - - public static build.buf.validate.conformance.cases.Embed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Embed 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.Embed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EmbedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EmbedOrBuilder.java deleted file mode 100644 index 23a68e82..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EmbedOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EmbedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Embed) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConst.java deleted file mode 100644 index ae9b074e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConst.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumAliasConst} - */ -public final class EnumAliasConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumAliasConst) - EnumAliasConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumAliasConst.class.getName()); - } - // Use EnumAliasConst.newBuilder() to construct. - private EnumAliasConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumAliasConst() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasConst.class, build.buf.validate.conformance.cases.EnumAliasConst.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumAliasConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumAliasConst other = (build.buf.validate.conformance.cases.EnumAliasConst) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumAliasConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasConst 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.EnumAliasConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasConst 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.EnumAliasConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasConst 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.EnumAliasConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumAliasConst 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.EnumAliasConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumAliasConst 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.EnumAliasConst 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.EnumAliasConst 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.EnumAliasConst 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.EnumAliasConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumAliasConst) - build.buf.validate.conformance.cases.EnumAliasConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasConst.class, build.buf.validate.conformance.cases.EnumAliasConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumAliasConst.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumAliasConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasConst build() { - build.buf.validate.conformance.cases.EnumAliasConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasConst buildPartial() { - build.buf.validate.conformance.cases.EnumAliasConst result = new build.buf.validate.conformance.cases.EnumAliasConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumAliasConst result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumAliasConst) { - return mergeFrom((build.buf.validate.conformance.cases.EnumAliasConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumAliasConst other) { - if (other == build.buf.validate.conformance.cases.EnumAliasConst.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnumAlias value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumAliasConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumAliasConst) - private static final build.buf.validate.conformance.cases.EnumAliasConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumAliasConst(); - } - - public static build.buf.validate.conformance.cases.EnumAliasConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumAliasConst 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.EnumAliasConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConstOrBuilder.java deleted file mode 100644 index 6013333b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasConstOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumAliasConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumAliasConst) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnumAlias getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefined.java deleted file mode 100644 index 95e6d2ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefined.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumAliasDefined} - */ -public final class EnumAliasDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumAliasDefined) - EnumAliasDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumAliasDefined.class.getName()); - } - // Use EnumAliasDefined.newBuilder() to construct. - private EnumAliasDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumAliasDefined() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasDefined.class, build.buf.validate.conformance.cases.EnumAliasDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumAliasDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumAliasDefined other = (build.buf.validate.conformance.cases.EnumAliasDefined) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumAliasDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasDefined 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.EnumAliasDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasDefined 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.EnumAliasDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasDefined 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.EnumAliasDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumAliasDefined 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.EnumAliasDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumAliasDefined 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.EnumAliasDefined 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.EnumAliasDefined 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.EnumAliasDefined 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.EnumAliasDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumAliasDefined) - build.buf.validate.conformance.cases.EnumAliasDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasDefined.class, build.buf.validate.conformance.cases.EnumAliasDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumAliasDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumAliasDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasDefined build() { - build.buf.validate.conformance.cases.EnumAliasDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasDefined buildPartial() { - build.buf.validate.conformance.cases.EnumAliasDefined result = new build.buf.validate.conformance.cases.EnumAliasDefined(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumAliasDefined result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumAliasDefined) { - return mergeFrom((build.buf.validate.conformance.cases.EnumAliasDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumAliasDefined other) { - if (other == build.buf.validate.conformance.cases.EnumAliasDefined.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnumAlias value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumAliasDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumAliasDefined) - private static final build.buf.validate.conformance.cases.EnumAliasDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumAliasDefined(); - } - - public static build.buf.validate.conformance.cases.EnumAliasDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumAliasDefined 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.EnumAliasDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefinedOrBuilder.java deleted file mode 100644 index ac4ff93e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasDefinedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumAliasDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumAliasDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnumAlias getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasIn.java deleted file mode 100644 index 596c1842..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasIn.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumAliasIn} - */ -public final class EnumAliasIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumAliasIn) - EnumAliasInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumAliasIn.class.getName()); - } - // Use EnumAliasIn.newBuilder() to construct. - private EnumAliasIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumAliasIn() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasIn.class, build.buf.validate.conformance.cases.EnumAliasIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumAliasIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumAliasIn other = (build.buf.validate.conformance.cases.EnumAliasIn) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumAliasIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasIn 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.EnumAliasIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasIn 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.EnumAliasIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasIn 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.EnumAliasIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumAliasIn 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.EnumAliasIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumAliasIn 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.EnumAliasIn 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.EnumAliasIn 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.EnumAliasIn 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.EnumAliasIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumAliasIn) - build.buf.validate.conformance.cases.EnumAliasInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasIn.class, build.buf.validate.conformance.cases.EnumAliasIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumAliasIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumAliasIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasIn build() { - build.buf.validate.conformance.cases.EnumAliasIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasIn buildPartial() { - build.buf.validate.conformance.cases.EnumAliasIn result = new build.buf.validate.conformance.cases.EnumAliasIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumAliasIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumAliasIn) { - return mergeFrom((build.buf.validate.conformance.cases.EnumAliasIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumAliasIn other) { - if (other == build.buf.validate.conformance.cases.EnumAliasIn.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnumAlias value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumAliasIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumAliasIn) - private static final build.buf.validate.conformance.cases.EnumAliasIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumAliasIn(); - } - - public static build.buf.validate.conformance.cases.EnumAliasIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumAliasIn 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.EnumAliasIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasInOrBuilder.java deleted file mode 100644 index 1ed06f0d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasInOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumAliasInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumAliasIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnumAlias getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotIn.java deleted file mode 100644 index 450ae3f2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotIn.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumAliasNotIn} - */ -public final class EnumAliasNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumAliasNotIn) - EnumAliasNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumAliasNotIn.class.getName()); - } - // Use EnumAliasNotIn.newBuilder() to construct. - private EnumAliasNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumAliasNotIn() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasNotIn.class, build.buf.validate.conformance.cases.EnumAliasNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnumAlias.TEST_ENUM_ALIAS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumAliasNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumAliasNotIn other = (build.buf.validate.conformance.cases.EnumAliasNotIn) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumAliasNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasNotIn 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.EnumAliasNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasNotIn 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.EnumAliasNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumAliasNotIn 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.EnumAliasNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumAliasNotIn 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.EnumAliasNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumAliasNotIn 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.EnumAliasNotIn 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.EnumAliasNotIn 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.EnumAliasNotIn 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.EnumAliasNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumAliasNotIn) - build.buf.validate.conformance.cases.EnumAliasNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumAliasNotIn.class, build.buf.validate.conformance.cases.EnumAliasNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumAliasNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumAliasNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumAliasNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasNotIn build() { - build.buf.validate.conformance.cases.EnumAliasNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumAliasNotIn buildPartial() { - build.buf.validate.conformance.cases.EnumAliasNotIn result = new build.buf.validate.conformance.cases.EnumAliasNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumAliasNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumAliasNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.EnumAliasNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumAliasNotIn other) { - if (other == build.buf.validate.conformance.cases.EnumAliasNotIn.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnumAlias getVal() { - build.buf.validate.conformance.cases.TestEnumAlias result = build.buf.validate.conformance.cases.TestEnumAlias.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnumAlias.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnumAlias value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumAliasNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumAliasNotIn) - private static final build.buf.validate.conformance.cases.EnumAliasNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumAliasNotIn(); - } - - public static build.buf.validate.conformance.cases.EnumAliasNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumAliasNotIn 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.EnumAliasNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotInOrBuilder.java deleted file mode 100644 index 5f43e9af..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumAliasNotInOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumAliasNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumAliasNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnumAlias val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnumAlias getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumConst.java deleted file mode 100644 index 60f0af10..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumConst.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumConst} - */ -public final class EnumConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumConst) - EnumConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumConst.class.getName()); - } - // Use EnumConst.newBuilder() to construct. - private EnumConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumConst() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumConst.class, build.buf.validate.conformance.cases.EnumConst.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumConst other = (build.buf.validate.conformance.cases.EnumConst) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumConst 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.EnumConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumConst 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.EnumConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumConst 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.EnumConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumConst 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.EnumConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumConst 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.EnumConst 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.EnumConst 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.EnumConst 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.EnumConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumConst) - build.buf.validate.conformance.cases.EnumConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumConst.class, build.buf.validate.conformance.cases.EnumConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumConst.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumConst build() { - build.buf.validate.conformance.cases.EnumConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumConst buildPartial() { - build.buf.validate.conformance.cases.EnumConst result = new build.buf.validate.conformance.cases.EnumConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumConst result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumConst) { - return mergeFrom((build.buf.validate.conformance.cases.EnumConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumConst other) { - if (other == build.buf.validate.conformance.cases.EnumConst.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumConst) - private static final build.buf.validate.conformance.cases.EnumConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumConst(); - } - - public static build.buf.validate.conformance.cases.EnumConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumConst 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.EnumConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumConstOrBuilder.java deleted file mode 100644 index 3c4bfb71..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumConstOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumConst) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefined.java deleted file mode 100644 index 4320f760..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefined.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumDefined} - */ -public final class EnumDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumDefined) - EnumDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumDefined.class.getName()); - } - // Use EnumDefined.newBuilder() to construct. - private EnumDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumDefined() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumDefined.class, build.buf.validate.conformance.cases.EnumDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumDefined other = (build.buf.validate.conformance.cases.EnumDefined) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumDefined 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.EnumDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumDefined 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.EnumDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumDefined 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.EnumDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumDefined 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.EnumDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumDefined 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.EnumDefined 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.EnumDefined 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.EnumDefined 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.EnumDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumDefined) - build.buf.validate.conformance.cases.EnumDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumDefined.class, build.buf.validate.conformance.cases.EnumDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumDefined build() { - build.buf.validate.conformance.cases.EnumDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumDefined buildPartial() { - build.buf.validate.conformance.cases.EnumDefined result = new build.buf.validate.conformance.cases.EnumDefined(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumDefined result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumDefined) { - return mergeFrom((build.buf.validate.conformance.cases.EnumDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumDefined other) { - if (other == build.buf.validate.conformance.cases.EnumDefined.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumDefined) - private static final build.buf.validate.conformance.cases.EnumDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumDefined(); - } - - public static build.buf.validate.conformance.cases.EnumDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumDefined 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.EnumDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefinedOrBuilder.java deleted file mode 100644 index 427672cd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumDefinedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExample.java deleted file mode 100644 index 442a8f03..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExample.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumExample} - */ -public final class EnumExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumExample) - EnumExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumExample.class.getName()); - } - // Use EnumExample.newBuilder() to construct. - private EnumExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumExample() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumExample.class, build.buf.validate.conformance.cases.EnumExample.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumExample other = (build.buf.validate.conformance.cases.EnumExample) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExample 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.EnumExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExample 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.EnumExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExample 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.EnumExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumExample 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.EnumExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumExample 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.EnumExample 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.EnumExample 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.EnumExample 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.EnumExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumExample) - build.buf.validate.conformance.cases.EnumExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumExample.class, build.buf.validate.conformance.cases.EnumExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumExample.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExample build() { - build.buf.validate.conformance.cases.EnumExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExample buildPartial() { - build.buf.validate.conformance.cases.EnumExample result = new build.buf.validate.conformance.cases.EnumExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumExample result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumExample) { - return mergeFrom((build.buf.validate.conformance.cases.EnumExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumExample other) { - if (other == build.buf.validate.conformance.cases.EnumExample.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumExample) - private static final build.buf.validate.conformance.cases.EnumExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumExample(); - } - - public static build.buf.validate.conformance.cases.EnumExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumExample 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.EnumExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExampleOrBuilder.java deleted file mode 100644 index b61c5a97..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExampleOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumExample) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal.java deleted file mode 100644 index 56482414..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumExternal} - */ -public final class EnumExternal extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumExternal) - EnumExternalOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumExternal.class.getName()); - } - // Use EnumExternal.newBuilder() to construct. - private EnumExternal(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumExternal() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumExternal.class, build.buf.validate.conformance.cases.EnumExternal.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.other_package.Embed.Enumerated getVal() { - build.buf.validate.conformance.cases.other_package.Embed.Enumerated result = build.buf.validate.conformance.cases.other_package.Embed.Enumerated.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.other_package.Embed.Enumerated.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.other_package.Embed.Enumerated.ENUMERATED_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.other_package.Embed.Enumerated.ENUMERATED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumExternal)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumExternal other = (build.buf.validate.conformance.cases.EnumExternal) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumExternal parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExternal 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.EnumExternal parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExternal 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.EnumExternal parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExternal 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.EnumExternal parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumExternal 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.EnumExternal parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumExternal 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.EnumExternal 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.EnumExternal 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.EnumExternal 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.EnumExternal} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumExternal) - build.buf.validate.conformance.cases.EnumExternalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumExternal.class, build.buf.validate.conformance.cases.EnumExternal.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumExternal.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExternal getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumExternal.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExternal build() { - build.buf.validate.conformance.cases.EnumExternal result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExternal buildPartial() { - build.buf.validate.conformance.cases.EnumExternal result = new build.buf.validate.conformance.cases.EnumExternal(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumExternal result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumExternal) { - return mergeFrom((build.buf.validate.conformance.cases.EnumExternal)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumExternal other) { - if (other == build.buf.validate.conformance.cases.EnumExternal.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.Enumerated getVal() { - build.buf.validate.conformance.cases.other_package.Embed.Enumerated result = build.buf.validate.conformance.cases.other_package.Embed.Enumerated.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.other_package.Embed.Enumerated.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.other_package.Embed.Enumerated value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumExternal) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumExternal) - private static final build.buf.validate.conformance.cases.EnumExternal DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumExternal(); - } - - public static build.buf.validate.conformance.cases.EnumExternal getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumExternal 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.EnumExternal getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2.java deleted file mode 100644 index a59ab0cc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumExternal2} - */ -public final class EnumExternal2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumExternal2) - EnumExternal2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumExternal2.class.getName()); - } - // Use EnumExternal2.newBuilder() to construct. - private EnumExternal2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumExternal2() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumExternal2.class, build.buf.validate.conformance.cases.EnumExternal2.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated getVal() { - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated result = build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated.DOUBLE_ENUMERATED_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated.DOUBLE_ENUMERATED_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumExternal2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumExternal2 other = (build.buf.validate.conformance.cases.EnumExternal2) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumExternal2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExternal2 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.EnumExternal2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExternal2 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.EnumExternal2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumExternal2 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.EnumExternal2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumExternal2 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.EnumExternal2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumExternal2 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.EnumExternal2 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.EnumExternal2 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.EnumExternal2 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.EnumExternal2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumExternal2) - build.buf.validate.conformance.cases.EnumExternal2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumExternal2.class, build.buf.validate.conformance.cases.EnumExternal2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumExternal2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumExternal2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExternal2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumExternal2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExternal2 build() { - build.buf.validate.conformance.cases.EnumExternal2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumExternal2 buildPartial() { - build.buf.validate.conformance.cases.EnumExternal2 result = new build.buf.validate.conformance.cases.EnumExternal2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumExternal2 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumExternal2) { - return mergeFrom((build.buf.validate.conformance.cases.EnumExternal2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumExternal2 other) { - if (other == build.buf.validate.conformance.cases.EnumExternal2.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated getVal() { - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated result = build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumExternal2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumExternal2) - private static final build.buf.validate.conformance.cases.EnumExternal2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumExternal2(); - } - - public static build.buf.validate.conformance.cases.EnumExternal2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumExternal2 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.EnumExternal2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2OrBuilder.java deleted file mode 100644 index 2d1030cf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternal2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumExternal2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumExternal2) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternalOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternalOrBuilder.java deleted file mode 100644 index 9211b8f9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumExternalOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumExternalOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumExternal) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.other_package.Embed.Enumerated getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumIn.java deleted file mode 100644 index ff01458b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumIn.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumIn} - */ -public final class EnumIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumIn) - EnumInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumIn.class.getName()); - } - // Use EnumIn.newBuilder() to construct. - private EnumIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumIn() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumIn.class, build.buf.validate.conformance.cases.EnumIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumIn other = (build.buf.validate.conformance.cases.EnumIn) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumIn 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.EnumIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumIn 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.EnumIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumIn 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.EnumIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumIn 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.EnumIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumIn 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.EnumIn 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.EnumIn 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.EnumIn 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.EnumIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumIn) - build.buf.validate.conformance.cases.EnumInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumIn.class, build.buf.validate.conformance.cases.EnumIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumIn build() { - build.buf.validate.conformance.cases.EnumIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumIn buildPartial() { - build.buf.validate.conformance.cases.EnumIn result = new build.buf.validate.conformance.cases.EnumIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumIn) { - return mergeFrom((build.buf.validate.conformance.cases.EnumIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumIn other) { - if (other == build.buf.validate.conformance.cases.EnumIn.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumIn) - private static final build.buf.validate.conformance.cases.EnumIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumIn(); - } - - public static build.buf.validate.conformance.cases.EnumIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumIn 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.EnumIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInOrBuilder.java deleted file mode 100644 index 6369fdcc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneof.java deleted file mode 100644 index 4008b660..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneof.java +++ /dev/null @@ -1,767 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumInsideOneof} - */ -public final class EnumInsideOneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumInsideOneof) - EnumInsideOneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumInsideOneof.class.getName()); - } - // Use EnumInsideOneof.newBuilder() to construct. - private EnumInsideOneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumInsideOneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumInsideOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumInsideOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumInsideOneof.class, build.buf.validate.conformance.cases.EnumInsideOneof.Builder.class); - } - - private int fooCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object foo_; - public enum FooCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - FOO_NOT_SET(0); - private final int value; - private FooCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static FooCase valueOf(int value) { - return forNumber(value); - } - - public static FooCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return FOO_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public FooCase - getFooCase() { - return FooCase.forNumber( - fooCase_); - } - - private int barCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object bar_; - public enum BarCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL2(2), - BAR_NOT_SET(0); - private final int value; - private BarCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BarCase valueOf(int value) { - return forNumber(value); - } - - public static BarCase forNumber(int value) { - switch (value) { - case 2: return VAL2; - case 0: return BAR_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public BarCase - getBarCase() { - return BarCase.forNumber( - barCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return fooCase_ == 1; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - public int getValValue() { - if (fooCase_ == 1) { - return (java.lang.Integer) foo_; - } - return 0; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.TestEnum getVal() { - if (fooCase_ == 1) { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber( - (java.lang.Integer) foo_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - return build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED; - } - - public static final int VAL2_FIELD_NUMBER = 2; - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return Whether the val2 field is set. - */ - public boolean hasVal2() { - return barCase_ == 2; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val2. - */ - public int getVal2Value() { - if (barCase_ == 2) { - return (java.lang.Integer) bar_; - } - return 0; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return The val2. - */ - public build.buf.validate.conformance.cases.TestEnum getVal2() { - if (barCase_ == 2) { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber( - (java.lang.Integer) bar_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - return build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED; - } - - 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 (fooCase_ == 1) { - output.writeEnum(1, ((java.lang.Integer) foo_)); - } - if (barCase_ == 2) { - output.writeEnum(2, ((java.lang.Integer) bar_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fooCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, ((java.lang.Integer) foo_)); - } - if (barCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, ((java.lang.Integer) bar_)); - } - 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.EnumInsideOneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumInsideOneof other = (build.buf.validate.conformance.cases.EnumInsideOneof) obj; - - if (!getFooCase().equals(other.getFooCase())) return false; - switch (fooCase_) { - case 1: - if (getValValue() - != other.getValValue()) return false; - break; - case 0: - default: - } - if (!getBarCase().equals(other.getBarCase())) return false; - switch (barCase_) { - case 2: - if (getVal2Value() - != other.getVal2Value()) return false; - break; - case 0: - default: - } - 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(); - switch (fooCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getValValue(); - break; - case 0: - default: - } - switch (barCase_) { - case 2: - hash = (37 * hash) + VAL2_FIELD_NUMBER; - hash = (53 * hash) + getVal2Value(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumInsideOneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumInsideOneof 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.EnumInsideOneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumInsideOneof 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.EnumInsideOneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumInsideOneof 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.EnumInsideOneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumInsideOneof 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.EnumInsideOneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumInsideOneof 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.EnumInsideOneof 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.EnumInsideOneof 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.EnumInsideOneof 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.EnumInsideOneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumInsideOneof) - build.buf.validate.conformance.cases.EnumInsideOneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumInsideOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumInsideOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumInsideOneof.class, build.buf.validate.conformance.cases.EnumInsideOneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumInsideOneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fooCase_ = 0; - foo_ = null; - barCase_ = 0; - bar_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumInsideOneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumInsideOneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumInsideOneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumInsideOneof build() { - build.buf.validate.conformance.cases.EnumInsideOneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumInsideOneof buildPartial() { - build.buf.validate.conformance.cases.EnumInsideOneof result = new build.buf.validate.conformance.cases.EnumInsideOneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumInsideOneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.EnumInsideOneof result) { - result.fooCase_ = fooCase_; - result.foo_ = this.foo_; - result.barCase_ = barCase_; - result.bar_ = this.bar_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumInsideOneof) { - return mergeFrom((build.buf.validate.conformance.cases.EnumInsideOneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumInsideOneof other) { - if (other == build.buf.validate.conformance.cases.EnumInsideOneof.getDefaultInstance()) return this; - switch (other.getFooCase()) { - case VAL: { - setValValue(other.getValValue()); - break; - } - case FOO_NOT_SET: { - break; - } - } - switch (other.getBarCase()) { - case VAL2: { - setVal2Value(other.getVal2Value()); - break; - } - case BAR_NOT_SET: { - break; - } - } - 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 8: { - int rawValue = input.readEnum(); - fooCase_ = 1; - foo_ = rawValue; - break; - } // case 8 - case 16: { - int rawValue = input.readEnum(); - barCase_ = 2; - bar_ = rawValue; - break; - } // case 16 - 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 fooCase_ = 0; - private java.lang.Object foo_; - public FooCase - getFooCase() { - return FooCase.forNumber( - fooCase_); - } - - public Builder clearFoo() { - fooCase_ = 0; - foo_ = null; - onChanged(); - return this; - } - - private int barCase_ = 0; - private java.lang.Object bar_; - public BarCase - getBarCase() { - return BarCase.forNumber( - barCase_); - } - - public Builder clearBar() { - barCase_ = 0; - bar_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return fooCase_ == 1; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override - public int getValValue() { - if (fooCase_ == 1) { - return ((java.lang.Integer) foo_).intValue(); - } - return 0; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - fooCase_ = 1; - foo_ = value; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - if (fooCase_ == 1) { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber( - (java.lang.Integer) foo_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - return build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - fooCase_ = 1; - foo_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (fooCase_ == 1) { - fooCase_ = 0; - foo_ = null; - onChanged(); - } - return this; - } - - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return Whether the val2 field is set. - */ - @java.lang.Override - public boolean hasVal2() { - return barCase_ == 2; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val2. - */ - @java.lang.Override - public int getVal2Value() { - if (barCase_ == 2) { - return ((java.lang.Integer) bar_).intValue(); - } - return 0; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val2 to set. - * @return This builder for chaining. - */ - public Builder setVal2Value(int value) { - barCase_ = 2; - bar_ = value; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return The val2. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal2() { - if (barCase_ == 2) { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber( - (java.lang.Integer) bar_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - return build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @param value The val2 to set. - * @return This builder for chaining. - */ - public Builder setVal2(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - barCase_ = 2; - bar_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal2() { - if (barCase_ == 2) { - barCase_ = 0; - bar_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumInsideOneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumInsideOneof) - private static final build.buf.validate.conformance.cases.EnumInsideOneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumInsideOneof(); - } - - public static build.buf.validate.conformance.cases.EnumInsideOneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumInsideOneof 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.EnumInsideOneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneofOrBuilder.java deleted file mode 100644 index 0f6827f7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumInsideOneofOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumInsideOneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumInsideOneof) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); - - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return Whether the val2 field is set. - */ - boolean hasVal2(); - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val2. - */ - int getVal2Value(); - /** - * .buf.validate.conformance.cases.TestEnum val2 = 2 [json_name = "val2", (.buf.validate.field) = { ... } - * @return The val2. - */ - build.buf.validate.conformance.cases.TestEnum getVal2(); - - build.buf.validate.conformance.cases.EnumInsideOneof.FooCase getFooCase(); - - build.buf.validate.conformance.cases.EnumInsideOneof.BarCase getBarCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNone.java deleted file mode 100644 index 6bf315d3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNone.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumNone} - */ -public final class EnumNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumNone) - EnumNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumNone.class.getName()); - } - // Use EnumNone.newBuilder() to construct. - private EnumNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumNone() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumNone.class, build.buf.validate.conformance.cases.EnumNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumNone other = (build.buf.validate.conformance.cases.EnumNone) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumNone 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.EnumNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumNone 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.EnumNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumNone 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.EnumNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumNone 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.EnumNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumNone 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.EnumNone 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.EnumNone 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.EnumNone 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.EnumNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumNone) - build.buf.validate.conformance.cases.EnumNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumNone.class, build.buf.validate.conformance.cases.EnumNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumNone build() { - build.buf.validate.conformance.cases.EnumNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumNone buildPartial() { - build.buf.validate.conformance.cases.EnumNone result = new build.buf.validate.conformance.cases.EnumNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumNone) { - return mergeFrom((build.buf.validate.conformance.cases.EnumNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumNone other) { - if (other == build.buf.validate.conformance.cases.EnumNone.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumNone) - private static final build.buf.validate.conformance.cases.EnumNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumNone(); - } - - public static build.buf.validate.conformance.cases.EnumNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumNone 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.EnumNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNoneOrBuilder.java deleted file mode 100644 index 908bf2cc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNoneOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumNone) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val"]; - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotIn.java deleted file mode 100644 index fcf395e0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotIn.java +++ /dev/null @@ -1,459 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.EnumNotIn} - */ -public final class EnumNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.EnumNotIn) - EnumNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumNotIn.class.getName()); - } - // Use EnumNotIn.newBuilder() to construct. - private EnumNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private EnumNotIn() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumNotIn.class, build.buf.validate.conformance.cases.EnumNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.EnumNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.EnumNotIn other = (build.buf.validate.conformance.cases.EnumNotIn) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.EnumNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumNotIn 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.EnumNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumNotIn 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.EnumNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.EnumNotIn 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.EnumNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.EnumNotIn 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.EnumNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.EnumNotIn 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.EnumNotIn 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.EnumNotIn 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.EnumNotIn 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.EnumNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.EnumNotIn) - build.buf.validate.conformance.cases.EnumNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.EnumNotIn.class, build.buf.validate.conformance.cases.EnumNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.EnumNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_EnumNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.EnumNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumNotIn build() { - build.buf.validate.conformance.cases.EnumNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.EnumNotIn buildPartial() { - build.buf.validate.conformance.cases.EnumNotIn result = new build.buf.validate.conformance.cases.EnumNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.EnumNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.EnumNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.EnumNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.EnumNotIn other) { - if (other == build.buf.validate.conformance.cases.EnumNotIn.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal() { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.EnumNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.EnumNotIn) - private static final build.buf.validate.conformance.cases.EnumNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.EnumNotIn(); - } - - public static build.buf.validate.conformance.cases.EnumNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumNotIn 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.EnumNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotInOrBuilder.java deleted file mode 100644 index b1ac45a9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumNotInOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface EnumNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.EnumNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestEnum getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/EnumsProto.java deleted file mode 100644 index d4564ead..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/EnumsProto.java +++ /dev/null @@ -1,348 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class EnumsProto { - private EnumsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumAliasConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumAliasConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumAliasDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumAliasDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumAliasIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumAliasIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumAliasNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumAliasNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumExternal_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumExternal_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumExternal2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumExternal2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapEnumDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapEnumDefined_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapEnumDefined_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumInsideOneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumInsideOneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EnumExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EnumExample_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*buf/validate/conformance/cases/enums.p" + - "roto\022\036buf.validate.conformance.cases\0328bu" + - "f/validate/conformance/cases/other_packa" + - "ge/embed.proto\032?buf/validate/conformance" + - "/cases/yet_another_package/embed2.proto\032" + - "\033buf/validate/validate.proto\"F\n\010EnumNone" + - "\022:\n\003val\030\001 \001(\0162(.buf.validate.conformance" + - ".cases.TestEnumR\003val\"Q\n\tEnumConst\022D\n\003val" + - "\030\001 \001(\0162(.buf.validate.conformance.cases." + - "TestEnumB\010\272H\005\202\001\002\010\002R\003val\"[\n\016EnumAliasCons" + - "t\022I\n\003val\030\001 \001(\0162-.buf.validate.conformanc" + - "e.cases.TestEnumAliasB\010\272H\005\202\001\002\010\002R\003val\"S\n\013" + - "EnumDefined\022D\n\003val\030\001 \001(\0162(.buf.validate." + - "conformance.cases.TestEnumB\010\272H\005\202\001\002\020\001R\003va" + - "l\"]\n\020EnumAliasDefined\022I\n\003val\030\001 \001(\0162-.buf" + - ".validate.conformance.cases.TestEnumAlia" + - "sB\010\272H\005\202\001\002\020\001R\003val\"P\n\006EnumIn\022F\n\003val\030\001 \001(\0162" + - "(.buf.validate.conformance.cases.TestEnu" + - "mB\n\272H\007\202\001\004\030\000\030\002R\003val\"Z\n\013EnumAliasIn\022K\n\003val" + - "\030\001 \001(\0162-.buf.validate.conformance.cases." + - "TestEnumAliasB\n\272H\007\202\001\004\030\000\030\002R\003val\"Q\n\tEnumNo" + - "tIn\022D\n\003val\030\001 \001(\0162(.buf.validate.conforma" + - "nce.cases.TestEnumB\010\272H\005\202\001\002 \001R\003val\"[\n\016Enu" + - "mAliasNotIn\022I\n\003val\030\001 \001(\0162-.buf.validate." + - "conformance.cases.TestEnumAliasB\010\272H\005\202\001\002 " + - "\001R\003val\"j\n\014EnumExternal\022Z\n\003val\030\001 \001(\0162>.bu" + - "f.validate.conformance.cases.other_packa" + - "ge.Embed.EnumeratedB\010\272H\005\202\001\002\020\001R\003val\"}\n\rEn" + - "umExternal2\022l\n\003val\030\001 \001(\0162P.buf.validate." + - "conformance.cases.other_package.Embed.Do" + - "ubleEmbed.DoubleEnumeratedB\010\272H\005\202\001\002\020\001R\003va" + - "l\"`\n\023RepeatedEnumDefined\022I\n\003val\030\001 \003(\0162(." + - "buf.validate.conformance.cases.TestEnumB" + - "\r\272H\n\222\001\007\"\005\202\001\002\020\001R\003val\"~\n\033RepeatedExternalE" + - "numDefined\022_\n\003val\030\001 \003(\0162>.buf.validate.c" + - "onformance.cases.other_package.Embed.Enu" + - "meratedB\r\272H\n\222\001\007\"\005\202\001\002\020\001R\003val\"\216\001\n%Repeated" + - "YetAnotherExternalEnumDefined\022e\n\003val\030\001 \003" + - "(\0162D.buf.validate.conformance.cases.yet_" + - "another_package.Embed.EnumeratedB\r\272H\n\222\001\007" + - "\"\005\202\001\002\020\001R\003val\"\314\001\n\016MapEnumDefined\022X\n\003val\030\001" + - " \003(\01327.buf.validate.conformance.cases.Ma" + - "pEnumDefined.ValEntryB\r\272H\n\232\001\007*\005\202\001\002\020\001R\003va" + - "l\032`\n\010ValEntry\022\020\n\003key\030\001 \001(\tR\003key\022>\n\005value" + - "\030\002 \001(\0162(.buf.validate.conformance.cases." + - "TestEnumR\005value:\0028\001\"\362\001\n\026MapExternalEnumD" + - "efined\022`\n\003val\030\001 \003(\0132?.buf.validate.confo" + - "rmance.cases.MapExternalEnumDefined.ValE" + - "ntryB\r\272H\n\232\001\007*\005\202\001\002\020\001R\003val\032v\n\010ValEntry\022\020\n\003" + - "key\030\001 \001(\tR\003key\022T\n\005value\030\002 \001(\0162>.buf.vali" + - "date.conformance.cases.other_package.Emb" + - "ed.EnumeratedR\005value:\0028\001\"\263\001\n\017EnumInsideO" + - "neof\022F\n\003val\030\001 \001(\0162(.buf.validate.conform" + - "ance.cases.TestEnumB\010\272H\005\202\001\002\020\001H\000R\003val\022J\n\004" + - "val2\030\002 \001(\0162(.buf.validate.conformance.ca" + - "ses.TestEnumB\n\272H\007\202\001\004\020\001 \000H\001R\004val2B\005\n\003fooB" + - "\005\n\003bar\"S\n\013EnumExample\022D\n\003val\030\001 \001(\0162(.buf" + - ".validate.conformance.cases.TestEnumB\010\272H" + - "\005\202\001\002(\002R\003val*K\n\010TestEnum\022\031\n\025TEST_ENUM_UNS" + - "PECIFIED\020\000\022\021\n\rTEST_ENUM_ONE\020\001\022\021\n\rTEST_EN" + - "UM_TWO\020\002*\311\001\n\rTestEnumAlias\022\037\n\033TEST_ENUM_" + - "ALIAS_UNSPECIFIED\020\000\022\025\n\021TEST_ENUM_ALIAS_A" + - "\020\001\022\025\n\021TEST_ENUM_ALIAS_B\020\002\022\025\n\021TEST_ENUM_A" + - "LIAS_C\020\003\022\031\n\025TEST_ENUM_ALIAS_ALPHA\020\001\022\030\n\024T" + - "EST_ENUM_ALIAS_BETA\020\002\022\031\n\025TEST_ENUM_ALIAS" + - "_GAMMA\020\003\032\002\020\001B\316\001\n$build.buf.validate.conf" + - "ormance.casesB\nEnumsProtoP\001\242\002\004BVCC\252\002\036Buf" + - ".Validate.Conformance.Cases\312\002\036Buf\\Valida" + - "te\\Conformance\\Cases\342\002*Buf\\Validate\\Conf" + - "ormance\\Cases\\GPBMetadata\352\002!Buf::Validat" + - "e::Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.conformance.cases.other_package.EmbedProto.getDescriptor(), - build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.getDescriptor(), - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_EnumNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_EnumNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumConst_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_EnumConst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumConst_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumAliasConst_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_EnumAliasConst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumAliasConst_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumDefined_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_EnumDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumAliasDefined_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_EnumAliasDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumAliasDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumIn_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_EnumIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumAliasIn_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_EnumAliasIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumAliasIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumNotIn_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_EnumNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumAliasNotIn_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_EnumAliasNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumAliasNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumExternal_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_EnumExternal_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumExternal_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EnumExternal2_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_EnumExternal2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumExternal2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_MapEnumDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapEnumDefined_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapEnumDefined_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapEnumDefined_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EnumInsideOneof_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_EnumInsideOneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumInsideOneof_descriptor, - new java.lang.String[] { "Val", "Val2", "Foo", "Bar", }); - internal_static_buf_validate_conformance_cases_EnumExample_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_EnumExample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EnumExample_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.conformance.cases.other_package.EmbedProto.getDescriptor(); - build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.getDescriptor(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FilenameWithDashProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FilenameWithDashProto.java deleted file mode 100644 index d6c0104b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FilenameWithDashProto.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/filename-with-dash.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class FilenameWithDashProto { - private FilenameWithDashProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FilenameWithDashProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n7buf/validate/conformance/cases/filenam" + - "e-with-dash.proto\022\036buf.validate.conforma" + - "nce.cases\032\033buf/validate/validate.protoB\331" + - "\001\n$build.buf.validate.conformance.casesB" + - "\025FilenameWithDashProtoP\001\242\002\004BVCC\252\002\036Buf.Va" + - "lidate.Conformance.Cases\312\002\036Buf\\Validate\\" + - "Conformance\\Cases\342\002*Buf\\Validate\\Conform" + - "ance\\Cases\\GPBMetadata\352\002!Buf::Validate::" + - "Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Const.java deleted file mode 100644 index a201dbaa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Const.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32Const} - */ -public final class Fixed32Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32Const) - Fixed32ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32Const.class.getName()); - } - // Use Fixed32Const.newBuilder() to construct. - private Fixed32Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32Const.class, build.buf.validate.conformance.cases.Fixed32Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32Const other = (build.buf.validate.conformance.cases.Fixed32Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Const 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.Fixed32Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Const 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.Fixed32Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Const 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.Fixed32Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32Const 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.Fixed32Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32Const 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.Fixed32Const 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.Fixed32Const 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.Fixed32Const 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.Fixed32Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32Const) - build.buf.validate.conformance.cases.Fixed32ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32Const.class, build.buf.validate.conformance.cases.Fixed32Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Const build() { - build.buf.validate.conformance.cases.Fixed32Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Const buildPartial() { - build.buf.validate.conformance.cases.Fixed32Const result = new build.buf.validate.conformance.cases.Fixed32Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32Const) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32Const other) { - if (other == build.buf.validate.conformance.cases.Fixed32Const.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32Const) - private static final build.buf.validate.conformance.cases.Fixed32Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32Const(); - } - - public static build.buf.validate.conformance.cases.Fixed32Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32Const 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.Fixed32Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ConstOrBuilder.java deleted file mode 100644 index eb48148f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32Const) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTE.java deleted file mode 100644 index f85ab646..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32ExGTELTE} - */ -public final class Fixed32ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32ExGTELTE) - Fixed32ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32ExGTELTE.class.getName()); - } - // Use Fixed32ExGTELTE.newBuilder() to construct. - private Fixed32ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32ExGTELTE.class, build.buf.validate.conformance.cases.Fixed32ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32ExGTELTE other = (build.buf.validate.conformance.cases.Fixed32ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE 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.Fixed32ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE 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.Fixed32ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE 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.Fixed32ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE 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.Fixed32ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE 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.Fixed32ExGTELTE 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.Fixed32ExGTELTE 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.Fixed32ExGTELTE 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.Fixed32ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32ExGTELTE) - build.buf.validate.conformance.cases.Fixed32ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32ExGTELTE.class, build.buf.validate.conformance.cases.Fixed32ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32ExGTELTE build() { - build.buf.validate.conformance.cases.Fixed32ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.Fixed32ExGTELTE result = new build.buf.validate.conformance.cases.Fixed32ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.Fixed32ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32ExGTELTE) - private static final build.buf.validate.conformance.cases.Fixed32ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.Fixed32ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32ExGTELTE 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.Fixed32ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTEOrBuilder.java deleted file mode 100644 index a182d43f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGT.java deleted file mode 100644 index 35c2a5d9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32ExLTGT} - */ -public final class Fixed32ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32ExLTGT) - Fixed32ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32ExLTGT.class.getName()); - } - // Use Fixed32ExLTGT.newBuilder() to construct. - private Fixed32ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32ExLTGT.class, build.buf.validate.conformance.cases.Fixed32ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32ExLTGT other = (build.buf.validate.conformance.cases.Fixed32ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32ExLTGT 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.Fixed32ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32ExLTGT 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.Fixed32ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32ExLTGT 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.Fixed32ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32ExLTGT 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.Fixed32ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32ExLTGT 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.Fixed32ExLTGT 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.Fixed32ExLTGT 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.Fixed32ExLTGT 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.Fixed32ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32ExLTGT) - build.buf.validate.conformance.cases.Fixed32ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32ExLTGT.class, build.buf.validate.conformance.cases.Fixed32ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32ExLTGT build() { - build.buf.validate.conformance.cases.Fixed32ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32ExLTGT buildPartial() { - build.buf.validate.conformance.cases.Fixed32ExLTGT result = new build.buf.validate.conformance.cases.Fixed32ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32ExLTGT other) { - if (other == build.buf.validate.conformance.cases.Fixed32ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32ExLTGT) - private static final build.buf.validate.conformance.cases.Fixed32ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32ExLTGT(); - } - - public static build.buf.validate.conformance.cases.Fixed32ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32ExLTGT 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.Fixed32ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGTOrBuilder.java deleted file mode 100644 index a33381f1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Example.java deleted file mode 100644 index 517c5b7c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Example.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32Example} - */ -public final class Fixed32Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32Example) - Fixed32ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32Example.class.getName()); - } - // Use Fixed32Example.newBuilder() to construct. - private Fixed32Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32Example.class, build.buf.validate.conformance.cases.Fixed32Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32Example other = (build.buf.validate.conformance.cases.Fixed32Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Example 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.Fixed32Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Example 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.Fixed32Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Example 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.Fixed32Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32Example 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.Fixed32Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32Example 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.Fixed32Example 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.Fixed32Example 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.Fixed32Example 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.Fixed32Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32Example) - build.buf.validate.conformance.cases.Fixed32ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32Example.class, build.buf.validate.conformance.cases.Fixed32Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Example build() { - build.buf.validate.conformance.cases.Fixed32Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Example buildPartial() { - build.buf.validate.conformance.cases.Fixed32Example result = new build.buf.validate.conformance.cases.Fixed32Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32Example) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32Example other) { - if (other == build.buf.validate.conformance.cases.Fixed32Example.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32Example) - private static final build.buf.validate.conformance.cases.Fixed32Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32Example(); - } - - public static build.buf.validate.conformance.cases.Fixed32Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32Example 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.Fixed32Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExampleOrBuilder.java deleted file mode 100644 index 4d24b51e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32Example) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GT.java deleted file mode 100644 index fa870e64..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32GT} - */ -public final class Fixed32GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32GT) - Fixed32GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32GT.class.getName()); - } - // Use Fixed32GT.newBuilder() to construct. - private Fixed32GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GT.class, build.buf.validate.conformance.cases.Fixed32GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32GT other = (build.buf.validate.conformance.cases.Fixed32GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GT 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.Fixed32GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GT 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.Fixed32GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GT 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.Fixed32GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32GT 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.Fixed32GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32GT 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.Fixed32GT 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.Fixed32GT 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.Fixed32GT 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.Fixed32GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32GT) - build.buf.validate.conformance.cases.Fixed32GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GT.class, build.buf.validate.conformance.cases.Fixed32GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GT build() { - build.buf.validate.conformance.cases.Fixed32GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GT buildPartial() { - build.buf.validate.conformance.cases.Fixed32GT result = new build.buf.validate.conformance.cases.Fixed32GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32GT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32GT other) { - if (other == build.buf.validate.conformance.cases.Fixed32GT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32GT) - private static final build.buf.validate.conformance.cases.Fixed32GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32GT(); - } - - public static build.buf.validate.conformance.cases.Fixed32GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32GT 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.Fixed32GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTE.java deleted file mode 100644 index 983cdc9a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32GTE} - */ -public final class Fixed32GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32GTE) - Fixed32GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32GTE.class.getName()); - } - // Use Fixed32GTE.newBuilder() to construct. - private Fixed32GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GTE.class, build.buf.validate.conformance.cases.Fixed32GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32GTE other = (build.buf.validate.conformance.cases.Fixed32GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTE 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.Fixed32GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTE 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.Fixed32GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTE 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.Fixed32GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32GTE 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.Fixed32GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32GTE 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.Fixed32GTE 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.Fixed32GTE 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.Fixed32GTE 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.Fixed32GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32GTE) - build.buf.validate.conformance.cases.Fixed32GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GTE.class, build.buf.validate.conformance.cases.Fixed32GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTE build() { - build.buf.validate.conformance.cases.Fixed32GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTE buildPartial() { - build.buf.validate.conformance.cases.Fixed32GTE result = new build.buf.validate.conformance.cases.Fixed32GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32GTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32GTE other) { - if (other == build.buf.validate.conformance.cases.Fixed32GTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32GTE) - private static final build.buf.validate.conformance.cases.Fixed32GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32GTE(); - } - - public static build.buf.validate.conformance.cases.Fixed32GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32GTE 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.Fixed32GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTE.java deleted file mode 100644 index 895f0921..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32GTELTE} - */ -public final class Fixed32GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32GTELTE) - Fixed32GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32GTELTE.class.getName()); - } - // Use Fixed32GTELTE.newBuilder() to construct. - private Fixed32GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GTELTE.class, build.buf.validate.conformance.cases.Fixed32GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32GTELTE other = (build.buf.validate.conformance.cases.Fixed32GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTELTE 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.Fixed32GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTELTE 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.Fixed32GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTELTE 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.Fixed32GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32GTELTE 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.Fixed32GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32GTELTE 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.Fixed32GTELTE 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.Fixed32GTELTE 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.Fixed32GTELTE 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.Fixed32GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32GTELTE) - build.buf.validate.conformance.cases.Fixed32GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GTELTE.class, build.buf.validate.conformance.cases.Fixed32GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTELTE build() { - build.buf.validate.conformance.cases.Fixed32GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTELTE buildPartial() { - build.buf.validate.conformance.cases.Fixed32GTELTE result = new build.buf.validate.conformance.cases.Fixed32GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32GTELTE other) { - if (other == build.buf.validate.conformance.cases.Fixed32GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32GTELTE) - private static final build.buf.validate.conformance.cases.Fixed32GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32GTELTE(); - } - - public static build.buf.validate.conformance.cases.Fixed32GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32GTELTE 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.Fixed32GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTEOrBuilder.java deleted file mode 100644 index e678ab7a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTEOrBuilder.java deleted file mode 100644 index 11fde922..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLT.java deleted file mode 100644 index b49bb1d2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32GTLT} - */ -public final class Fixed32GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32GTLT) - Fixed32GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32GTLT.class.getName()); - } - // Use Fixed32GTLT.newBuilder() to construct. - private Fixed32GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GTLT.class, build.buf.validate.conformance.cases.Fixed32GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32GTLT other = (build.buf.validate.conformance.cases.Fixed32GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTLT 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.Fixed32GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTLT 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.Fixed32GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32GTLT 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.Fixed32GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32GTLT 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.Fixed32GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32GTLT 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.Fixed32GTLT 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.Fixed32GTLT 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.Fixed32GTLT 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.Fixed32GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32GTLT) - build.buf.validate.conformance.cases.Fixed32GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32GTLT.class, build.buf.validate.conformance.cases.Fixed32GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTLT build() { - build.buf.validate.conformance.cases.Fixed32GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32GTLT buildPartial() { - build.buf.validate.conformance.cases.Fixed32GTLT result = new build.buf.validate.conformance.cases.Fixed32GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32GTLT other) { - if (other == build.buf.validate.conformance.cases.Fixed32GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32GTLT) - private static final build.buf.validate.conformance.cases.Fixed32GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32GTLT(); - } - - public static build.buf.validate.conformance.cases.Fixed32GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32GTLT 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.Fixed32GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLTOrBuilder.java deleted file mode 100644 index 75b2010e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTOrBuilder.java deleted file mode 100644 index 4114f0f1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32GT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Ignore.java deleted file mode 100644 index 45d26ab6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32Ignore.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32Ignore} - */ -public final class Fixed32Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32Ignore) - Fixed32IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32Ignore.class.getName()); - } - // Use Fixed32Ignore.newBuilder() to construct. - private Fixed32Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32Ignore.class, build.buf.validate.conformance.cases.Fixed32Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32Ignore other = (build.buf.validate.conformance.cases.Fixed32Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Ignore 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.Fixed32Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Ignore 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.Fixed32Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32Ignore 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.Fixed32Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32Ignore 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.Fixed32Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32Ignore 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.Fixed32Ignore 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.Fixed32Ignore 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.Fixed32Ignore 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.Fixed32Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32Ignore) - build.buf.validate.conformance.cases.Fixed32IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32Ignore.class, build.buf.validate.conformance.cases.Fixed32Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Ignore build() { - build.buf.validate.conformance.cases.Fixed32Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32Ignore buildPartial() { - build.buf.validate.conformance.cases.Fixed32Ignore result = new build.buf.validate.conformance.cases.Fixed32Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32Ignore other) { - if (other == build.buf.validate.conformance.cases.Fixed32Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32Ignore) - private static final build.buf.validate.conformance.cases.Fixed32Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32Ignore(); - } - - public static build.buf.validate.conformance.cases.Fixed32Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32Ignore 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.Fixed32Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IgnoreOrBuilder.java deleted file mode 100644 index 7585214e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32In.java deleted file mode 100644 index 91e15f48..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32In.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32In} - */ -public final class Fixed32In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32In) - Fixed32InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32In.class.getName()); - } - // Use Fixed32In.newBuilder() to construct. - private Fixed32In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32In.class, build.buf.validate.conformance.cases.Fixed32In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32In other = (build.buf.validate.conformance.cases.Fixed32In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32In 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.Fixed32In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32In 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.Fixed32In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32In 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.Fixed32In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32In 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.Fixed32In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32In 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.Fixed32In 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.Fixed32In 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.Fixed32In 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.Fixed32In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32In) - build.buf.validate.conformance.cases.Fixed32InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32In.class, build.buf.validate.conformance.cases.Fixed32In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32In build() { - build.buf.validate.conformance.cases.Fixed32In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32In buildPartial() { - build.buf.validate.conformance.cases.Fixed32In result = new build.buf.validate.conformance.cases.Fixed32In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32In) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32In other) { - if (other == build.buf.validate.conformance.cases.Fixed32In.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32In) - private static final build.buf.validate.conformance.cases.Fixed32In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32In(); - } - - public static build.buf.validate.conformance.cases.Fixed32In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32In 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.Fixed32In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32InOrBuilder.java deleted file mode 100644 index dd9d9399..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32In) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectType.java deleted file mode 100644 index f95b8ae5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectType.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32IncorrectType} - */ -public final class Fixed32IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32IncorrectType) - Fixed32IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32IncorrectType.class.getName()); - } - // Use Fixed32IncorrectType.newBuilder() to construct. - private Fixed32IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32IncorrectType.class, build.buf.validate.conformance.cases.Fixed32IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32IncorrectType other = (build.buf.validate.conformance.cases.Fixed32IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32IncorrectType 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.Fixed32IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32IncorrectType 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.Fixed32IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32IncorrectType 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.Fixed32IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32IncorrectType 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.Fixed32IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32IncorrectType 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.Fixed32IncorrectType 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.Fixed32IncorrectType 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.Fixed32IncorrectType 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.Fixed32IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32IncorrectType) - build.buf.validate.conformance.cases.Fixed32IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32IncorrectType.class, build.buf.validate.conformance.cases.Fixed32IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32IncorrectType build() { - build.buf.validate.conformance.cases.Fixed32IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32IncorrectType buildPartial() { - build.buf.validate.conformance.cases.Fixed32IncorrectType result = new build.buf.validate.conformance.cases.Fixed32IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32IncorrectType other) { - if (other == build.buf.validate.conformance.cases.Fixed32IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32IncorrectType) - private static final build.buf.validate.conformance.cases.Fixed32IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32IncorrectType(); - } - - public static build.buf.validate.conformance.cases.Fixed32IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32IncorrectType 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.Fixed32IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectTypeOrBuilder.java deleted file mode 100644 index c3edf598..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LT.java deleted file mode 100644 index e287301e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32LT} - */ -public final class Fixed32LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32LT) - Fixed32LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32LT.class.getName()); - } - // Use Fixed32LT.newBuilder() to construct. - private Fixed32LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32LT.class, build.buf.validate.conformance.cases.Fixed32LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32LT other = (build.buf.validate.conformance.cases.Fixed32LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32LT 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.Fixed32LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32LT 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.Fixed32LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32LT 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.Fixed32LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32LT 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.Fixed32LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32LT 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.Fixed32LT 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.Fixed32LT 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.Fixed32LT 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.Fixed32LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32LT) - build.buf.validate.conformance.cases.Fixed32LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32LT.class, build.buf.validate.conformance.cases.Fixed32LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32LT build() { - build.buf.validate.conformance.cases.Fixed32LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32LT buildPartial() { - build.buf.validate.conformance.cases.Fixed32LT result = new build.buf.validate.conformance.cases.Fixed32LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32LT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32LT other) { - if (other == build.buf.validate.conformance.cases.Fixed32LT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32LT) - private static final build.buf.validate.conformance.cases.Fixed32LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32LT(); - } - - public static build.buf.validate.conformance.cases.Fixed32LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32LT 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.Fixed32LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTE.java deleted file mode 100644 index 4126833d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32LTE} - */ -public final class Fixed32LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32LTE) - Fixed32LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32LTE.class.getName()); - } - // Use Fixed32LTE.newBuilder() to construct. - private Fixed32LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32LTE.class, build.buf.validate.conformance.cases.Fixed32LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32LTE other = (build.buf.validate.conformance.cases.Fixed32LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32LTE 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.Fixed32LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32LTE 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.Fixed32LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32LTE 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.Fixed32LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32LTE 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.Fixed32LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32LTE 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.Fixed32LTE 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.Fixed32LTE 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.Fixed32LTE 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.Fixed32LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32LTE) - build.buf.validate.conformance.cases.Fixed32LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32LTE.class, build.buf.validate.conformance.cases.Fixed32LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32LTE build() { - build.buf.validate.conformance.cases.Fixed32LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32LTE buildPartial() { - build.buf.validate.conformance.cases.Fixed32LTE result = new build.buf.validate.conformance.cases.Fixed32LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32LTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32LTE other) { - if (other == build.buf.validate.conformance.cases.Fixed32LTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32LTE) - private static final build.buf.validate.conformance.cases.Fixed32LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32LTE(); - } - - public static build.buf.validate.conformance.cases.Fixed32LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32LTE 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.Fixed32LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTEOrBuilder.java deleted file mode 100644 index 428298a7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTOrBuilder.java deleted file mode 100644 index bde77d41..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32LT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32None.java deleted file mode 100644 index 049ff0c2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32None.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32None} - */ -public final class Fixed32None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32None) - Fixed32NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32None.class.getName()); - } - // Use Fixed32None.newBuilder() to construct. - private Fixed32None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32None.class, build.buf.validate.conformance.cases.Fixed32None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32None other = (build.buf.validate.conformance.cases.Fixed32None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32None 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.Fixed32None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32None 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.Fixed32None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32None 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.Fixed32None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32None 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.Fixed32None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32None 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.Fixed32None 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.Fixed32None 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.Fixed32None 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.Fixed32None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32None) - build.buf.validate.conformance.cases.Fixed32NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32None.class, build.buf.validate.conformance.cases.Fixed32None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32None build() { - build.buf.validate.conformance.cases.Fixed32None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32None buildPartial() { - build.buf.validate.conformance.cases.Fixed32None result = new build.buf.validate.conformance.cases.Fixed32None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32None) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32None other) { - if (other == build.buf.validate.conformance.cases.Fixed32None.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32None) - private static final build.buf.validate.conformance.cases.Fixed32None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32None(); - } - - public static build.buf.validate.conformance.cases.Fixed32None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32None 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.Fixed32None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NoneOrBuilder.java deleted file mode 100644 index fe475813..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32None) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val"]; - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotIn.java deleted file mode 100644 index 6b869bd6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotIn.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed32NotIn} - */ -public final class Fixed32NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed32NotIn) - Fixed32NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32NotIn.class.getName()); - } - // Use Fixed32NotIn.newBuilder() to construct. - private Fixed32NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed32NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32NotIn.class, build.buf.validate.conformance.cases.Fixed32NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.Fixed32NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed32NotIn other = (build.buf.validate.conformance.cases.Fixed32NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed32NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32NotIn 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.Fixed32NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32NotIn 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.Fixed32NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed32NotIn 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.Fixed32NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed32NotIn 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.Fixed32NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed32NotIn 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.Fixed32NotIn 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.Fixed32NotIn 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.Fixed32NotIn 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.Fixed32NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed32NotIn) - build.buf.validate.conformance.cases.Fixed32NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed32NotIn.class, build.buf.validate.conformance.cases.Fixed32NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed32NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed32NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed32NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32NotIn build() { - build.buf.validate.conformance.cases.Fixed32NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed32NotIn buildPartial() { - build.buf.validate.conformance.cases.Fixed32NotIn result = new build.buf.validate.conformance.cases.Fixed32NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed32NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed32NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed32NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed32NotIn other) { - if (other == build.buf.validate.conformance.cases.Fixed32NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed32NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed32NotIn) - private static final build.buf.validate.conformance.cases.Fixed32NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed32NotIn(); - } - - public static build.buf.validate.conformance.cases.Fixed32NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32NotIn 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.Fixed32NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotInOrBuilder.java deleted file mode 100644 index ef77a6dc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed32NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed32NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed32NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Const.java deleted file mode 100644 index 645d9dcd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Const.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64Const} - */ -public final class Fixed64Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64Const) - Fixed64ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64Const.class.getName()); - } - // Use Fixed64Const.newBuilder() to construct. - private Fixed64Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64Const.class, build.buf.validate.conformance.cases.Fixed64Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64Const other = (build.buf.validate.conformance.cases.Fixed64Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Const 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.Fixed64Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Const 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.Fixed64Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Const 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.Fixed64Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64Const 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.Fixed64Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64Const 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.Fixed64Const 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.Fixed64Const 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.Fixed64Const 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.Fixed64Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64Const) - build.buf.validate.conformance.cases.Fixed64ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64Const.class, build.buf.validate.conformance.cases.Fixed64Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Const build() { - build.buf.validate.conformance.cases.Fixed64Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Const buildPartial() { - build.buf.validate.conformance.cases.Fixed64Const result = new build.buf.validate.conformance.cases.Fixed64Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64Const) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64Const other) { - if (other == build.buf.validate.conformance.cases.Fixed64Const.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64Const) - private static final build.buf.validate.conformance.cases.Fixed64Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64Const(); - } - - public static build.buf.validate.conformance.cases.Fixed64Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64Const 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.Fixed64Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ConstOrBuilder.java deleted file mode 100644 index e4793982..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64Const) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTE.java deleted file mode 100644 index 356df0dd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64ExGTELTE} - */ -public final class Fixed64ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64ExGTELTE) - Fixed64ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64ExGTELTE.class.getName()); - } - // Use Fixed64ExGTELTE.newBuilder() to construct. - private Fixed64ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64ExGTELTE.class, build.buf.validate.conformance.cases.Fixed64ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64ExGTELTE other = (build.buf.validate.conformance.cases.Fixed64ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE 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.Fixed64ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE 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.Fixed64ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE 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.Fixed64ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE 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.Fixed64ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE 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.Fixed64ExGTELTE 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.Fixed64ExGTELTE 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.Fixed64ExGTELTE 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.Fixed64ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64ExGTELTE) - build.buf.validate.conformance.cases.Fixed64ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64ExGTELTE.class, build.buf.validate.conformance.cases.Fixed64ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64ExGTELTE build() { - build.buf.validate.conformance.cases.Fixed64ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.Fixed64ExGTELTE result = new build.buf.validate.conformance.cases.Fixed64ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.Fixed64ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64ExGTELTE) - private static final build.buf.validate.conformance.cases.Fixed64ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.Fixed64ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64ExGTELTE 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.Fixed64ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTEOrBuilder.java deleted file mode 100644 index 24c9733a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGT.java deleted file mode 100644 index 4684c1e8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64ExLTGT} - */ -public final class Fixed64ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64ExLTGT) - Fixed64ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64ExLTGT.class.getName()); - } - // Use Fixed64ExLTGT.newBuilder() to construct. - private Fixed64ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64ExLTGT.class, build.buf.validate.conformance.cases.Fixed64ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64ExLTGT other = (build.buf.validate.conformance.cases.Fixed64ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64ExLTGT 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.Fixed64ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64ExLTGT 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.Fixed64ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64ExLTGT 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.Fixed64ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64ExLTGT 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.Fixed64ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64ExLTGT 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.Fixed64ExLTGT 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.Fixed64ExLTGT 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.Fixed64ExLTGT 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.Fixed64ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64ExLTGT) - build.buf.validate.conformance.cases.Fixed64ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64ExLTGT.class, build.buf.validate.conformance.cases.Fixed64ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64ExLTGT build() { - build.buf.validate.conformance.cases.Fixed64ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64ExLTGT buildPartial() { - build.buf.validate.conformance.cases.Fixed64ExLTGT result = new build.buf.validate.conformance.cases.Fixed64ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64ExLTGT other) { - if (other == build.buf.validate.conformance.cases.Fixed64ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64ExLTGT) - private static final build.buf.validate.conformance.cases.Fixed64ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64ExLTGT(); - } - - public static build.buf.validate.conformance.cases.Fixed64ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64ExLTGT 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.Fixed64ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGTOrBuilder.java deleted file mode 100644 index a73b8f3a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Example.java deleted file mode 100644 index eb73d654..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Example.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64Example} - */ -public final class Fixed64Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64Example) - Fixed64ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64Example.class.getName()); - } - // Use Fixed64Example.newBuilder() to construct. - private Fixed64Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64Example.class, build.buf.validate.conformance.cases.Fixed64Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64Example other = (build.buf.validate.conformance.cases.Fixed64Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Example 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.Fixed64Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Example 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.Fixed64Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Example 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.Fixed64Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64Example 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.Fixed64Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64Example 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.Fixed64Example 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.Fixed64Example 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.Fixed64Example 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.Fixed64Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64Example) - build.buf.validate.conformance.cases.Fixed64ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64Example.class, build.buf.validate.conformance.cases.Fixed64Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Example build() { - build.buf.validate.conformance.cases.Fixed64Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Example buildPartial() { - build.buf.validate.conformance.cases.Fixed64Example result = new build.buf.validate.conformance.cases.Fixed64Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64Example) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64Example other) { - if (other == build.buf.validate.conformance.cases.Fixed64Example.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64Example) - private static final build.buf.validate.conformance.cases.Fixed64Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64Example(); - } - - public static build.buf.validate.conformance.cases.Fixed64Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64Example 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.Fixed64Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExampleOrBuilder.java deleted file mode 100644 index 9646fb0c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64Example) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GT.java deleted file mode 100644 index deb2539b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64GT} - */ -public final class Fixed64GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64GT) - Fixed64GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64GT.class.getName()); - } - // Use Fixed64GT.newBuilder() to construct. - private Fixed64GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GT.class, build.buf.validate.conformance.cases.Fixed64GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64GT other = (build.buf.validate.conformance.cases.Fixed64GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GT 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.Fixed64GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GT 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.Fixed64GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GT 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.Fixed64GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64GT 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.Fixed64GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64GT 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.Fixed64GT 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.Fixed64GT 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.Fixed64GT 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.Fixed64GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64GT) - build.buf.validate.conformance.cases.Fixed64GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GT.class, build.buf.validate.conformance.cases.Fixed64GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GT build() { - build.buf.validate.conformance.cases.Fixed64GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GT buildPartial() { - build.buf.validate.conformance.cases.Fixed64GT result = new build.buf.validate.conformance.cases.Fixed64GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64GT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64GT other) { - if (other == build.buf.validate.conformance.cases.Fixed64GT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64GT) - private static final build.buf.validate.conformance.cases.Fixed64GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64GT(); - } - - public static build.buf.validate.conformance.cases.Fixed64GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64GT 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.Fixed64GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTE.java deleted file mode 100644 index fed46384..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64GTE} - */ -public final class Fixed64GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64GTE) - Fixed64GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64GTE.class.getName()); - } - // Use Fixed64GTE.newBuilder() to construct. - private Fixed64GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GTE.class, build.buf.validate.conformance.cases.Fixed64GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64GTE other = (build.buf.validate.conformance.cases.Fixed64GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTE 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.Fixed64GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTE 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.Fixed64GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTE 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.Fixed64GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64GTE 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.Fixed64GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64GTE 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.Fixed64GTE 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.Fixed64GTE 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.Fixed64GTE 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.Fixed64GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64GTE) - build.buf.validate.conformance.cases.Fixed64GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GTE.class, build.buf.validate.conformance.cases.Fixed64GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTE build() { - build.buf.validate.conformance.cases.Fixed64GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTE buildPartial() { - build.buf.validate.conformance.cases.Fixed64GTE result = new build.buf.validate.conformance.cases.Fixed64GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64GTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64GTE other) { - if (other == build.buf.validate.conformance.cases.Fixed64GTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64GTE) - private static final build.buf.validate.conformance.cases.Fixed64GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64GTE(); - } - - public static build.buf.validate.conformance.cases.Fixed64GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64GTE 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.Fixed64GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTE.java deleted file mode 100644 index 9288d33c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64GTELTE} - */ -public final class Fixed64GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64GTELTE) - Fixed64GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64GTELTE.class.getName()); - } - // Use Fixed64GTELTE.newBuilder() to construct. - private Fixed64GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GTELTE.class, build.buf.validate.conformance.cases.Fixed64GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64GTELTE other = (build.buf.validate.conformance.cases.Fixed64GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTELTE 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.Fixed64GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTELTE 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.Fixed64GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTELTE 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.Fixed64GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64GTELTE 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.Fixed64GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64GTELTE 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.Fixed64GTELTE 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.Fixed64GTELTE 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.Fixed64GTELTE 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.Fixed64GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64GTELTE) - build.buf.validate.conformance.cases.Fixed64GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GTELTE.class, build.buf.validate.conformance.cases.Fixed64GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTELTE build() { - build.buf.validate.conformance.cases.Fixed64GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTELTE buildPartial() { - build.buf.validate.conformance.cases.Fixed64GTELTE result = new build.buf.validate.conformance.cases.Fixed64GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64GTELTE other) { - if (other == build.buf.validate.conformance.cases.Fixed64GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64GTELTE) - private static final build.buf.validate.conformance.cases.Fixed64GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64GTELTE(); - } - - public static build.buf.validate.conformance.cases.Fixed64GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64GTELTE 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.Fixed64GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTEOrBuilder.java deleted file mode 100644 index 93f31c96..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTEOrBuilder.java deleted file mode 100644 index ee2791f3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLT.java deleted file mode 100644 index 91d054f2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64GTLT} - */ -public final class Fixed64GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64GTLT) - Fixed64GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64GTLT.class.getName()); - } - // Use Fixed64GTLT.newBuilder() to construct. - private Fixed64GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GTLT.class, build.buf.validate.conformance.cases.Fixed64GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64GTLT other = (build.buf.validate.conformance.cases.Fixed64GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTLT 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.Fixed64GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTLT 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.Fixed64GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64GTLT 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.Fixed64GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64GTLT 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.Fixed64GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64GTLT 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.Fixed64GTLT 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.Fixed64GTLT 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.Fixed64GTLT 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.Fixed64GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64GTLT) - build.buf.validate.conformance.cases.Fixed64GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64GTLT.class, build.buf.validate.conformance.cases.Fixed64GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTLT build() { - build.buf.validate.conformance.cases.Fixed64GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64GTLT buildPartial() { - build.buf.validate.conformance.cases.Fixed64GTLT result = new build.buf.validate.conformance.cases.Fixed64GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64GTLT other) { - if (other == build.buf.validate.conformance.cases.Fixed64GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64GTLT) - private static final build.buf.validate.conformance.cases.Fixed64GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64GTLT(); - } - - public static build.buf.validate.conformance.cases.Fixed64GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64GTLT 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.Fixed64GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLTOrBuilder.java deleted file mode 100644 index bff5e64f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTOrBuilder.java deleted file mode 100644 index 86799542..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64GT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Ignore.java deleted file mode 100644 index 27e14348..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64Ignore.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64Ignore} - */ -public final class Fixed64Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64Ignore) - Fixed64IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64Ignore.class.getName()); - } - // Use Fixed64Ignore.newBuilder() to construct. - private Fixed64Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64Ignore.class, build.buf.validate.conformance.cases.Fixed64Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64Ignore other = (build.buf.validate.conformance.cases.Fixed64Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Ignore 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.Fixed64Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Ignore 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.Fixed64Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64Ignore 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.Fixed64Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64Ignore 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.Fixed64Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64Ignore 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.Fixed64Ignore 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.Fixed64Ignore 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.Fixed64Ignore 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.Fixed64Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64Ignore) - build.buf.validate.conformance.cases.Fixed64IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64Ignore.class, build.buf.validate.conformance.cases.Fixed64Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Ignore build() { - build.buf.validate.conformance.cases.Fixed64Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64Ignore buildPartial() { - build.buf.validate.conformance.cases.Fixed64Ignore result = new build.buf.validate.conformance.cases.Fixed64Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64Ignore other) { - if (other == build.buf.validate.conformance.cases.Fixed64Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64Ignore) - private static final build.buf.validate.conformance.cases.Fixed64Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64Ignore(); - } - - public static build.buf.validate.conformance.cases.Fixed64Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64Ignore 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.Fixed64Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IgnoreOrBuilder.java deleted file mode 100644 index f48230d9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64In.java deleted file mode 100644 index 06729a64..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64In.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64In} - */ -public final class Fixed64In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64In) - Fixed64InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64In.class.getName()); - } - // Use Fixed64In.newBuilder() to construct. - private Fixed64In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64In.class, build.buf.validate.conformance.cases.Fixed64In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64In other = (build.buf.validate.conformance.cases.Fixed64In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64In 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.Fixed64In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64In 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.Fixed64In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64In 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.Fixed64In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64In 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.Fixed64In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64In 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.Fixed64In 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.Fixed64In 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.Fixed64In 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.Fixed64In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64In) - build.buf.validate.conformance.cases.Fixed64InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64In.class, build.buf.validate.conformance.cases.Fixed64In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64In build() { - build.buf.validate.conformance.cases.Fixed64In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64In buildPartial() { - build.buf.validate.conformance.cases.Fixed64In result = new build.buf.validate.conformance.cases.Fixed64In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64In) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64In other) { - if (other == build.buf.validate.conformance.cases.Fixed64In.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64In) - private static final build.buf.validate.conformance.cases.Fixed64In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64In(); - } - - public static build.buf.validate.conformance.cases.Fixed64In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64In 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.Fixed64In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64InOrBuilder.java deleted file mode 100644 index 6ff544fc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64In) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectType.java deleted file mode 100644 index fb163446..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectType.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64IncorrectType} - */ -public final class Fixed64IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64IncorrectType) - Fixed64IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64IncorrectType.class.getName()); - } - // Use Fixed64IncorrectType.newBuilder() to construct. - private Fixed64IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64IncorrectType.class, build.buf.validate.conformance.cases.Fixed64IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64IncorrectType other = (build.buf.validate.conformance.cases.Fixed64IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64IncorrectType 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.Fixed64IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64IncorrectType 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.Fixed64IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64IncorrectType 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.Fixed64IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64IncorrectType 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.Fixed64IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64IncorrectType 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.Fixed64IncorrectType 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.Fixed64IncorrectType 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.Fixed64IncorrectType 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.Fixed64IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64IncorrectType) - build.buf.validate.conformance.cases.Fixed64IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64IncorrectType.class, build.buf.validate.conformance.cases.Fixed64IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64IncorrectType build() { - build.buf.validate.conformance.cases.Fixed64IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64IncorrectType buildPartial() { - build.buf.validate.conformance.cases.Fixed64IncorrectType result = new build.buf.validate.conformance.cases.Fixed64IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64IncorrectType other) { - if (other == build.buf.validate.conformance.cases.Fixed64IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64IncorrectType) - private static final build.buf.validate.conformance.cases.Fixed64IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64IncorrectType(); - } - - public static build.buf.validate.conformance.cases.Fixed64IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64IncorrectType 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.Fixed64IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectTypeOrBuilder.java deleted file mode 100644 index 92464536..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LT.java deleted file mode 100644 index 2c074d5c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64LT} - */ -public final class Fixed64LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64LT) - Fixed64LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64LT.class.getName()); - } - // Use Fixed64LT.newBuilder() to construct. - private Fixed64LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64LT.class, build.buf.validate.conformance.cases.Fixed64LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64LT other = (build.buf.validate.conformance.cases.Fixed64LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64LT 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.Fixed64LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64LT 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.Fixed64LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64LT 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.Fixed64LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64LT 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.Fixed64LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64LT 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.Fixed64LT 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.Fixed64LT 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.Fixed64LT 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.Fixed64LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64LT) - build.buf.validate.conformance.cases.Fixed64LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64LT.class, build.buf.validate.conformance.cases.Fixed64LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64LT build() { - build.buf.validate.conformance.cases.Fixed64LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64LT buildPartial() { - build.buf.validate.conformance.cases.Fixed64LT result = new build.buf.validate.conformance.cases.Fixed64LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64LT) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64LT other) { - if (other == build.buf.validate.conformance.cases.Fixed64LT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64LT) - private static final build.buf.validate.conformance.cases.Fixed64LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64LT(); - } - - public static build.buf.validate.conformance.cases.Fixed64LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64LT 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.Fixed64LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTE.java deleted file mode 100644 index 15b7c082..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64LTE} - */ -public final class Fixed64LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64LTE) - Fixed64LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64LTE.class.getName()); - } - // Use Fixed64LTE.newBuilder() to construct. - private Fixed64LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64LTE.class, build.buf.validate.conformance.cases.Fixed64LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64LTE other = (build.buf.validate.conformance.cases.Fixed64LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64LTE 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.Fixed64LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64LTE 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.Fixed64LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64LTE 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.Fixed64LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64LTE 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.Fixed64LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64LTE 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.Fixed64LTE 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.Fixed64LTE 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.Fixed64LTE 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.Fixed64LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64LTE) - build.buf.validate.conformance.cases.Fixed64LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64LTE.class, build.buf.validate.conformance.cases.Fixed64LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64LTE build() { - build.buf.validate.conformance.cases.Fixed64LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64LTE buildPartial() { - build.buf.validate.conformance.cases.Fixed64LTE result = new build.buf.validate.conformance.cases.Fixed64LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64LTE) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64LTE other) { - if (other == build.buf.validate.conformance.cases.Fixed64LTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64LTE) - private static final build.buf.validate.conformance.cases.Fixed64LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64LTE(); - } - - public static build.buf.validate.conformance.cases.Fixed64LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64LTE 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.Fixed64LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTEOrBuilder.java deleted file mode 100644 index bc89275a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTOrBuilder.java deleted file mode 100644 index b8b31031..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64LT) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64None.java deleted file mode 100644 index d36db8a7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64None.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64None} - */ -public final class Fixed64None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64None) - Fixed64NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64None.class.getName()); - } - // Use Fixed64None.newBuilder() to construct. - private Fixed64None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64None.class, build.buf.validate.conformance.cases.Fixed64None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64None other = (build.buf.validate.conformance.cases.Fixed64None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64None 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.Fixed64None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64None 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.Fixed64None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64None 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.Fixed64None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64None 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.Fixed64None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64None 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.Fixed64None 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.Fixed64None 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.Fixed64None 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.Fixed64None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64None) - build.buf.validate.conformance.cases.Fixed64NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64None.class, build.buf.validate.conformance.cases.Fixed64None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64None build() { - build.buf.validate.conformance.cases.Fixed64None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64None buildPartial() { - build.buf.validate.conformance.cases.Fixed64None result = new build.buf.validate.conformance.cases.Fixed64None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64None) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64None other) { - if (other == build.buf.validate.conformance.cases.Fixed64None.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64None) - private static final build.buf.validate.conformance.cases.Fixed64None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64None(); - } - - public static build.buf.validate.conformance.cases.Fixed64None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64None 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.Fixed64None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NoneOrBuilder.java deleted file mode 100644 index 317ad922..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64None) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val"]; - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotIn.java deleted file mode 100644 index 973f5385..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Fixed64NotIn} - */ -public final class Fixed64NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Fixed64NotIn) - Fixed64NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64NotIn.class.getName()); - } - // Use Fixed64NotIn.newBuilder() to construct. - private Fixed64NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Fixed64NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64NotIn.class, build.buf.validate.conformance.cases.Fixed64NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.Fixed64NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Fixed64NotIn other = (build.buf.validate.conformance.cases.Fixed64NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Fixed64NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64NotIn 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.Fixed64NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64NotIn 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.Fixed64NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Fixed64NotIn 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.Fixed64NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Fixed64NotIn 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.Fixed64NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Fixed64NotIn 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.Fixed64NotIn 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.Fixed64NotIn 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.Fixed64NotIn 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.Fixed64NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Fixed64NotIn) - build.buf.validate.conformance.cases.Fixed64NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Fixed64NotIn.class, build.buf.validate.conformance.cases.Fixed64NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Fixed64NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Fixed64NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Fixed64NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64NotIn build() { - build.buf.validate.conformance.cases.Fixed64NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Fixed64NotIn buildPartial() { - build.buf.validate.conformance.cases.Fixed64NotIn result = new build.buf.validate.conformance.cases.Fixed64NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Fixed64NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Fixed64NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.Fixed64NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Fixed64NotIn other) { - if (other == build.buf.validate.conformance.cases.Fixed64NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Fixed64NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Fixed64NotIn) - private static final build.buf.validate.conformance.cases.Fixed64NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Fixed64NotIn(); - } - - public static build.buf.validate.conformance.cases.Fixed64NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64NotIn 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.Fixed64NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotInOrBuilder.java deleted file mode 100644 index 74c061be..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Fixed64NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Fixed64NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Fixed64NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatConst.java deleted file mode 100644 index bdb75565..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatConst.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatConst} - */ -public final class FloatConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatConst) - FloatConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatConst.class.getName()); - } - // Use FloatConst.newBuilder() to construct. - private FloatConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatConst() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatConst.class, build.buf.validate.conformance.cases.FloatConst.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatConst other = (build.buf.validate.conformance.cases.FloatConst) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatConst 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.FloatConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatConst 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.FloatConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatConst 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.FloatConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatConst 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.FloatConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatConst 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.FloatConst 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.FloatConst 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.FloatConst 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.FloatConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatConst) - build.buf.validate.conformance.cases.FloatConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatConst.class, build.buf.validate.conformance.cases.FloatConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatConst.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatConst build() { - build.buf.validate.conformance.cases.FloatConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatConst buildPartial() { - build.buf.validate.conformance.cases.FloatConst result = new build.buf.validate.conformance.cases.FloatConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatConst result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatConst) { - return mergeFrom((build.buf.validate.conformance.cases.FloatConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatConst other) { - if (other == build.buf.validate.conformance.cases.FloatConst.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatConst) - private static final build.buf.validate.conformance.cases.FloatConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatConst(); - } - - public static build.buf.validate.conformance.cases.FloatConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatConst 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.FloatConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatConstOrBuilder.java deleted file mode 100644 index 67587271..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatConst) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTE.java deleted file mode 100644 index eaf53ce2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatExGTELTE} - */ -public final class FloatExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatExGTELTE) - FloatExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatExGTELTE.class.getName()); - } - // Use FloatExGTELTE.newBuilder() to construct. - private FloatExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatExGTELTE.class, build.buf.validate.conformance.cases.FloatExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatExGTELTE other = (build.buf.validate.conformance.cases.FloatExGTELTE) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExGTELTE 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.FloatExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExGTELTE 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.FloatExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExGTELTE 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.FloatExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatExGTELTE 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.FloatExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatExGTELTE 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.FloatExGTELTE 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.FloatExGTELTE 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.FloatExGTELTE 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.FloatExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatExGTELTE) - build.buf.validate.conformance.cases.FloatExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatExGTELTE.class, build.buf.validate.conformance.cases.FloatExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExGTELTE build() { - build.buf.validate.conformance.cases.FloatExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExGTELTE buildPartial() { - build.buf.validate.conformance.cases.FloatExGTELTE result = new build.buf.validate.conformance.cases.FloatExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.FloatExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatExGTELTE other) { - if (other == build.buf.validate.conformance.cases.FloatExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatExGTELTE) - private static final build.buf.validate.conformance.cases.FloatExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatExGTELTE(); - } - - public static build.buf.validate.conformance.cases.FloatExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatExGTELTE 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.FloatExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTEOrBuilder.java deleted file mode 100644 index 0a726a13..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGT.java deleted file mode 100644 index 9bba047f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatExLTGT} - */ -public final class FloatExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatExLTGT) - FloatExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatExLTGT.class.getName()); - } - // Use FloatExLTGT.newBuilder() to construct. - private FloatExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatExLTGT.class, build.buf.validate.conformance.cases.FloatExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatExLTGT other = (build.buf.validate.conformance.cases.FloatExLTGT) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExLTGT 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.FloatExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExLTGT 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.FloatExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExLTGT 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.FloatExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatExLTGT 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.FloatExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatExLTGT 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.FloatExLTGT 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.FloatExLTGT 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.FloatExLTGT 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.FloatExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatExLTGT) - build.buf.validate.conformance.cases.FloatExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatExLTGT.class, build.buf.validate.conformance.cases.FloatExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExLTGT build() { - build.buf.validate.conformance.cases.FloatExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExLTGT buildPartial() { - build.buf.validate.conformance.cases.FloatExLTGT result = new build.buf.validate.conformance.cases.FloatExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.FloatExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatExLTGT other) { - if (other == build.buf.validate.conformance.cases.FloatExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatExLTGT) - private static final build.buf.validate.conformance.cases.FloatExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatExLTGT(); - } - - public static build.buf.validate.conformance.cases.FloatExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatExLTGT 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.FloatExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGTOrBuilder.java deleted file mode 100644 index ec4b1922..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExample.java deleted file mode 100644 index 8d4e4561..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExample.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatExample} - */ -public final class FloatExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatExample) - FloatExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatExample.class.getName()); - } - // Use FloatExample.newBuilder() to construct. - private FloatExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatExample() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatExample.class, build.buf.validate.conformance.cases.FloatExample.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatExample other = (build.buf.validate.conformance.cases.FloatExample) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExample 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.FloatExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExample 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.FloatExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatExample 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.FloatExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatExample 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.FloatExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatExample 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.FloatExample 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.FloatExample 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.FloatExample 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.FloatExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatExample) - build.buf.validate.conformance.cases.FloatExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatExample.class, build.buf.validate.conformance.cases.FloatExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatExample.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExample build() { - build.buf.validate.conformance.cases.FloatExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatExample buildPartial() { - build.buf.validate.conformance.cases.FloatExample result = new build.buf.validate.conformance.cases.FloatExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatExample result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatExample) { - return mergeFrom((build.buf.validate.conformance.cases.FloatExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatExample other) { - if (other == build.buf.validate.conformance.cases.FloatExample.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatExample) - private static final build.buf.validate.conformance.cases.FloatExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatExample(); - } - - public static build.buf.validate.conformance.cases.FloatExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatExample 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.FloatExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExampleOrBuilder.java deleted file mode 100644 index ec70e862..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatExample) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatFinite.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatFinite.java deleted file mode 100644 index f0a16092..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatFinite.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatFinite} - */ -public final class FloatFinite extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatFinite) - FloatFiniteOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatFinite.class.getName()); - } - // Use FloatFinite.newBuilder() to construct. - private FloatFinite(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatFinite() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatFinite.class, build.buf.validate.conformance.cases.FloatFinite.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatFinite)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatFinite other = (build.buf.validate.conformance.cases.FloatFinite) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatFinite parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatFinite 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.FloatFinite parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatFinite 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.FloatFinite parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatFinite 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.FloatFinite parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatFinite 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.FloatFinite parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatFinite 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.FloatFinite 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.FloatFinite 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.FloatFinite 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.FloatFinite} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatFinite) - build.buf.validate.conformance.cases.FloatFiniteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatFinite.class, build.buf.validate.conformance.cases.FloatFinite.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatFinite.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatFinite_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatFinite getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatFinite.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatFinite build() { - build.buf.validate.conformance.cases.FloatFinite result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatFinite buildPartial() { - build.buf.validate.conformance.cases.FloatFinite result = new build.buf.validate.conformance.cases.FloatFinite(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatFinite result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatFinite) { - return mergeFrom((build.buf.validate.conformance.cases.FloatFinite)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatFinite other) { - if (other == build.buf.validate.conformance.cases.FloatFinite.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatFinite) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatFinite) - private static final build.buf.validate.conformance.cases.FloatFinite DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatFinite(); - } - - public static build.buf.validate.conformance.cases.FloatFinite getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatFinite 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.FloatFinite getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatFiniteOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatFiniteOrBuilder.java deleted file mode 100644 index bb919d08..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatFiniteOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatFiniteOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatFinite) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGT.java deleted file mode 100644 index 7ca2ff6e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatGT} - */ -public final class FloatGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatGT) - FloatGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatGT.class.getName()); - } - // Use FloatGT.newBuilder() to construct. - private FloatGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGT.class, build.buf.validate.conformance.cases.FloatGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatGT other = (build.buf.validate.conformance.cases.FloatGT) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGT 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.FloatGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGT 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.FloatGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGT 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.FloatGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatGT 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.FloatGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatGT 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.FloatGT 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.FloatGT 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.FloatGT 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.FloatGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatGT) - build.buf.validate.conformance.cases.FloatGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGT.class, build.buf.validate.conformance.cases.FloatGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGT build() { - build.buf.validate.conformance.cases.FloatGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGT buildPartial() { - build.buf.validate.conformance.cases.FloatGT result = new build.buf.validate.conformance.cases.FloatGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatGT) { - return mergeFrom((build.buf.validate.conformance.cases.FloatGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatGT other) { - if (other == build.buf.validate.conformance.cases.FloatGT.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatGT) - private static final build.buf.validate.conformance.cases.FloatGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatGT(); - } - - public static build.buf.validate.conformance.cases.FloatGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatGT 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.FloatGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTE.java deleted file mode 100644 index fb06f1e7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatGTE} - */ -public final class FloatGTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatGTE) - FloatGTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatGTE.class.getName()); - } - // Use FloatGTE.newBuilder() to construct. - private FloatGTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatGTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGTE.class, build.buf.validate.conformance.cases.FloatGTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatGTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatGTE other = (build.buf.validate.conformance.cases.FloatGTE) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatGTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTE 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.FloatGTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTE 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.FloatGTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTE 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.FloatGTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatGTE 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.FloatGTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatGTE 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.FloatGTE 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.FloatGTE 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.FloatGTE 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.FloatGTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatGTE) - build.buf.validate.conformance.cases.FloatGTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGTE.class, build.buf.validate.conformance.cases.FloatGTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatGTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatGTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTE build() { - build.buf.validate.conformance.cases.FloatGTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTE buildPartial() { - build.buf.validate.conformance.cases.FloatGTE result = new build.buf.validate.conformance.cases.FloatGTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatGTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatGTE) { - return mergeFrom((build.buf.validate.conformance.cases.FloatGTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatGTE other) { - if (other == build.buf.validate.conformance.cases.FloatGTE.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatGTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatGTE) - private static final build.buf.validate.conformance.cases.FloatGTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatGTE(); - } - - public static build.buf.validate.conformance.cases.FloatGTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatGTE 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.FloatGTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTE.java deleted file mode 100644 index 927a376e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatGTELTE} - */ -public final class FloatGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatGTELTE) - FloatGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatGTELTE.class.getName()); - } - // Use FloatGTELTE.newBuilder() to construct. - private FloatGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGTELTE.class, build.buf.validate.conformance.cases.FloatGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatGTELTE other = (build.buf.validate.conformance.cases.FloatGTELTE) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTELTE 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.FloatGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTELTE 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.FloatGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTELTE 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.FloatGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatGTELTE 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.FloatGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatGTELTE 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.FloatGTELTE 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.FloatGTELTE 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.FloatGTELTE 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.FloatGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatGTELTE) - build.buf.validate.conformance.cases.FloatGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGTELTE.class, build.buf.validate.conformance.cases.FloatGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTELTE build() { - build.buf.validate.conformance.cases.FloatGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTELTE buildPartial() { - build.buf.validate.conformance.cases.FloatGTELTE result = new build.buf.validate.conformance.cases.FloatGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.FloatGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatGTELTE other) { - if (other == build.buf.validate.conformance.cases.FloatGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatGTELTE) - private static final build.buf.validate.conformance.cases.FloatGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatGTELTE(); - } - - public static build.buf.validate.conformance.cases.FloatGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatGTELTE 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.FloatGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTEOrBuilder.java deleted file mode 100644 index 61484af5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTEOrBuilder.java deleted file mode 100644 index 7b0cf0a6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatGTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatGTE) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLT.java deleted file mode 100644 index 9392b21f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatGTLT} - */ -public final class FloatGTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatGTLT) - FloatGTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatGTLT.class.getName()); - } - // Use FloatGTLT.newBuilder() to construct. - private FloatGTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatGTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGTLT.class, build.buf.validate.conformance.cases.FloatGTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatGTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatGTLT other = (build.buf.validate.conformance.cases.FloatGTLT) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatGTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTLT 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.FloatGTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTLT 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.FloatGTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatGTLT 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.FloatGTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatGTLT 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.FloatGTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatGTLT 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.FloatGTLT 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.FloatGTLT 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.FloatGTLT 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.FloatGTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatGTLT) - build.buf.validate.conformance.cases.FloatGTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatGTLT.class, build.buf.validate.conformance.cases.FloatGTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatGTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatGTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatGTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTLT build() { - build.buf.validate.conformance.cases.FloatGTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatGTLT buildPartial() { - build.buf.validate.conformance.cases.FloatGTLT result = new build.buf.validate.conformance.cases.FloatGTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatGTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatGTLT) { - return mergeFrom((build.buf.validate.conformance.cases.FloatGTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatGTLT other) { - if (other == build.buf.validate.conformance.cases.FloatGTLT.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatGTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatGTLT) - private static final build.buf.validate.conformance.cases.FloatGTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatGTLT(); - } - - public static build.buf.validate.conformance.cases.FloatGTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatGTLT 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.FloatGTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLTOrBuilder.java deleted file mode 100644 index bc466412..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatGTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatGTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTOrBuilder.java deleted file mode 100644 index 587f334e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatGT) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnore.java deleted file mode 100644 index b337afc2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnore.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatIgnore} - */ -public final class FloatIgnore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatIgnore) - FloatIgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatIgnore.class.getName()); - } - // Use FloatIgnore.newBuilder() to construct. - private FloatIgnore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatIgnore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatIgnore.class, build.buf.validate.conformance.cases.FloatIgnore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatIgnore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatIgnore other = (build.buf.validate.conformance.cases.FloatIgnore) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatIgnore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIgnore 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.FloatIgnore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIgnore 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.FloatIgnore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIgnore 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.FloatIgnore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatIgnore 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.FloatIgnore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatIgnore 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.FloatIgnore 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.FloatIgnore 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.FloatIgnore 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.FloatIgnore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatIgnore) - build.buf.validate.conformance.cases.FloatIgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatIgnore.class, build.buf.validate.conformance.cases.FloatIgnore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatIgnore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIgnore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIgnore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatIgnore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIgnore build() { - build.buf.validate.conformance.cases.FloatIgnore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIgnore buildPartial() { - build.buf.validate.conformance.cases.FloatIgnore result = new build.buf.validate.conformance.cases.FloatIgnore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatIgnore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatIgnore) { - return mergeFrom((build.buf.validate.conformance.cases.FloatIgnore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatIgnore other) { - if (other == build.buf.validate.conformance.cases.FloatIgnore.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatIgnore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatIgnore) - private static final build.buf.validate.conformance.cases.FloatIgnore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatIgnore(); - } - - public static build.buf.validate.conformance.cases.FloatIgnore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatIgnore 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.FloatIgnore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnoreOrBuilder.java deleted file mode 100644 index 21d9b1be..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatIgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatIgnore) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIn.java deleted file mode 100644 index 4b17f2a1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIn.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatIn} - */ -public final class FloatIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatIn) - FloatInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatIn.class.getName()); - } - // Use FloatIn.newBuilder() to construct. - private FloatIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatIn.class, build.buf.validate.conformance.cases.FloatIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatIn other = (build.buf.validate.conformance.cases.FloatIn) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIn 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.FloatIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIn 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.FloatIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIn 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.FloatIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatIn 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.FloatIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatIn 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.FloatIn 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.FloatIn 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.FloatIn 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.FloatIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatIn) - build.buf.validate.conformance.cases.FloatInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatIn.class, build.buf.validate.conformance.cases.FloatIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIn build() { - build.buf.validate.conformance.cases.FloatIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIn buildPartial() { - build.buf.validate.conformance.cases.FloatIn result = new build.buf.validate.conformance.cases.FloatIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatIn) { - return mergeFrom((build.buf.validate.conformance.cases.FloatIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatIn other) { - if (other == build.buf.validate.conformance.cases.FloatIn.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatIn) - private static final build.buf.validate.conformance.cases.FloatIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatIn(); - } - - public static build.buf.validate.conformance.cases.FloatIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatIn 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.FloatIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatInOrBuilder.java deleted file mode 100644 index e9c90bb7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatIn) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectType.java deleted file mode 100644 index aa181300..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectType.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatIncorrectType} - */ -public final class FloatIncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatIncorrectType) - FloatIncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatIncorrectType.class.getName()); - } - // Use FloatIncorrectType.newBuilder() to construct. - private FloatIncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatIncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatIncorrectType.class, build.buf.validate.conformance.cases.FloatIncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatIncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatIncorrectType other = (build.buf.validate.conformance.cases.FloatIncorrectType) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatIncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIncorrectType 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.FloatIncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIncorrectType 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.FloatIncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatIncorrectType 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.FloatIncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatIncorrectType 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.FloatIncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatIncorrectType 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.FloatIncorrectType 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.FloatIncorrectType 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.FloatIncorrectType 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.FloatIncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatIncorrectType) - build.buf.validate.conformance.cases.FloatIncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatIncorrectType.class, build.buf.validate.conformance.cases.FloatIncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatIncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatIncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatIncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIncorrectType build() { - build.buf.validate.conformance.cases.FloatIncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatIncorrectType buildPartial() { - build.buf.validate.conformance.cases.FloatIncorrectType result = new build.buf.validate.conformance.cases.FloatIncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatIncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatIncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.FloatIncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatIncorrectType other) { - if (other == build.buf.validate.conformance.cases.FloatIncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatIncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatIncorrectType) - private static final build.buf.validate.conformance.cases.FloatIncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatIncorrectType(); - } - - public static build.buf.validate.conformance.cases.FloatIncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatIncorrectType 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.FloatIncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectTypeOrBuilder.java deleted file mode 100644 index 9a85a5f2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatIncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatIncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatIncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLT.java deleted file mode 100644 index 4de446df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLT.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatLT} - */ -public final class FloatLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatLT) - FloatLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatLT.class.getName()); - } - // Use FloatLT.newBuilder() to construct. - private FloatLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatLT.class, build.buf.validate.conformance.cases.FloatLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatLT other = (build.buf.validate.conformance.cases.FloatLT) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatLT 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.FloatLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatLT 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.FloatLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatLT 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.FloatLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatLT 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.FloatLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatLT 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.FloatLT 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.FloatLT 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.FloatLT 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.FloatLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatLT) - build.buf.validate.conformance.cases.FloatLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatLT.class, build.buf.validate.conformance.cases.FloatLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatLT build() { - build.buf.validate.conformance.cases.FloatLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatLT buildPartial() { - build.buf.validate.conformance.cases.FloatLT result = new build.buf.validate.conformance.cases.FloatLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatLT) { - return mergeFrom((build.buf.validate.conformance.cases.FloatLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatLT other) { - if (other == build.buf.validate.conformance.cases.FloatLT.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatLT) - private static final build.buf.validate.conformance.cases.FloatLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatLT(); - } - - public static build.buf.validate.conformance.cases.FloatLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatLT 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.FloatLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTE.java deleted file mode 100644 index 9003398b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTE.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatLTE} - */ -public final class FloatLTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatLTE) - FloatLTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatLTE.class.getName()); - } - // Use FloatLTE.newBuilder() to construct. - private FloatLTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatLTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatLTE.class, build.buf.validate.conformance.cases.FloatLTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatLTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatLTE other = (build.buf.validate.conformance.cases.FloatLTE) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatLTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatLTE 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.FloatLTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatLTE 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.FloatLTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatLTE 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.FloatLTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatLTE 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.FloatLTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatLTE 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.FloatLTE 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.FloatLTE 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.FloatLTE 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.FloatLTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatLTE) - build.buf.validate.conformance.cases.FloatLTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatLTE.class, build.buf.validate.conformance.cases.FloatLTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatLTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatLTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatLTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatLTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatLTE build() { - build.buf.validate.conformance.cases.FloatLTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatLTE buildPartial() { - build.buf.validate.conformance.cases.FloatLTE result = new build.buf.validate.conformance.cases.FloatLTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatLTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatLTE) { - return mergeFrom((build.buf.validate.conformance.cases.FloatLTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatLTE other) { - if (other == build.buf.validate.conformance.cases.FloatLTE.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatLTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatLTE) - private static final build.buf.validate.conformance.cases.FloatLTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatLTE(); - } - - public static build.buf.validate.conformance.cases.FloatLTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatLTE 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.FloatLTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTEOrBuilder.java deleted file mode 100644 index 09f7d9f5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatLTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatLTE) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTOrBuilder.java deleted file mode 100644 index ddbacac3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatLT) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNone.java deleted file mode 100644 index e050eac5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNone.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatNone} - */ -public final class FloatNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatNone) - FloatNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatNone.class.getName()); - } - // Use FloatNone.newBuilder() to construct. - private FloatNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatNone.class, build.buf.validate.conformance.cases.FloatNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatNone other = (build.buf.validate.conformance.cases.FloatNone) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNone 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.FloatNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNone 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.FloatNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNone 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.FloatNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatNone 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.FloatNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatNone 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.FloatNone 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.FloatNone 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.FloatNone 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.FloatNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatNone) - build.buf.validate.conformance.cases.FloatNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatNone.class, build.buf.validate.conformance.cases.FloatNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNone build() { - build.buf.validate.conformance.cases.FloatNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNone buildPartial() { - build.buf.validate.conformance.cases.FloatNone result = new build.buf.validate.conformance.cases.FloatNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatNone) { - return mergeFrom((build.buf.validate.conformance.cases.FloatNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatNone other) { - if (other == build.buf.validate.conformance.cases.FloatNone.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatNone) - private static final build.buf.validate.conformance.cases.FloatNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatNone(); - } - - public static build.buf.validate.conformance.cases.FloatNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatNone 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.FloatNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNoneOrBuilder.java deleted file mode 100644 index 9c359bbb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatNone) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val"]; - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFinite.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFinite.java deleted file mode 100644 index f9798c31..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFinite.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatNotFinite} - */ -public final class FloatNotFinite extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatNotFinite) - FloatNotFiniteOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatNotFinite.class.getName()); - } - // Use FloatNotFinite.newBuilder() to construct. - private FloatNotFinite(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatNotFinite() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatNotFinite.class, build.buf.validate.conformance.cases.FloatNotFinite.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatNotFinite)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatNotFinite other = (build.buf.validate.conformance.cases.FloatNotFinite) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatNotFinite parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNotFinite 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.FloatNotFinite parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNotFinite 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.FloatNotFinite parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNotFinite 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.FloatNotFinite parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatNotFinite 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.FloatNotFinite parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatNotFinite 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.FloatNotFinite 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.FloatNotFinite 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.FloatNotFinite 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.FloatNotFinite} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatNotFinite) - build.buf.validate.conformance.cases.FloatNotFiniteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotFinite_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotFinite_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatNotFinite.class, build.buf.validate.conformance.cases.FloatNotFinite.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatNotFinite.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotFinite_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNotFinite getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatNotFinite.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNotFinite build() { - build.buf.validate.conformance.cases.FloatNotFinite result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNotFinite buildPartial() { - build.buf.validate.conformance.cases.FloatNotFinite result = new build.buf.validate.conformance.cases.FloatNotFinite(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatNotFinite result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatNotFinite) { - return mergeFrom((build.buf.validate.conformance.cases.FloatNotFinite)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatNotFinite other) { - if (other == build.buf.validate.conformance.cases.FloatNotFinite.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatNotFinite) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatNotFinite) - private static final build.buf.validate.conformance.cases.FloatNotFinite DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatNotFinite(); - } - - public static build.buf.validate.conformance.cases.FloatNotFinite getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatNotFinite 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.FloatNotFinite getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFiniteOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFiniteOrBuilder.java deleted file mode 100644 index de01942f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotFiniteOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatNotFiniteOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatNotFinite) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotIn.java deleted file mode 100644 index 4fbf77da..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotIn.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.FloatNotIn} - */ -public final class FloatNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.FloatNotIn) - FloatNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatNotIn.class.getName()); - } - // Use FloatNotIn.newBuilder() to construct. - private FloatNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FloatNotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatNotIn.class, build.buf.validate.conformance.cases.FloatNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.FloatNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.FloatNotIn other = (build.buf.validate.conformance.cases.FloatNotIn) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.FloatNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNotIn 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.FloatNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNotIn 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.FloatNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.FloatNotIn 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.FloatNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.FloatNotIn 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.FloatNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.FloatNotIn 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.FloatNotIn 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.FloatNotIn 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.FloatNotIn 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.FloatNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.FloatNotIn) - build.buf.validate.conformance.cases.FloatNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.FloatNotIn.class, build.buf.validate.conformance.cases.FloatNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.FloatNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_FloatNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.FloatNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNotIn build() { - build.buf.validate.conformance.cases.FloatNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.FloatNotIn buildPartial() { - build.buf.validate.conformance.cases.FloatNotIn result = new build.buf.validate.conformance.cases.FloatNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.FloatNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.FloatNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.FloatNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.FloatNotIn other) { - if (other == build.buf.validate.conformance.cases.FloatNotIn.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.FloatNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.FloatNotIn) - private static final build.buf.validate.conformance.cases.FloatNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.FloatNotIn(); - } - - public static build.buf.validate.conformance.cases.FloatNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatNotIn 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.FloatNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotInOrBuilder.java deleted file mode 100644 index a2dae2f7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/FloatNotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface FloatNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.FloatNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMap.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMap.java deleted file mode 100644 index ea044abc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMap.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMap} - */ -public final class IgnoreEmptyEditionsMap extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMap) - IgnoreEmptyEditionsMapOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsMap.class.getName()); - } - // Use IgnoreEmptyEditionsMap.newBuilder() to construct. - private IgnoreEmptyEditionsMap(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsMap() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.IgnoreEmptyEditionsMap)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMap) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMapOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMap) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMap) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMap getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsMap 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.IgnoreEmptyEditionsMap getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMapOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMapOrBuilder.java deleted file mode 100644 index 1b15cc63..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMapOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsMapOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMap) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresence.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresence.java deleted file mode 100644 index 857d23ea..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresence.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence} - */ -public final class IgnoreEmptyEditionsMessageExplicitPresence extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence) - IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsMessageExplicitPresence.class.getName()); - } - // Use IgnoreEmptyEditionsMessageExplicitPresence.newBuilder() to construct. - private IgnoreEmptyEditionsMessageExplicitPresence(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsMessageExplicitPresence() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg) 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.IgnoreEmptyEditionsMessageExplicitPresence.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.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.IgnoreEmptyEditionsMessageExplicitPresence)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence) 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.IgnoreEmptyEditionsMessageExplicitPresence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.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.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.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 build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg 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; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsMessageExplicitPresence 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.IgnoreEmptyEditionsMessageExplicitPresence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimited.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimited.java deleted file mode 100644 index 242ca326..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimited.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited} - */ -public final class IgnoreEmptyEditionsMessageExplicitPresenceDelimited extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) - IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsMessageExplicitPresenceDelimited.class.getName()); - } - // Use IgnoreEmptyEditionsMessageExplicitPresenceDelimited.newBuilder() to construct. - private IgnoreEmptyEditionsMessageExplicitPresenceDelimited(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsMessageExplicitPresenceDelimited() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.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.writeGroup(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 - .computeGroupSize(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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.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.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsMessageExplicitPresenceDelimited 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.IgnoreEmptyEditionsMessageExplicitPresenceDelimited getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder.java deleted file mode 100644 index 8c89332b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsMessageExplicitPresenceDelimitedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg getVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresenceDelimited.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder.java deleted file mode 100644 index 2473359a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsMessageExplicitPresenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg getVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageExplicitPresence.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequired.java deleted file mode 100644 index f6b433bd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequired.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired} - */ -public final class IgnoreEmptyEditionsMessageLegacyRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired) - IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsMessageLegacyRequired.class.getName()); - } - // Use IgnoreEmptyEditionsMessageLegacyRequired.newBuilder() to construct. - private IgnoreEmptyEditionsMessageLegacyRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsMessageLegacyRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg) 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.IgnoreEmptyEditionsMessageLegacyRequired.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.IgnoreEmptyEditionsMessageLegacyRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired) 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.IgnoreEmptyEditionsMessageLegacyRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.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.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsMessageLegacyRequired 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.IgnoreEmptyEditionsMessageLegacyRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimited.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimited.java deleted file mode 100644 index a9554e9e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimited.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited} - */ -public final class IgnoreEmptyEditionsMessageLegacyRequiredDelimited extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) - IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsMessageLegacyRequiredDelimited.class.getName()); - } - // Use IgnoreEmptyEditionsMessageLegacyRequiredDelimited.newBuilder() to construct. - private IgnoreEmptyEditionsMessageLegacyRequiredDelimited(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsMessageLegacyRequiredDelimited() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeGroup(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 - .computeGroupSize(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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.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.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsMessageLegacyRequiredDelimited 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.IgnoreEmptyEditionsMessageLegacyRequiredDelimited getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder.java deleted file mode 100644 index abf4fe19..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsMessageLegacyRequiredDelimitedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg getVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequiredDelimited.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder.java deleted file mode 100644 index 55140949..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsMessageLegacyRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg getVal(); - /** - * .buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.IgnoreEmptyEditionsMessageLegacyRequired.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneof.java deleted file mode 100644 index 7607e209..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneof.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsOneof} - */ -public final class IgnoreEmptyEditionsOneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) - IgnoreEmptyEditionsOneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsOneof.class.getName()); - } - // Use IgnoreEmptyEditionsOneof.newBuilder() to construct. - private IgnoreEmptyEditionsOneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsOneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.IgnoreEmptyEditionsOneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsOneof 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.IgnoreEmptyEditionsOneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneofOrBuilder.java deleted file mode 100644 index f9b719dc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsOneofOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsOneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsOneof) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.IgnoreEmptyEditionsOneof.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeated.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeated.java deleted file mode 100644 index dd48ea76..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeated.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated} - */ -public final class IgnoreEmptyEditionsRepeated extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) - IgnoreEmptyEditionsRepeatedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsRepeated.class.getName()); - } - // Use IgnoreEmptyEditionsRepeated.newBuilder() to construct. - private IgnoreEmptyEditionsRepeated(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsRepeated() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.IgnoreEmptyEditionsRepeated)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) 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.IgnoreEmptyEditionsRepeated parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsRepeated 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.IgnoreEmptyEditionsRepeated getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpanded.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpanded.java deleted file mode 100644 index 80434d44..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpanded.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded} - */ -public final class IgnoreEmptyEditionsRepeatedExpanded extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) - IgnoreEmptyEditionsRepeatedExpandedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsRepeatedExpanded.class.getName()); - } - // Use IgnoreEmptyEditionsRepeatedExpanded.newBuilder() to construct. - private IgnoreEmptyEditionsRepeatedExpanded(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsRepeatedExpanded() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.IgnoreEmptyEditionsRepeatedExpanded)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) 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.IgnoreEmptyEditionsRepeatedExpanded parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpandedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsRepeatedExpanded 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.IgnoreEmptyEditionsRepeatedExpanded getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpandedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpandedOrBuilder.java deleted file mode 100644 index 2c5bde24..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedExpandedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsRepeatedExpandedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeatedExpanded) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedOrBuilder.java deleted file mode 100644 index 638a9474..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsRepeatedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsRepeatedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsRepeated) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresence.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresence.java deleted file mode 100644 index 96c626a0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresence.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence} - */ -public final class IgnoreEmptyEditionsScalarExplicitPresence extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence) - IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsScalarExplicitPresence.class.getName()); - } - // Use IgnoreEmptyEditionsScalarExplicitPresence.newBuilder() to construct. - private IgnoreEmptyEditionsScalarExplicitPresence(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsScalarExplicitPresence() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyEditionsScalarExplicitPresence)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsScalarExplicitPresence) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsScalarExplicitPresence 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.IgnoreEmptyEditionsScalarExplicitPresence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder.java deleted file mode 100644 index 66e5e593..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsScalarExplicitPresenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresence) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.java deleted file mode 100644 index bca109d5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault} - */ -public final class IgnoreEmptyEditionsScalarExplicitPresenceWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) - IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.class.getName()); - } - // Use IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.newBuilder() to construct. - private IgnoreEmptyEditionsScalarExplicitPresenceWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsScalarExplicitPresenceWithDefault() { - val_ = 42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 42; - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 42; - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsScalarExplicitPresenceWithDefault 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.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder.java deleted file mode 100644 index cb4b4489..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsScalarExplicitPresenceWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarExplicitPresenceWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresence.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresence.java deleted file mode 100644 index 62dc2169..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresence.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence} - */ -public final class IgnoreEmptyEditionsScalarImplicitPresence extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) - IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsScalarImplicitPresence.class.getName()); - } - // Use IgnoreEmptyEditionsScalarImplicitPresence.newBuilder() to construct. - private IgnoreEmptyEditionsScalarImplicitPresence(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsScalarImplicitPresence() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyEditionsScalarImplicitPresence)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsScalarImplicitPresence 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.IgnoreEmptyEditionsScalarImplicitPresence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder.java deleted file mode 100644 index 6efd2934..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsScalarImplicitPresenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarImplicitPresence) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequired.java deleted file mode 100644 index ec3046ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequired.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired} - */ -public final class IgnoreEmptyEditionsScalarLegacyRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired) - IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsScalarLegacyRequired.class.getName()); - } - // Use IgnoreEmptyEditionsScalarLegacyRequired.newBuilder() to construct. - private IgnoreEmptyEditionsScalarLegacyRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsScalarLegacyRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyEditionsScalarLegacyRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsScalarLegacyRequired) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsScalarLegacyRequired 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.IgnoreEmptyEditionsScalarLegacyRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder.java deleted file mode 100644 index d02602f4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsScalarLegacyRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.java deleted file mode 100644 index ade5aab2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault} - */ -public final class IgnoreEmptyEditionsScalarLegacyRequiredWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) - IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.class.getName()); - } - // Use IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.newBuilder() to construct. - private IgnoreEmptyEditionsScalarLegacyRequiredWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyEditionsScalarLegacyRequiredWithDefault() { - val_ = 42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 42; - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault other = (build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.class, build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProtoEditionsProto.internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault build() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault result = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 42; - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) - private static final build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyEditionsScalarLegacyRequiredWithDefault 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.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder.java deleted file mode 100644 index 75633b0e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyEditionsScalarLegacyRequiredWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyEditionsScalarLegacyRequiredWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = 42, json_name = "val", features = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairs.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairs.java deleted file mode 100644 index 394794fa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairs.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyMapPairs} - */ -public final class IgnoreEmptyMapPairs extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyMapPairs) - IgnoreEmptyMapPairsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyMapPairs.class.getName()); - } - // Use IgnoreEmptyMapPairs.newBuilder() to construct. - private IgnoreEmptyMapPairs(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyMapPairs() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.class, build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - java.lang.String key, - int defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.IgnoreEmptyMapPairs)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyMapPairs other = (build.buf.validate.conformance.cases.IgnoreEmptyMapPairs) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyMapPairs) - build.buf.validate.conformance.cases.IgnoreEmptyMapPairsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.class, build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyMapPairs getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyMapPairs build() { - build.buf.validate.conformance.cases.IgnoreEmptyMapPairs result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyMapPairs buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyMapPairs result = new build.buf.validate.conformance.cases.IgnoreEmptyMapPairs(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyMapPairs result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyMapPairs) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyMapPairs)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyMapPairs other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyMapPairs.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - java.lang.String key, - int defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - int value) { - if (key == null) { throw new NullPointerException("map key"); } - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyMapPairs) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyMapPairs) - private static final build.buf.validate.conformance.cases.IgnoreEmptyMapPairs DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyMapPairs(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyMapPairs getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyMapPairs 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.IgnoreEmptyMapPairs getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairsOrBuilder.java deleted file mode 100644 index a6de76bc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyMapPairsOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyMapPairsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyMapPairs) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - java.lang.String key, - int defaultValue); - /** - * map<string, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Map.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Map.java deleted file mode 100644 index 072a3d2c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Map.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2Map} - */ -public final class IgnoreEmptyProto2Map extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Map) - IgnoreEmptyProto2MapOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2Map.class.getName()); - } - // Use IgnoreEmptyProto2Map.newBuilder() to construct. - private IgnoreEmptyProto2Map(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2Map() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.IgnoreEmptyProto2Map)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2Map other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2Map) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Map) - build.buf.validate.conformance.cases.IgnoreEmptyProto2MapOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Map getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Map build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Map result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Map buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Map result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Map(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2Map result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto2Map) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2Map)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2Map other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2Map.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Map) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Map) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2Map DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Map(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Map getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2Map 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.IgnoreEmptyProto2Map getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MapOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MapOrBuilder.java deleted file mode 100644 index 8102d4ff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MapOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2MapOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2Map) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Message.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Message.java deleted file mode 100644 index 5eae8414..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Message.java +++ /dev/null @@ -1,1100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2Message} - */ -public final class IgnoreEmptyProto2Message extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Message) - IgnoreEmptyProto2MessageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2Message.class.getName()); - } - // Use IgnoreEmptyProto2Message.newBuilder() to construct. - private IgnoreEmptyProto2Message(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2Message() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.IgnoreEmptyProto2Message.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg) 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.IgnoreEmptyProto2Message.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg 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.IgnoreEmptyProto2Message.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg) - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyProto2Message.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.IgnoreEmptyProto2Message.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val_; - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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 .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.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.IgnoreEmptyProto2Message)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2Message) 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.IgnoreEmptyProto2Message parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Message) - build.buf.validate.conformance.cases.IgnoreEmptyProto2MessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.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.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Message(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2Message)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2Message other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.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 build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg 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 .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Message) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Message) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2Message DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Message(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Message getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2Message 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.IgnoreEmptyProto2Message getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MessageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MessageOrBuilder.java deleted file mode 100644 index 18ae8a62..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2MessageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2MessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2Message) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.IgnoreEmptyProto2Message.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Oneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Oneof.java deleted file mode 100644 index f72de243..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Oneof.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2Oneof} - */ -public final class IgnoreEmptyProto2Oneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) - IgnoreEmptyProto2OneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2Oneof.class.getName()); - } - // Use IgnoreEmptyProto2Oneof.newBuilder() to construct. - private IgnoreEmptyProto2Oneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2Oneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.IgnoreEmptyProto2Oneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) - build.buf.validate.conformance.cases.IgnoreEmptyProto2OneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2Oneof 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.IgnoreEmptyProto2Oneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2OneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2OneofOrBuilder.java deleted file mode 100644 index 406fd284..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2OneofOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2OneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2Oneof) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.IgnoreEmptyProto2Oneof.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Proto.java deleted file mode 100644 index 31e35f7b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Proto.java +++ /dev/null @@ -1,179 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class IgnoreEmptyProto2Proto { - private IgnoreEmptyProto2Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n8buf/validate/conformance/cases/ignore_" + - "empty_proto2.proto\022\036buf.validate.conform" + - "ance.cases\032\033buf/validate/validate.proto\"" + - "?\n\037IgnoreEmptyProto2ScalarOptional\022\034\n\003va" + - "l\030\001 \001(\005B\n\272H\007\032\002 \000\320\001\001R\003val\"N\n*IgnoreEmptyP" + - "roto2ScalarOptionalWithDefault\022 \n\003val\030\001 " + - "\001(\005:\00242B\n\272H\007\032\002 \000\320\001\001R\003val\"?\n\037IgnoreEmptyP" + - "roto2ScalarRequired\022\034\n\003val\030\001 \002(\005B\n\272H\007\032\002 " + - "\000\320\001\001R\003val\"\307\001\n\030IgnoreEmptyProto2Message\022\221" + - "\001\n\003val\030\001 \001(\0132<.buf.validate.conformance." + - "cases.IgnoreEmptyProto2Message.MsgBA\272H>\272" + - "\0018\n\033ignore_empty.proto2.message\022\006foobar\032" + - "\021this.val == \'foo\'\320\001\001R\003val\032\027\n\003Msg\022\020\n\003val" + - "\030\001 \001(\tR\003val\"=\n\026IgnoreEmptyProto2Oneof\022\036\n" + - "\003val\030\001 \001(\005B\n\272H\007\032\002 \000\320\001\001H\000R\003valB\003\n\001o\":\n\031Ig" + - "noreEmptyProto2Repeated\022\035\n\003val\030\001 \003(\005B\013\272H" + - "\010\222\001\002\010\003\320\001\001R\003val\"\254\001\n\024IgnoreEmptyProto2Map\022" + - "\\\n\003val\030\001 \003(\0132=.buf.validate.conformance." + - "cases.IgnoreEmptyProto2Map.ValEntryB\013\272H\010" + - "\232\001\002\010\003\320\001\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003" + - "key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001B\332\001\n$build." + - "buf.validate.conformance.casesB\026IgnoreEm" + - "ptyProto2ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.C" + - "onformance.Cases\312\002\036Buf\\Validate\\Conforma" + - "nce\\Cases\342\002*Buf\\Validate\\Conformance\\Cas" + - "es\\GPBMetadata\352\002!Buf::Validate::Conforma" + - "nce::Cases" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Message_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Oneof_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Map_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Repeated.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Repeated.java deleted file mode 100644 index 16d682fe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2Repeated.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2Repeated} - */ -public final class IgnoreEmptyProto2Repeated extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) - IgnoreEmptyProto2RepeatedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2Repeated.class.getName()); - } - // Use IgnoreEmptyProto2Repeated.newBuilder() to construct. - private IgnoreEmptyProto2Repeated(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2Repeated() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.IgnoreEmptyProto2Repeated)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) 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.IgnoreEmptyProto2Repeated parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) - build.buf.validate.conformance.cases.IgnoreEmptyProto2RepeatedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2Repeated_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2Repeated getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2Repeated 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.IgnoreEmptyProto2Repeated getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2RepeatedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2RepeatedOrBuilder.java deleted file mode 100644 index d762e6cd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2RepeatedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2RepeatedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2Repeated) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptional.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptional.java deleted file mode 100644 index 8f18d917..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptional.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional} - */ -public final class IgnoreEmptyProto2ScalarOptional extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional) - IgnoreEmptyProto2ScalarOptionalOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2ScalarOptional.class.getName()); - } - // Use IgnoreEmptyProto2ScalarOptional.newBuilder() to construct. - private IgnoreEmptyProto2ScalarOptional(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2ScalarOptional() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyProto2ScalarOptional)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional) - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptional_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyProto2ScalarOptional) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2ScalarOptional 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.IgnoreEmptyProto2ScalarOptional getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalOrBuilder.java deleted file mode 100644 index ef9cae9d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2ScalarOptionalOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptional) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefault.java deleted file mode 100644 index 95143afd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault} - */ -public final class IgnoreEmptyProto2ScalarOptionalWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault) - IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2ScalarOptionalWithDefault.class.getName()); - } - // Use IgnoreEmptyProto2ScalarOptionalWithDefault.newBuilder() to construct. - private IgnoreEmptyProto2ScalarOptionalWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2ScalarOptionalWithDefault() { - val_ = 42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 42; - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyProto2ScalarOptionalWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault) - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarOptionalWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyProto2ScalarOptionalWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 42; - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2ScalarOptionalWithDefault 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.IgnoreEmptyProto2ScalarOptionalWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder.java deleted file mode 100644 index 9a2cf51d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2ScalarOptionalWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarOptionalWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [default = 42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequired.java deleted file mode 100644 index 71037f35..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequired.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired} - */ -public final class IgnoreEmptyProto2ScalarRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired) - IgnoreEmptyProto2ScalarRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto2ScalarRequired.class.getName()); - } - // Use IgnoreEmptyProto2ScalarRequired.newBuilder() to construct. - private IgnoreEmptyProto2ScalarRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto2ScalarRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyProto2ScalarRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired other = (build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired) - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.class, build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto2ScalarRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired result = new build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyProto2ScalarRequired) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto2ScalarRequired 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.IgnoreEmptyProto2ScalarRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequiredOrBuilder.java deleted file mode 100644 index 17bd56c4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto2ScalarRequiredOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto2ScalarRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto2ScalarRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Map.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Map.java deleted file mode 100644 index ffceb160..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Map.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3Map} - */ -public final class IgnoreEmptyProto3Map extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Map) - IgnoreEmptyProto3MapOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3Map.class.getName()); - } - // Use IgnoreEmptyProto3Map.newBuilder() to construct. - private IgnoreEmptyProto3Map(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto3Map() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.IgnoreEmptyProto3Map)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3Map other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3Map) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Map) - build.buf.validate.conformance.cases.IgnoreEmptyProto3MapOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Map getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Map build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Map result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Map buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Map result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Map(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3Map result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto3Map) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3Map)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3Map other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3Map.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Map) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Map) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3Map DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Map(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Map getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto3Map 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.IgnoreEmptyProto3Map getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MapOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MapOrBuilder.java deleted file mode 100644 index 45125411..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MapOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto3MapOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3Map) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Message.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Message.java deleted file mode 100644 index 67fed6de..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Message.java +++ /dev/null @@ -1,1068 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3Message} - */ -public final class IgnoreEmptyProto3Message extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Message) - IgnoreEmptyProto3MessageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3Message.class.getName()); - } - // Use IgnoreEmptyProto3Message.newBuilder() to construct. - private IgnoreEmptyProto3Message(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto3Message() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.IgnoreEmptyProto3Message.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) obj; - - 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(); - 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.IgnoreEmptyProto3Message.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg 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.IgnoreEmptyProto3Message.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.IgnoreEmptyProto3Message.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val_; - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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 .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.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.IgnoreEmptyProto3Message)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3Message) 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.IgnoreEmptyProto3Message parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Message) - build.buf.validate.conformance.cases.IgnoreEmptyProto3MessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.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.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Message(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3Message)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3Message other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.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 build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg 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 .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg.Builder, build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Message) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Message) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3Message DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Message(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Message getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto3Message 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.IgnoreEmptyProto3Message getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MessageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MessageOrBuilder.java deleted file mode 100644 index d8071179..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3MessageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto3MessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3Message) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.IgnoreEmptyProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.IgnoreEmptyProto3Message.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Oneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Oneof.java deleted file mode 100644 index 8ef99ab9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Oneof.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3Oneof} - */ -public final class IgnoreEmptyProto3Oneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) - IgnoreEmptyProto3OneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3Oneof.class.getName()); - } - // Use IgnoreEmptyProto3Oneof.newBuilder() to construct. - private IgnoreEmptyProto3Oneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto3Oneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.IgnoreEmptyProto3Oneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) - build.buf.validate.conformance.cases.IgnoreEmptyProto3OneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto3Oneof 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.IgnoreEmptyProto3Oneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OneofOrBuilder.java deleted file mode 100644 index 3c5ba962..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OneofOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto3OneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3Oneof) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.IgnoreEmptyProto3Oneof.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalar.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalar.java deleted file mode 100644 index 2975317a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalar.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar} - */ -public final class IgnoreEmptyProto3OptionalScalar extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar) - IgnoreEmptyProto3OptionalScalarOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3OptionalScalar.class.getName()); - } - // Use IgnoreEmptyProto3OptionalScalar.newBuilder() to construct. - private IgnoreEmptyProto3OptionalScalar(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto3OptionalScalar() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyProto3OptionalScalar)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar) - build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalarOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.IgnoreEmptyProto3OptionalScalar) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto3OptionalScalar 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.IgnoreEmptyProto3OptionalScalar getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalarOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalarOrBuilder.java deleted file mode 100644 index f922e94a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3OptionalScalarOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto3OptionalScalarOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3OptionalScalar) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Proto.java deleted file mode 100644 index 32655719..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Proto.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class IgnoreEmptyProto3Proto { - private IgnoreEmptyProto3Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n8buf/validate/conformance/cases/ignore_" + - "empty_proto3.proto\022\036buf.validate.conform" + - "ance.cases\032\033buf/validate/validate.proto\"" + - "7\n\027IgnoreEmptyProto3Scalar\022\034\n\003val\030\001 \001(\005B" + - "\n\272H\007\032\002 \000\320\001\001R\003val\"L\n\037IgnoreEmptyProto3Opt" + - "ionalScalar\022!\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\320\001\001H\000R\003" + - "val\210\001\001B\006\n\004_val\"\324\001\n\030IgnoreEmptyProto3Mess" + - "age\022\226\001\n\003val\030\001 \001(\0132<.buf.validate.conform" + - "ance.cases.IgnoreEmptyProto3Message.MsgB" + - "A\272H>\272\0018\n\033ignore_empty.proto3.message\022\006fo" + - "obar\032\021this.val == \'foo\'\320\001\001H\000R\003val\210\001\001\032\027\n\003" + - "Msg\022\020\n\003val\030\001 \001(\tR\003valB\006\n\004_val\"=\n\026IgnoreE" + - "mptyProto3Oneof\022\036\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\320\001\001" + - "H\000R\003valB\003\n\001o\":\n\031IgnoreEmptyProto3Repeate" + - "d\022\035\n\003val\030\001 \003(\005B\013\272H\010\222\001\002\010\003\320\001\001R\003val\"\254\001\n\024Ign" + - "oreEmptyProto3Map\022\\\n\003val\030\001 \003(\0132=.buf.val" + - "idate.conformance.cases.IgnoreEmptyProto" + - "3Map.ValEntryB\013\272H\010\232\001\002\010\003\320\001\001R\003val\0326\n\010ValEn" + - "try\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005va" + - "lue:\0028\001\"=\n\030IgnoreEmptyRepeatedItems\022!\n\003v" + - "al\030\001 \003(\005B\017\272H\014\222\001\t\"\007\032\002 \000\320\001\001R\003val\"\267\001\n\023Ignor" + - "eEmptyMapPairs\022h\n\003val\030\001 \003(\0132<.buf.valida" + - "te.conformance.cases.IgnoreEmptyMapPairs" + - ".ValEntryB\030\272H\025\232\001\022\"\007r\002\020\003\320\001\001*\007\032\002 \000\320\001\001R\003val" + - "\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030" + - "\002 \001(\005R\005value:\0028\001B\332\001\n$build.buf.validate." + - "conformance.casesB\026IgnoreEmptyProto3Prot" + - "oP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Ca" + - "ses\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*B" + - "uf\\Validate\\Conformance\\Cases\\GPBMetadat" + - "a\352\002!Buf::Validate::Conformance::Casesb\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3OptionalScalar_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Message_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Oneof_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Map_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyMapPairs_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Repeated.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Repeated.java deleted file mode 100644 index 908df551..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Repeated.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3Repeated} - */ -public final class IgnoreEmptyProto3Repeated extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) - IgnoreEmptyProto3RepeatedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3Repeated.class.getName()); - } - // Use IgnoreEmptyProto3Repeated.newBuilder() to construct. - private IgnoreEmptyProto3Repeated(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto3Repeated() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.IgnoreEmptyProto3Repeated)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) 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.IgnoreEmptyProto3Repeated parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) - build.buf.validate.conformance.cases.IgnoreEmptyProto3RepeatedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Repeated_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Repeated getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto3Repeated 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.IgnoreEmptyProto3Repeated getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3RepeatedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3RepeatedOrBuilder.java deleted file mode 100644 index 78b7d29a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3RepeatedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto3RepeatedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3Repeated) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Scalar.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Scalar.java deleted file mode 100644 index d55eec3d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3Scalar.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyProto3Scalar} - */ -public final class IgnoreEmptyProto3Scalar extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) - IgnoreEmptyProto3ScalarOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProto3Scalar.class.getName()); - } - // Use IgnoreEmptyProto3Scalar.newBuilder() to construct. - private IgnoreEmptyProto3Scalar(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyProto3Scalar() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.IgnoreEmptyProto3Scalar)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar other = (build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) - build.buf.validate.conformance.cases.IgnoreEmptyProto3ScalarOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.class, build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyProto3Scalar_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar build() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar result = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) - private static final build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyProto3Scalar getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyProto3Scalar 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.IgnoreEmptyProto3Scalar getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3ScalarOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3ScalarOrBuilder.java deleted file mode 100644 index 0c4765fa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProto3ScalarOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyProto3ScalarOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyProto3Scalar) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProtoEditionsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProtoEditionsProto.java deleted file mode 100644 index c6e0aee2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyProtoEditionsProto.java +++ /dev/null @@ -1,306 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class IgnoreEmptyProtoEditionsProto { - private IgnoreEmptyProtoEditionsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyProtoEditionsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n@buf/validate/conformance/cases/ignore_" + - "empty_proto_editions.proto\022\036buf.validate" + - ".conformance.cases\032\033buf/validate/validat" + - "e.proto\"I\n)IgnoreEmptyEditionsScalarExpl" + - "icitPresence\022\034\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\320\001\001R\003v" + - "al\"X\n4IgnoreEmptyEditionsScalarExplicitP" + - "resenceWithDefault\022 \n\003val\030\001 \001(\005:\00242B\n\272H\007" + - "\032\002 \000\320\001\001R\003val\"N\n)IgnoreEmptyEditionsScala" + - "rImplicitPresence\022!\n\003val\030\001 \001(\005B\017\252\001\002\010\002\272H\007" + - "\032\002 \000\320\001\001R\003val\"L\n\'IgnoreEmptyEditionsScala" + - "rLegacyRequired\022!\n\003val\030\001 \001(\005B\017\252\001\002\010\003\272H\007\032\002" + - " \000\320\001\001R\003val\"[\n2IgnoreEmptyEditionsScalarL" + - "egacyRequiredWithDefault\022%\n\003val\030\001 \001(\005:\0024" + - "2B\017\252\001\002\010\003\272H\007\032\002 \000\320\001\001R\003val\"\355\001\n*IgnoreEmptyE" + - "ditionsMessageExplicitPresence\022\245\001\n\003val\030\001" + - " \001(\0132N.buf.validate.conformance.cases.Ig" + - "noreEmptyEditionsMessageExplicitPresence" + - ".MsgBC\272H@\272\001:\n\035ignore_empty.editions.mess" + - "age\022\006foobar\032\021this.val == \'foo\'\320\001\001R\003val\032\027" + - "\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\204\002\n3IgnoreEmptyE" + - "ditionsMessageExplicitPresenceDelimited\022" + - "\263\001\n\003val\030\001 \001(\0132W.buf.validate.conformance" + - ".cases.IgnoreEmptyEditionsMessageExplici" + - "tPresenceDelimited.MsgBH\252\001\002(\002\272H@\272\001:\n\035ign" + - "ore_empty.editions.message\022\006foobar\032\021this" + - ".val == \'foo\'\320\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(" + - "\tR\003val\"\356\001\n(IgnoreEmptyEditionsMessageLeg" + - "acyRequired\022\250\001\n\003val\030\001 \001(\0132L.buf.validate" + - ".conformance.cases.IgnoreEmptyEditionsMe" + - "ssageLegacyRequired.MsgBH\252\001\002\010\003\272H@\272\001:\n\035ig" + - "nore_empty.editions.message\022\006foobar\032\021thi" + - "s.val == \'foo\'\320\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001" + - "(\tR\003val\"\202\002\n1IgnoreEmptyEditionsMessageLe" + - "gacyRequiredDelimited\022\263\001\n\003val\030\001 \001(\0132U.bu" + - "f.validate.conformance.cases.IgnoreEmpty" + - "EditionsMessageLegacyRequiredDelimited.M" + - "sgBJ\252\001\004\010\003(\002\272H@\272\001:\n\035ignore_empty.editions" + - ".message\022\006foobar\032\021this.val == \'foo\'\320\001\001R\003" + - "val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"?\n\030IgnoreEm" + - "ptyEditionsOneof\022\036\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\320\001" + - "\001H\000R\003valB\003\n\001o\"<\n\033IgnoreEmptyEditionsRepe" + - "ated\022\035\n\003val\030\001 \003(\005B\013\272H\010\222\001\002\010\003\320\001\001R\003val\"I\n#I" + - "gnoreEmptyEditionsRepeatedExpanded\022\"\n\003va" + - "l\030\001 \003(\005B\020\252\001\002\030\002\272H\010\222\001\002\010\003\320\001\001R\003val\"\260\001\n\026Ignor" + - "eEmptyEditionsMap\022^\n\003val\030\001 \003(\0132?.buf.val" + - "idate.conformance.cases.IgnoreEmptyEditi" + - "onsMap.ValEntryB\013\272H\010\232\001\002\010\003\320\001\001R\003val\0326\n\010Val" + - "Entry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005" + - "value:\0028\001B\341\001\n$build.buf.validate.conform" + - "ance.casesB\035IgnoreEmptyProtoEditionsProt" + - "oP\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Ca" + - "ses\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*B" + - "uf\\Validate\\Conformance\\Cases\\GPBMetadat" + - "a\352\002!Buf::Validate::Conformance::Casesb\010e" + - "ditionsp\350\007" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresence_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarExplicitPresenceWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarImplicitPresence_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsScalarLegacyRequiredWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresence_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageExplicitPresenceDelimited_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequired_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMessageLegacyRequiredDelimited_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsOneof_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeated_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsRepeatedExpanded_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_IgnoreEmptyEditionsMap_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItems.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItems.java deleted file mode 100644 index 8cac51ad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItems.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.IgnoreEmptyRepeatedItems} - */ -public final class IgnoreEmptyRepeatedItems extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) - IgnoreEmptyRepeatedItemsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreEmptyRepeatedItems.class.getName()); - } - // Use IgnoreEmptyRepeatedItems.newBuilder() to construct. - private IgnoreEmptyRepeatedItems(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IgnoreEmptyRepeatedItems() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.class, build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.IgnoreEmptyRepeatedItems)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems other = (build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) 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.IgnoreEmptyRepeatedItems parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) - build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItemsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.class, build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyProto3Proto.internal_static_buf_validate_conformance_cases_IgnoreEmptyRepeatedItems_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems build() { - build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems buildPartial() { - build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems result = new build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) { - return mergeFrom((build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems other) { - if (other == build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) - private static final build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems(); - } - - public static build.buf.validate.conformance.cases.IgnoreEmptyRepeatedItems getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IgnoreEmptyRepeatedItems 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.IgnoreEmptyRepeatedItems getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItemsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItemsOrBuilder.java deleted file mode 100644 index 2668bcd3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreEmptyRepeatedItemsOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_empty_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface IgnoreEmptyRepeatedItemsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.IgnoreEmptyRepeatedItems) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto2Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto2Proto.java deleted file mode 100644 index 5e0f7621..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto2Proto.java +++ /dev/null @@ -1,774 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class IgnoreProto2Proto { - private IgnoreProto2Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreProto2Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n2buf/validate/conformance/cases/ignore_" + - "proto2.proto\022\036buf.validate.conformance.c" + - "ases\032\033buf/validate/validate.proto\"B\n%Pro" + - "to2ScalarOptionalIgnoreUnspecified\022\031\n\003va" + - "l\030\001 \001(\005B\007\272H\004\032\002 \000R\003val\"R\n0Proto2ScalarOpt" + - "ionalIgnoreUnspecifiedWithDefault\022\036\n\003val" + - "\030\001 \001(\005:\003-42B\007\272H\004\032\002 \000R\003val\"?\n\037Proto2Scala" + - "rOptionalIgnoreEmpty\022\034\n\003val\030\001 \001(\005B\n\272H\007\032\002" + - " \000\330\001\001R\003val\"O\n*Proto2ScalarOptionalIgnore" + - "EmptyWithDefault\022!\n\003val\030\001 \001(\005:\003-42B\n\272H\007\032" + - "\002 \000\330\001\001R\003val\"A\n!Proto2ScalarOptionalIgnor" + - "eDefault\022\034\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\330\001\002R\003val\"Q" + - "\n,Proto2ScalarOptionalIgnoreDefaultWithD" + - "efault\022!\n\003val\030\001 \001(\005:\003-42B\n\272H\007\032\002 \000\330\001\002R\003va" + - "l\"B\n%Proto2ScalarRequiredIgnoreUnspecifi" + - "ed\022\031\n\003val\030\001 \002(\005B\007\272H\004\032\002 \000R\003val\"R\n0Proto2S" + - "calarRequiredIgnoreUnspecifiedWithDefaul" + - "t\022\036\n\003val\030\001 \002(\005:\003-42B\007\272H\004\032\002 \000R\003val\"?\n\037Pro" + - "to2ScalarRequiredIgnoreEmpty\022\034\n\003val\030\001 \002(" + - "\005B\n\272H\007\032\002 \000\330\001\001R\003val\"O\n*Proto2ScalarRequir" + - "edIgnoreEmptyWithDefault\022!\n\003val\030\001 \002(\005:\003-" + - "42B\n\272H\007\032\002 \000\330\001\001R\003val\"A\n!Proto2ScalarRequi" + - "redIgnoreDefault\022\034\n\003val\030\001 \002(\005B\n\272H\007\032\002 \000\330\001" + - "\002R\003val\"Q\n,Proto2ScalarRequiredIgnoreDefa" + - "ultWithDefault\022!\n\003val\030\001 \002(\005:\003-42B\n\272H\007\032\002 " + - "\000\330\001\002R\003val\"\340\001\n&Proto2MessageOptionalIgnor" + - "eUnspecified\022\234\001\n\003val\030\001 \001(\0132J.buf.validat" + - "e.conformance.cases.Proto2MessageOptiona" + - "lIgnoreUnspecified.MsgB>\272H;\272\0018\n\033proto2.m" + - "essage.ignore.empty\022\006foobar\032\021this.val ==" + - " \'foo\'R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\327\001\n" + - " Proto2MessageOptionalIgnoreEmpty\022\231\001\n\003va" + - "l\030\001 \001(\0132D.buf.validate.conformance.cases" + - ".Proto2MessageOptionalIgnoreEmpty.MsgBA\272" + - "H>\272\0018\n\033proto2.message.ignore.empty\022\006foob" + - "ar\032\021this.val == \'foo\'\330\001\001R\003val\032\027\n\003Msg\022\020\n\003" + - "val\030\001 \001(\tR\003val\"\333\001\n\"Proto2MessageOptional" + - "IgnoreDefault\022\233\001\n\003val\030\001 \001(\0132F.buf.valida" + - "te.conformance.cases.Proto2MessageOption" + - "alIgnoreDefault.MsgBA\272H>\272\0018\n\033proto2.mess" + - "age.ignore.empty\022\006foobar\032\021this.val == \'f" + - "oo\'\330\001\002R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\340\001\n" + - "&Proto2MessageRequiredIgnoreUnspecified\022" + - "\234\001\n\003val\030\001 \002(\0132J.buf.validate.conformance" + - ".cases.Proto2MessageRequiredIgnoreUnspec" + - "ified.MsgB>\272H;\272\0018\n\033proto2.message.ignore" + - ".empty\022\006foobar\032\021this.val == \'foo\'R\003val\032\027" + - "\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\327\001\n Proto2Messag" + - "eRequiredIgnoreEmpty\022\231\001\n\003val\030\001 \002(\0132D.buf" + - ".validate.conformance.cases.Proto2Messag" + - "eRequiredIgnoreEmpty.MsgBA\272H>\272\0018\n\033proto2" + - ".message.ignore.empty\022\006foobar\032\021this.val " + - "== \'foo\'\330\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003va" + - "l\"\333\001\n\"Proto2MessageRequiredIgnoreDefault" + - "\022\233\001\n\003val\030\001 \002(\0132F.buf.validate.conformanc" + - "e.cases.Proto2MessageRequiredIgnoreDefau" + - "lt.MsgBA\272H>\272\0018\n\033proto2.message.ignore.em" + - "pty\022\006foobar\032\021this.val == \'foo\'\330\001\002R\003val\032\027" + - "\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"@\n\034Proto2OneofIg" + - "noreUnspecified\022\033\n\003val\030\001 \001(\005B\007\272H\004\032\002 \000H\000R" + - "\003valB\003\n\001o\"P\n\'Proto2OneofIgnoreUnspecifie" + - "dWithDefault\022 \n\003val\030\001 \001(\005:\003-42B\007\272H\004\032\002 \000H" + - "\000R\003valB\003\n\001o\"=\n\026Proto2OneofIgnoreEmpty\022\036\n" + - "\003val\030\001 \001(\005B\n\272H\007\032\002 \000\330\001\001H\000R\003valB\003\n\001o\"M\n!Pr" + - "oto2OneofIgnoreEmptyWithDefault\022#\n\003val\030\001" + - " \001(\005:\003-42B\n\272H\007\032\002 \000\330\001\001H\000R\003valB\003\n\001o\"?\n\030Pro" + - "to2OneofIgnoreDefault\022\036\n\003val\030\001 \001(\005B\n\272H\007\032" + - "\002 \000\330\001\002H\000R\003valB\003\n\001o\"O\n#Proto2OneofIgnoreD" + - "efaultWithDefault\022#\n\003val\030\001 \001(\005:\003-42B\n\272H\007" + - "\032\002 \000\330\001\002H\000R\003valB\003\n\001o\"=\n\037Proto2RepeatedIgn" + - "oreUnspecified\022\032\n\003val\030\001 \003(\005B\010\272H\005\222\001\002\010\003R\003v" + - "al\":\n\031Proto2RepeatedIgnoreEmpty\022\035\n\003val\030\001" + - " \003(\005B\013\272H\010\222\001\002\010\003\330\001\001R\003val\"<\n\033Proto2Repeated" + - "IgnoreDefault\022\035\n\003val\030\001 \003(\005B\013\272H\010\222\001\002\010\003\330\001\002R" + - "\003val\"\265\001\n\032Proto2MapIgnoreUnspecified\022_\n\003v" + - "al\030\001 \003(\0132C.buf.validate.conformance.case" + - "s.Proto2MapIgnoreUnspecified.ValEntryB\010\272" + - "H\005\232\001\002\010\003R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003k" + - "ey\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\254\001\n\024Proto2M" + - "apIgnoreEmpty\022\\\n\003val\030\001 \003(\0132=.buf.validat" + - "e.conformance.cases.Proto2MapIgnoreEmpty" + - ".ValEntryB\013\272H\010\232\001\002\010\003\330\001\001R\003val\0326\n\010ValEntry\022" + - "\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:" + - "\0028\001\"\260\001\n\026Proto2MapIgnoreDefault\022^\n\003val\030\001 " + - "\003(\0132?.buf.validate.conformance.cases.Pro" + - "to2MapIgnoreDefault.ValEntryB\013\272H\010\232\001\002\010\003\330\001" + - "\002R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005" + - "value\030\002 \001(\005R\005value:\0028\001\"E\n#Proto2Repeated" + - "ItemIgnoreUnspecified\022\036\n\003val\030\001 \003(\005B\014\272H\t\222" + - "\001\006\"\004\032\002 \000R\003val\"B\n\035Proto2RepeatedItemIgnor" + - "eEmpty\022!\n\003val\030\001 \003(\005B\017\272H\014\222\001\t\"\007\032\002 \000\330\001\001R\003va" + - "l\"D\n\037Proto2RepeatedItemIgnoreDefault\022!\n\003" + - "val\030\001 \003(\005B\017\272H\014\222\001\t\"\007\032\002 \000\330\001\002R\003val\"\277\001\n\035Prot" + - "o2MapKeyIgnoreUnspecified\022f\n\003val\030\001 \003(\0132F" + - ".buf.validate.conformance.cases.Proto2Ma" + - "pKeyIgnoreUnspecified.ValEntryB\014\272H\t\232\001\006\"\004" + - "\032\002 \000R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022" + - "\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\266\001\n\027Proto2MapK" + - "eyIgnoreEmpty\022c\n\003val\030\001 \003(\0132@.buf.validat" + - "e.conformance.cases.Proto2MapKeyIgnoreEm" + - "pty.ValEntryB\017\272H\014\232\001\t\"\007\032\002 \000\330\001\001R\003val\0326\n\010Va" + - "lEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R" + - "\005value:\0028\001\"\272\001\n\031Proto2MapKeyIgnoreDefault" + - "\022e\n\003val\030\001 \003(\0132B.buf.validate.conformance" + - ".cases.Proto2MapKeyIgnoreDefault.ValEntr" + - "yB\017\272H\014\232\001\t\"\007\032\002 \000\330\001\002R\003val\0326\n\010ValEntry\022\020\n\003k" + - "ey\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"" + - "\303\001\n\037Proto2MapValueIgnoreUnspecified\022h\n\003v" + - "al\030\001 \003(\0132H.buf.validate.conformance.case" + - "s.Proto2MapValueIgnoreUnspecified.ValEnt" + - "ryB\014\272H\t\232\001\006*\004\032\002 \000R\003val\0326\n\010ValEntry\022\020\n\003key" + - "\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\272\001" + - "\n\031Proto2MapValueIgnoreEmpty\022e\n\003val\030\001 \003(\013" + - "2B.buf.validate.conformance.cases.Proto2" + - "MapValueIgnoreEmpty.ValEntryB\017\272H\014\232\001\t*\007\032\002" + - " \000\330\001\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key" + - "\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\276\001\n\033Proto2Map" + - "ValueIgnoreDefault\022g\n\003val\030\001 \003(\0132D.buf.va" + - "lidate.conformance.cases.Proto2MapValueI" + - "gnoreDefault.ValEntryB\017\272H\014\232\001\t*\007\032\002 \000\330\001\002R\003" + - "val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005val" + - "ue\030\002 \001(\005R\005value:\0028\001B\325\001\n$build.buf.valida" + - "te.conformance.casesB\021IgnoreProto2ProtoP" + - "\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::Cases" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto3Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto3Proto.java deleted file mode 100644 index 571bd30d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProto3Proto.java +++ /dev/null @@ -1,659 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class IgnoreProto3Proto { - private IgnoreProto3Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreProto3Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n2buf/validate/conformance/cases/ignore_" + - "proto3.proto\022\036buf.validate.conformance.c" + - "ases\032\033buf/validate/validate.proto\"O\n%Pro" + - "to3ScalarOptionalIgnoreUnspecified\022\036\n\003va" + - "l\030\001 \001(\005B\007\272H\004\032\002 \000H\000R\003val\210\001\001B\006\n\004_val\"L\n\037Pr" + - "oto3ScalarOptionalIgnoreEmpty\022!\n\003val\030\001 \001" + - "(\005B\n\272H\007\032\002 \000\330\001\001H\000R\003val\210\001\001B\006\n\004_val\"N\n!Prot" + - "o3ScalarOptionalIgnoreDefault\022!\n\003val\030\001 \001" + - "(\005B\n\272H\007\032\002 \000\330\001\002H\000R\003val\210\001\001B\006\n\004_val\":\n\035Prot" + - "o3ScalarIgnoreUnspecified\022\031\n\003val\030\001 \001(\005B\007" + - "\272H\004\032\002 \000R\003val\"7\n\027Proto3ScalarIgnoreEmpty\022" + - "\034\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\330\001\001R\003val\"9\n\031Proto3S" + - "calarIgnoreDefault\022\034\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000" + - "\330\001\002R\003val\"\372\001\n&Proto3MessageOptionalIgnore" + - "Unspecified\022\241\001\n\003val\030\001 \001(\0132J.buf.validate" + - ".conformance.cases.Proto3MessageOptional" + - "IgnoreUnspecified.MsgB>\272H;\272\0018\n\033proto3.me" + - "ssage.ignore.empty\022\006foobar\032\021this.val == " + - "\'foo\'H\000R\003val\210\001\001\032$\n\003Msg\022\025\n\003val\030\001 \001(\tH\000R\003v" + - "al\210\001\001B\006\n\004_valB\006\n\004_val\"\361\001\n Proto3MessageO" + - "ptionalIgnoreEmpty\022\236\001\n\003val\030\001 \001(\0132D.buf.v" + - "alidate.conformance.cases.Proto3MessageO" + - "ptionalIgnoreEmpty.MsgBA\272H>\272\0018\n\033proto3.m" + - "essage.ignore.empty\022\006foobar\032\021this.val ==" + - " \'foo\'\330\001\001H\000R\003val\210\001\001\032$\n\003Msg\022\025\n\003val\030\001 \001(\tH" + - "\000R\003val\210\001\001B\006\n\004_valB\006\n\004_val\"\365\001\n\"Proto3Mess" + - "ageOptionalIgnoreDefault\022\240\001\n\003val\030\001 \001(\0132F" + - ".buf.validate.conformance.cases.Proto3Me" + - "ssageOptionalIgnoreDefault.MsgBA\272H>\272\0018\n\033" + - "proto3.message.ignore.empty\022\006foobar\032\021thi" + - "s.val == \'foo\'\330\001\002H\000R\003val\210\001\001\032$\n\003Msg\022\025\n\003va" + - "l\030\001 \001(\tH\000R\003val\210\001\001B\006\n\004_valB\006\n\004_val\"\335\001\n\036Pr" + - "oto3MessageIgnoreUnspecified\022\224\001\n\003val\030\001 \001" + - "(\0132B.buf.validate.conformance.cases.Prot" + - "o3MessageIgnoreUnspecified.MsgB>\272H;\272\0018\n\033" + - "proto3.message.ignore.empty\022\006foobar\032\021thi" + - "s.val == \'foo\'R\003val\032$\n\003Msg\022\025\n\003val\030\001 \001(\tH" + - "\000R\003val\210\001\001B\006\n\004_val\"\324\001\n\030Proto3MessageIgnor" + - "eEmpty\022\221\001\n\003val\030\001 \001(\0132<.buf.validate.conf" + - "ormance.cases.Proto3MessageIgnoreEmpty.M" + - "sgBA\272H>\272\0018\n\033proto3.message.ignore.empty\022" + - "\006foobar\032\021this.val == \'foo\'\330\001\001R\003val\032$\n\003Ms" + - "g\022\025\n\003val\030\001 \001(\tH\000R\003val\210\001\001B\006\n\004_val\"\330\001\n\032Pro" + - "to3MessageIgnoreDefault\022\223\001\n\003val\030\001 \001(\0132>." + - "buf.validate.conformance.cases.Proto3Mes" + - "sageIgnoreDefault.MsgBA\272H>\272\0018\n\033proto3.me" + - "ssage.ignore.empty\022\006foobar\032\021this.val == " + - "\'foo\'\330\001\002R\003val\032$\n\003Msg\022\025\n\003val\030\001 \001(\tH\000R\003val" + - "\210\001\001B\006\n\004_val\"@\n\034Proto3OneofIgnoreUnspecif" + - "ied\022\033\n\003val\030\001 \001(\005B\007\272H\004\032\002 \000H\000R\003valB\003\n\001o\"=\n" + - "\026Proto3OneofIgnoreEmpty\022\036\n\003val\030\001 \001(\005B\n\272H" + - "\007\032\002 \000\330\001\001H\000R\003valB\003\n\001o\"?\n\030Proto3OneofIgnor" + - "eDefault\022\036\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\330\001\002H\000R\003val" + - "B\003\n\001o\"=\n\037Proto3RepeatedIgnoreUnspecified" + - "\022\032\n\003val\030\001 \003(\005B\010\272H\005\222\001\002\010\003R\003val\":\n\031Proto3Re" + - "peatedIgnoreEmpty\022\035\n\003val\030\001 \003(\005B\013\272H\010\222\001\002\010\003" + - "\330\001\001R\003val\"<\n\033Proto3RepeatedIgnoreDefault\022" + - "\035\n\003val\030\001 \003(\005B\013\272H\010\222\001\002\010\003\330\001\002R\003val\"\265\001\n\032Proto" + - "3MapIgnoreUnspecified\022_\n\003val\030\001 \003(\0132C.buf" + - ".validate.conformance.cases.Proto3MapIgn" + - "oreUnspecified.ValEntryB\010\272H\005\232\001\002\010\003R\003val\0326" + - "\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 " + - "\001(\005R\005value:\0028\001\"\254\001\n\024Proto3MapIgnoreEmpty\022" + - "\\\n\003val\030\001 \003(\0132=.buf.validate.conformance." + - "cases.Proto3MapIgnoreEmpty.ValEntryB\013\272H\010" + - "\232\001\002\010\003\330\001\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003" + - "key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\260\001\n\026Proto3" + - "MapIgnoreDefault\022^\n\003val\030\001 \003(\0132?.buf.vali" + - "date.conformance.cases.Proto3MapIgnoreDe" + - "fault.ValEntryB\013\272H\010\232\001\002\010\003\330\001\002R\003val\0326\n\010ValE" + - "ntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005v" + - "alue:\0028\001\"E\n#Proto3RepeatedItemIgnoreUnsp" + - "ecified\022\036\n\003val\030\001 \003(\005B\014\272H\t\222\001\006\"\004\032\002 \000R\003val\"" + - "B\n\035Proto3RepeatedItemIgnoreEmpty\022!\n\003val\030" + - "\001 \003(\005B\017\272H\014\222\001\t\"\007\032\002 \000\330\001\001R\003val\"D\n\037Proto3Rep" + - "eatedItemIgnoreDefault\022!\n\003val\030\001 \003(\005B\017\272H\014" + - "\222\001\t\"\007\032\002 \000\330\001\002R\003val\"\277\001\n\035Proto3MapKeyIgnore" + - "Unspecified\022f\n\003val\030\001 \003(\0132F.buf.validate." + - "conformance.cases.Proto3MapKeyIgnoreUnsp" + - "ecified.ValEntryB\014\272H\t\232\001\006\"\004\032\002 \000R\003val\0326\n\010V" + - "alEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005" + - "R\005value:\0028\001\"\266\001\n\027Proto3MapKeyIgnoreEmpty\022" + - "c\n\003val\030\001 \003(\0132@.buf.validate.conformance." + - "cases.Proto3MapKeyIgnoreEmpty.ValEntryB\017" + - "\272H\014\232\001\t\"\007\032\002 \000\330\001\001R\003val\0326\n\010ValEntry\022\020\n\003key\030" + - "\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\272\001\n" + - "\031Proto3MapKeyIgnoreDefault\022e\n\003val\030\001 \003(\0132" + - "B.buf.validate.conformance.cases.Proto3M" + - "apKeyIgnoreDefault.ValEntryB\017\272H\014\232\001\t\"\007\032\002 " + - "\000\330\001\002R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022" + - "\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\303\001\n\037Proto3MapV" + - "alueIgnoreUnspecified\022h\n\003val\030\001 \003(\0132H.buf" + - ".validate.conformance.cases.Proto3MapVal" + - "ueIgnoreUnspecified.ValEntryB\014\272H\t\232\001\006*\004\032\002" + - " \000R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n" + - "\005value\030\002 \001(\005R\005value:\0028\001\"\272\001\n\031Proto3MapVal" + - "ueIgnoreEmpty\022e\n\003val\030\001 \003(\0132B.buf.validat" + - "e.conformance.cases.Proto3MapValueIgnore" + - "Empty.ValEntryB\017\272H\014\232\001\t*\007\032\002 \000\330\001\001R\003val\0326\n\010" + - "ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(" + - "\005R\005value:\0028\001\"\276\001\n\033Proto3MapValueIgnoreDef" + - "ault\022g\n\003val\030\001 \003(\0132D.buf.validate.conform" + - "ance.cases.Proto3MapValueIgnoreDefault.V" + - "alEntryB\017\272H\014\232\001\t*\007\032\002 \000\330\001\002R\003val\0326\n\010ValEntr" + - "y\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005valu" + - "e:\0028\001B\325\001\n$build.buf.validate.conformance" + - ".casesB\021IgnoreProto3ProtoP\001\242\002\004BVCC\252\002\036Buf" + - ".Validate.Conformance.Cases\312\002\036Buf\\Valida" + - "te\\Conformance\\Cases\342\002*Buf\\Validate\\Conf" + - "ormance\\Cases\\GPBMetadata\352\002!Buf::Validat" + - "e::Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProtoEditionsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProtoEditionsProto.java deleted file mode 100644 index 8ddfd659..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/IgnoreProtoEditionsProto.java +++ /dev/null @@ -1,1074 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class IgnoreProtoEditionsProto { - private IgnoreProtoEditionsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IgnoreProtoEditionsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n:buf/validate/conformance/cases/ignore_" + - "proto_editions.proto\022\036buf.validate.confo" + - "rmance.cases\032\033buf/validate/validate.prot" + - "o\"L\n/EditionsScalarExplicitPresenceIgnor" + - "eUnspecified\022\031\n\003val\030\001 \001(\005B\007\272H\004\032\002 \000R\003val\"" + - "\\\n:EditionsScalarExplicitPresenceIgnoreU" + - "nspecifiedWithDefault\022\036\n\003val\030\001 \001(\005:\003-42B" + - "\007\272H\004\032\002 \000R\003val\"I\n)EditionsScalarExplicitP" + - "resenceIgnoreEmpty\022\034\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000" + - "\330\001\001R\003val\"Y\n4EditionsScalarExplicitPresen" + - "ceIgnoreEmptyWithDefault\022!\n\003val\030\001 \001(\005:\003-" + - "42B\n\272H\007\032\002 \000\330\001\001R\003val\"K\n+EditionsScalarExp" + - "licitPresenceIgnoreDefault\022\034\n\003val\030\001 \001(\005B" + - "\n\272H\007\032\002 \000\330\001\002R\003val\"[\n6EditionsScalarExplic" + - "itPresenceIgnoreDefaultWithDefault\022!\n\003va" + - "l\030\001 \001(\005:\003-42B\n\272H\007\032\002 \000\330\001\002R\003val\"Q\n/Edition" + - "sScalarImplicitPresenceIgnoreUnspecified" + - "\022\036\n\003val\030\001 \001(\005B\014\252\001\002\010\002\272H\004\032\002 \000R\003val\"N\n)Edit" + - "ionsScalarImplicitPresenceIgnoreEmpty\022!\n" + - "\003val\030\001 \001(\005B\017\252\001\002\010\002\272H\007\032\002 \000\330\001\001R\003val\"P\n+Edit" + - "ionsScalarImplicitPresenceIgnoreDefault\022" + - "!\n\003val\030\001 \001(\005B\017\252\001\002\010\002\272H\007\032\002 \000\330\001\002R\003val\"O\n-Ed" + - "itionsScalarLegacyRequiredIgnoreUnspecif" + - "ied\022\036\n\003val\030\001 \001(\005B\014\252\001\002\010\003\272H\004\032\002 \000R\003val\"_\n8E" + - "ditionsScalarLegacyRequiredIgnoreUnspeci" + - "fiedWithDefault\022#\n\003val\030\001 \001(\005:\003-42B\014\252\001\002\010\003" + - "\272H\004\032\002 \000R\003val\"L\n\'EditionsScalarLegacyRequ" + - "iredIgnoreEmpty\022!\n\003val\030\001 \001(\005B\017\252\001\002\010\003\272H\007\032\002" + - " \000\330\001\001R\003val\"\\\n2EditionsScalarLegacyRequir" + - "edIgnoreEmptyWithDefault\022&\n\003val\030\001 \001(\005:\003-" + - "42B\017\252\001\002\010\003\272H\007\032\002 \000\330\001\001R\003val\"N\n)EditionsScal" + - "arLegacyRequiredIgnoreDefault\022!\n\003val\030\001 \001" + - "(\005B\017\252\001\002\010\003\272H\007\032\002 \000\330\001\002R\003val\"^\n4EditionsScal" + - "arLegacyRequiredIgnoreDefaultWithDefault" + - "\022&\n\003val\030\001 \001(\005:\003-42B\017\252\001\002\010\003\272H\007\032\002 \000\330\001\002R\003val" + - "\"\374\001\n0EditionsMessageExplicitPresenceIgno" + - "reUnspecified\022\256\001\n\003val\030\001 \001(\0132T.buf.valida" + - "te.conformance.cases.EditionsMessageExpl" + - "icitPresenceIgnoreUnspecified.MsgBF\272HC\272\001" + - "@\n#proto.editions.message.ignore.empty\022\006" + - "foobar\032\021this.val == \'foo\'R\003val\032\027\n\003Msg\022\020\n" + - "\003val\030\001 \001(\tR\003val\"\223\002\n9EditionsMessageExpli" + - "citPresenceDelimitedIgnoreUnspecified\022\274\001" + - "\n\003val\030\001 \001(\0132].buf.validate.conformance.c" + - "ases.EditionsMessageExplicitPresenceDeli" + - "mitedIgnoreUnspecified.MsgBK\252\001\002(\002\272HC\272\001@\n" + - "#proto.editions.message.ignore.empty\022\006fo" + - "obar\032\021this.val == \'foo\'R\003val\032\027\n\003Msg\022\020\n\003v" + - "al\030\001 \001(\tR\003val\"\363\001\n*EditionsMessageExplici" + - "tPresenceIgnoreEmpty\022\253\001\n\003val\030\001 \001(\0132N.buf" + - ".validate.conformance.cases.EditionsMess" + - "ageExplicitPresenceIgnoreEmpty.MsgBI\272HF\272" + - "\001@\n#proto.editions.message.ignore.empty\022" + - "\006foobar\032\021this.val == \'foo\'\330\001\001R\003val\032\027\n\003Ms" + - "g\022\020\n\003val\030\001 \001(\tR\003val\"\212\002\n3EditionsMessageE" + - "xplicitPresenceDelimitedIgnoreEmpty\022\271\001\n\003" + - "val\030\001 \001(\0132W.buf.validate.conformance.cas" + - "es.EditionsMessageExplicitPresenceDelimi" + - "tedIgnoreEmpty.MsgBN\252\001\002(\002\272HF\272\001@\n#proto.e" + - "ditions.message.ignore.empty\022\006foobar\032\021th" + - "is.val == \'foo\'\330\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 " + - "\001(\tR\003val\"\367\001\n,EditionsMessageExplicitPres" + - "enceIgnoreDefault\022\255\001\n\003val\030\001 \001(\0132P.buf.va" + - "lidate.conformance.cases.EditionsMessage" + - "ExplicitPresenceIgnoreDefault.MsgBI\272HF\272\001" + - "@\n#proto.editions.message.ignore.empty\022\006" + - "foobar\032\021this.val == \'foo\'\330\001\002R\003val\032\027\n\003Msg" + - "\022\020\n\003val\030\001 \001(\tR\003val\"\216\002\n5EditionsMessageEx" + - "plicitPresenceDelimitedIgnoreDefault\022\273\001\n" + - "\003val\030\001 \001(\0132Y.buf.validate.conformance.ca" + - "ses.EditionsMessageExplicitPresenceDelim" + - "itedIgnoreDefault.MsgBN\252\001\002(\002\272HF\272\001@\n#prot" + - "o.editions.message.ignore.empty\022\006foobar\032" + - "\021this.val == \'foo\'\330\001\002R\003val\032\027\n\003Msg\022\020\n\003val" + - "\030\001 \001(\tR\003val\"\375\001\n.EditionsMessageLegacyReq" + - "uiredIgnoreUnspecified\022\261\001\n\003val\030\001 \001(\0132R.b" + - "uf.validate.conformance.cases.EditionsMe" + - "ssageLegacyRequiredIgnoreUnspecified.Msg" + - "BK\252\001\002\010\003\272HC\272\001@\n#proto.editions.message.ig" + - "nore.empty\022\006foobar\032\021this.val == \'foo\'R\003v" + - "al\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\221\002\n7Editions" + - "MessageLegacyRequiredDelimitedIgnoreUnsp" + - "ecified\022\274\001\n\003val\030\001 \001(\0132[.buf.validate.con" + - "formance.cases.EditionsMessageLegacyRequ" + - "iredDelimitedIgnoreUnspecified.MsgBM\252\001\004\010" + - "\003(\002\272HC\272\001@\n#proto.editions.message.ignore" + - ".empty\022\006foobar\032\021this.val == \'foo\'R\003val\032\027" + - "\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\364\001\n(EditionsMess" + - "ageLegacyRequiredIgnoreEmpty\022\256\001\n\003val\030\001 \001" + - "(\0132L.buf.validate.conformance.cases.Edit" + - "ionsMessageLegacyRequiredIgnoreEmpty.Msg" + - "BN\252\001\002\010\003\272HF\272\001@\n#proto.editions.message.ig" + - "nore.empty\022\006foobar\032\021this.val == \'foo\'\330\001\001" + - "R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\210\002\n1Editi" + - "onsMessageLegacyRequiredDelimitedIgnoreE" + - "mpty\022\271\001\n\003val\030\001 \001(\0132U.buf.validate.confor" + - "mance.cases.EditionsMessageLegacyRequire" + - "dDelimitedIgnoreEmpty.MsgBP\252\001\004\010\003(\002\272HF\272\001@" + - "\n#proto.editions.message.ignore.empty\022\006f" + - "oobar\032\021this.val == \'foo\'\330\001\001R\003val\032\027\n\003Msg\022" + - "\020\n\003val\030\001 \001(\tR\003val\"\370\001\n*EditionsMessageLeg" + - "acyRequiredIgnoreDefault\022\260\001\n\003val\030\001 \001(\0132N" + - ".buf.validate.conformance.cases.Editions" + - "MessageLegacyRequiredIgnoreDefault.MsgBN" + - "\252\001\002\010\003\272HF\272\001@\n#proto.editions.message.igno" + - "re.empty\022\006foobar\032\021this.val == \'foo\'\330\001\002R\003" + - "val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\214\002\n3Edition" + - "sMessageLegacyRequiredDelimitedIgnoreDef" + - "ault\022\273\001\n\003val\030\001 \001(\0132W.buf.validate.confor" + - "mance.cases.EditionsMessageLegacyRequire" + - "dDelimitedIgnoreDefault.MsgBP\252\001\004\010\003(\002\272HF\272" + - "\001@\n#proto.editions.message.ignore.empty\022" + - "\006foobar\032\021this.val == \'foo\'\330\001\002R\003val\032\027\n\003Ms" + - "g\022\020\n\003val\030\001 \001(\tR\003val\"B\n\036EditionsOneofIgno" + - "reUnspecified\022\033\n\003val\030\001 \001(\005B\007\272H\004\032\002 \000H\000R\003v" + - "alB\003\n\001o\"R\n)EditionsOneofIgnoreUnspecifie" + - "dWithDefault\022 \n\003val\030\001 \001(\005:\003-42B\007\272H\004\032\002 \000H" + - "\000R\003valB\003\n\001o\"?\n\030EditionsOneofIgnoreEmpty\022" + - "\036\n\003val\030\001 \001(\005B\n\272H\007\032\002 \000\330\001\001H\000R\003valB\003\n\001o\"O\n#" + - "EditionsOneofIgnoreEmptyWithDefault\022#\n\003v" + - "al\030\001 \001(\005:\003-42B\n\272H\007\032\002 \000\330\001\001H\000R\003valB\003\n\001o\"A\n" + - "\032EditionsOneofIgnoreDefault\022\036\n\003val\030\001 \001(\005" + - "B\n\272H\007\032\002 \000\330\001\002H\000R\003valB\003\n\001o\"Q\n%EditionsOneo" + - "fIgnoreDefaultWithDefault\022#\n\003val\030\001 \001(\005:\003" + - "-42B\n\272H\007\032\002 \000\330\001\002H\000R\003valB\003\n\001o\"?\n!EditionsR" + - "epeatedIgnoreUnspecified\022\032\n\003val\030\001 \003(\005B\010\272" + - "H\005\222\001\002\010\003R\003val\"L\n)EditionsRepeatedExpanded" + - "IgnoreUnspecified\022\037\n\003val\030\001 \003(\005B\r\252\001\002\030\002\272H\005" + - "\222\001\002\010\003R\003val\"<\n\033EditionsRepeatedIgnoreEmpt" + - "y\022\035\n\003val\030\001 \003(\005B\013\272H\010\222\001\002\010\003\330\001\001R\003val\"I\n#Edit" + - "ionsRepeatedExpandedIgnoreEmpty\022\"\n\003val\030\001" + - " \003(\005B\020\252\001\002\030\002\272H\010\222\001\002\010\003\330\001\001R\003val\">\n\035EditionsR" + - "epeatedIgnoreDefault\022\035\n\003val\030\001 \003(\005B\013\272H\010\222\001" + - "\002\010\003\330\001\002R\003val\"K\n%EditionsRepeatedExpandedI" + - "gnoreDefault\022\"\n\003val\030\001 \003(\005B\020\252\001\002\030\002\272H\010\222\001\002\010\003" + - "\330\001\002R\003val\"\271\001\n\034EditionsMapIgnoreUnspecifie" + - "d\022a\n\003val\030\001 \003(\0132E.buf.validate.conformanc" + - "e.cases.EditionsMapIgnoreUnspecified.Val" + - "EntryB\010\272H\005\232\001\002\010\003R\003val\0326\n\010ValEntry\022\020\n\003key\030" + - "\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\260\001\n" + - "\026EditionsMapIgnoreEmpty\022^\n\003val\030\001 \003(\0132?.b" + - "uf.validate.conformance.cases.EditionsMa" + - "pIgnoreEmpty.ValEntryB\013\272H\010\232\001\002\010\003\330\001\001R\003val\032" + - "6\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002" + - " \001(\005R\005value:\0028\001\"\264\001\n\030EditionsMapIgnoreDef" + - "ault\022`\n\003val\030\001 \003(\0132A.buf.validate.conform" + - "ance.cases.EditionsMapIgnoreDefault.ValE" + - "ntryB\013\272H\010\232\001\002\010\003\330\001\002R\003val\0326\n\010ValEntry\022\020\n\003ke" + - "y\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001\"G" + - "\n%EditionsRepeatedItemIgnoreUnspecified\022" + - "\036\n\003val\030\001 \003(\005B\014\272H\t\222\001\006\"\004\032\002 \000R\003val\"T\n-Editi" + - "onsRepeatedExpandedItemIgnoreUnspecified" + - "\022#\n\003val\030\001 \003(\005B\021\252\001\002\030\002\272H\t\222\001\006\"\004\032\002 \000R\003val\"D\n" + - "\037EditionsRepeatedItemIgnoreEmpty\022!\n\003val\030" + - "\001 \003(\005B\017\272H\014\222\001\t\"\007\032\002 \000\330\001\001R\003val\"Q\n\'EditionsR" + - "epeatedExpandedItemIgnoreEmpty\022&\n\003val\030\001 " + - "\003(\005B\024\252\001\002\030\002\272H\014\222\001\t\"\007\032\002 \000\330\001\001R\003val\"F\n!Editio" + - "nsRepeatedItemIgnoreDefault\022!\n\003val\030\001 \003(\005" + - "B\017\272H\014\222\001\t\"\007\032\002 \000\330\001\002R\003val\"S\n)EditionsRepeat" + - "edExpandedItemIgnoreDefault\022&\n\003val\030\001 \003(\005" + - "B\024\252\001\002\030\002\272H\014\222\001\t\"\007\032\002 \000\330\001\002R\003val\"\303\001\n\037Editions" + - "MapKeyIgnoreUnspecified\022h\n\003val\030\001 \003(\0132H.b" + - "uf.validate.conformance.cases.EditionsMa" + - "pKeyIgnoreUnspecified.ValEntryB\014\272H\t\232\001\006\"\004" + - "\032\002 \000R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022" + - "\024\n\005value\030\002 \001(\005R\005value:\0028\001\"\272\001\n\031EditionsMa" + - "pKeyIgnoreEmpty\022e\n\003val\030\001 \003(\0132B.buf.valid" + - "ate.conformance.cases.EditionsMapKeyIgno" + - "reEmpty.ValEntryB\017\272H\014\232\001\t\"\007\032\002 \000\330\001\001R\003val\0326" + - "\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 " + - "\001(\005R\005value:\0028\001\"\276\001\n\033EditionsMapKeyIgnoreD" + - "efault\022g\n\003val\030\001 \003(\0132D.buf.validate.confo" + - "rmance.cases.EditionsMapKeyIgnoreDefault" + - ".ValEntryB\017\272H\014\232\001\t\"\007\032\002 \000\330\001\002R\003val\0326\n\010ValEn" + - "try\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005va" + - "lue:\0028\001\"\307\001\n!EditionsMapValueIgnoreUnspec" + - "ified\022j\n\003val\030\001 \003(\0132J.buf.validate.confor" + - "mance.cases.EditionsMapValueIgnoreUnspec" + - "ified.ValEntryB\014\272H\t\232\001\006*\004\032\002 \000R\003val\0326\n\010Val" + - "Entry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005" + - "value:\0028\001\"\276\001\n\033EditionsMapValueIgnoreEmpt" + - "y\022g\n\003val\030\001 \003(\0132D.buf.validate.conformanc" + - "e.cases.EditionsMapValueIgnoreEmpty.ValE" + - "ntryB\017\272H\014\232\001\t*\007\032\002 \000\330\001\001R\003val\0326\n\010ValEntry\022\020" + - "\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\002" + - "8\001\"\302\001\n\035EditionsMapValueIgnoreDefault\022i\n\003" + - "val\030\001 \003(\0132F.buf.validate.conformance.cas" + - "es.EditionsMapValueIgnoreDefault.ValEntr" + - "yB\017\272H\014\232\001\t*\007\032\002 \000\330\001\002R\003val\0326\n\010ValEntry\022\020\n\003k" + - "ey\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\005R\005value:\0028\001B" + - "\334\001\n$build.buf.validate.conformance.cases" + - "B\030IgnoreProtoEditionsProtoP\001\242\002\004BVCC\252\002\036Bu" + - "f.Validate.Conformance.Cases\312\002\036Buf\\Valid" + - "ate\\Conformance\\Cases\342\002*Buf\\Validate\\Con" + - "formance\\Cases\\GPBMetadata\352\002!Buf::Valida" + - "te::Conformance::Casesb\010editionsp\350\007" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreUnspecifiedWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreEmptyWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarExplicitPresenceIgnoreDefaultWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarImplicitPresenceIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreUnspecifiedWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreEmptyWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsScalarLegacyRequiredIgnoreDefaultWithDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageExplicitPresenceDelimitedIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreUnspecified_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreEmpty_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMessageLegacyRequiredDelimitedIgnoreDefault_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreUnspecifiedWithDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreEmptyWithDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsOneofIgnoreDefaultWithDefault_descriptor, - new java.lang.String[] { "Val", "O", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedItemIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsRepeatedExpandedItemIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapKeyIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreUnspecified_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreEmpty_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_EditionsMapValueIgnoreDefault_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Const.java deleted file mode 100644 index fb39439f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Const.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32Const} - */ -public final class Int32Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32Const) - Int32ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32Const.class.getName()); - } - // Use Int32Const.newBuilder() to construct. - private Int32Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32Const.class, build.buf.validate.conformance.cases.Int32Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32Const other = (build.buf.validate.conformance.cases.Int32Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Const 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.Int32Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Const 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.Int32Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Const 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.Int32Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32Const 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.Int32Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32Const 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.Int32Const 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.Int32Const 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.Int32Const 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.Int32Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32Const) - build.buf.validate.conformance.cases.Int32ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32Const.class, build.buf.validate.conformance.cases.Int32Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Const build() { - build.buf.validate.conformance.cases.Int32Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Const buildPartial() { - build.buf.validate.conformance.cases.Int32Const result = new build.buf.validate.conformance.cases.Int32Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32Const) { - return mergeFrom((build.buf.validate.conformance.cases.Int32Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32Const other) { - if (other == build.buf.validate.conformance.cases.Int32Const.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32Const) - private static final build.buf.validate.conformance.cases.Int32Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32Const(); - } - - public static build.buf.validate.conformance.cases.Int32Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32Const 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.Int32Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ConstOrBuilder.java deleted file mode 100644 index 3ac648df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32Const) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTE.java deleted file mode 100644 index 728b1cc2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32ExGTELTE} - */ -public final class Int32ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32ExGTELTE) - Int32ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32ExGTELTE.class.getName()); - } - // Use Int32ExGTELTE.newBuilder() to construct. - private Int32ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32ExGTELTE.class, build.buf.validate.conformance.cases.Int32ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32ExGTELTE other = (build.buf.validate.conformance.cases.Int32ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32ExGTELTE 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.Int32ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32ExGTELTE 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.Int32ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32ExGTELTE 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.Int32ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32ExGTELTE 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.Int32ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32ExGTELTE 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.Int32ExGTELTE 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.Int32ExGTELTE 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.Int32ExGTELTE 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.Int32ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32ExGTELTE) - build.buf.validate.conformance.cases.Int32ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32ExGTELTE.class, build.buf.validate.conformance.cases.Int32ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32ExGTELTE build() { - build.buf.validate.conformance.cases.Int32ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.Int32ExGTELTE result = new build.buf.validate.conformance.cases.Int32ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int32ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.Int32ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32ExGTELTE) - private static final build.buf.validate.conformance.cases.Int32ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.Int32ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32ExGTELTE 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.Int32ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTEOrBuilder.java deleted file mode 100644 index 28b9fe67..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGT.java deleted file mode 100644 index a629664a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32ExLTGT} - */ -public final class Int32ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32ExLTGT) - Int32ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32ExLTGT.class.getName()); - } - // Use Int32ExLTGT.newBuilder() to construct. - private Int32ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32ExLTGT.class, build.buf.validate.conformance.cases.Int32ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32ExLTGT other = (build.buf.validate.conformance.cases.Int32ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32ExLTGT 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.Int32ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32ExLTGT 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.Int32ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32ExLTGT 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.Int32ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32ExLTGT 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.Int32ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32ExLTGT 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.Int32ExLTGT 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.Int32ExLTGT 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.Int32ExLTGT 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.Int32ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32ExLTGT) - build.buf.validate.conformance.cases.Int32ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32ExLTGT.class, build.buf.validate.conformance.cases.Int32ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32ExLTGT build() { - build.buf.validate.conformance.cases.Int32ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32ExLTGT buildPartial() { - build.buf.validate.conformance.cases.Int32ExLTGT result = new build.buf.validate.conformance.cases.Int32ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.Int32ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32ExLTGT other) { - if (other == build.buf.validate.conformance.cases.Int32ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32ExLTGT) - private static final build.buf.validate.conformance.cases.Int32ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32ExLTGT(); - } - - public static build.buf.validate.conformance.cases.Int32ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32ExLTGT 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.Int32ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGTOrBuilder.java deleted file mode 100644 index db3041aa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Example.java deleted file mode 100644 index f0ed8f7a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Example.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32Example} - */ -public final class Int32Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32Example) - Int32ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32Example.class.getName()); - } - // Use Int32Example.newBuilder() to construct. - private Int32Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32Example.class, build.buf.validate.conformance.cases.Int32Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32Example other = (build.buf.validate.conformance.cases.Int32Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Example 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.Int32Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Example 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.Int32Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Example 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.Int32Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32Example 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.Int32Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32Example 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.Int32Example 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.Int32Example 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.Int32Example 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.Int32Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32Example) - build.buf.validate.conformance.cases.Int32ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32Example.class, build.buf.validate.conformance.cases.Int32Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Example build() { - build.buf.validate.conformance.cases.Int32Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Example buildPartial() { - build.buf.validate.conformance.cases.Int32Example result = new build.buf.validate.conformance.cases.Int32Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32Example) { - return mergeFrom((build.buf.validate.conformance.cases.Int32Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32Example other) { - if (other == build.buf.validate.conformance.cases.Int32Example.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32Example) - private static final build.buf.validate.conformance.cases.Int32Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32Example(); - } - - public static build.buf.validate.conformance.cases.Int32Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32Example 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.Int32Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExampleOrBuilder.java deleted file mode 100644 index c24330d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32Example) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GT.java deleted file mode 100644 index 42f0dcd1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32GT} - */ -public final class Int32GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32GT) - Int32GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32GT.class.getName()); - } - // Use Int32GT.newBuilder() to construct. - private Int32GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GT.class, build.buf.validate.conformance.cases.Int32GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32GT other = (build.buf.validate.conformance.cases.Int32GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GT 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.Int32GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GT 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.Int32GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GT 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.Int32GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32GT 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.Int32GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32GT 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.Int32GT 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.Int32GT 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.Int32GT 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.Int32GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32GT) - build.buf.validate.conformance.cases.Int32GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GT.class, build.buf.validate.conformance.cases.Int32GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GT build() { - build.buf.validate.conformance.cases.Int32GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GT buildPartial() { - build.buf.validate.conformance.cases.Int32GT result = new build.buf.validate.conformance.cases.Int32GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32GT) { - return mergeFrom((build.buf.validate.conformance.cases.Int32GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32GT other) { - if (other == build.buf.validate.conformance.cases.Int32GT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32GT) - private static final build.buf.validate.conformance.cases.Int32GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32GT(); - } - - public static build.buf.validate.conformance.cases.Int32GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32GT 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.Int32GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTE.java deleted file mode 100644 index 53f0935a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32GTE} - */ -public final class Int32GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32GTE) - Int32GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32GTE.class.getName()); - } - // Use Int32GTE.newBuilder() to construct. - private Int32GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GTE.class, build.buf.validate.conformance.cases.Int32GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32GTE other = (build.buf.validate.conformance.cases.Int32GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTE 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.Int32GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTE 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.Int32GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTE 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.Int32GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32GTE 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.Int32GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32GTE 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.Int32GTE 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.Int32GTE 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.Int32GTE 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.Int32GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32GTE) - build.buf.validate.conformance.cases.Int32GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GTE.class, build.buf.validate.conformance.cases.Int32GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTE build() { - build.buf.validate.conformance.cases.Int32GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTE buildPartial() { - build.buf.validate.conformance.cases.Int32GTE result = new build.buf.validate.conformance.cases.Int32GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32GTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int32GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32GTE other) { - if (other == build.buf.validate.conformance.cases.Int32GTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32GTE) - private static final build.buf.validate.conformance.cases.Int32GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32GTE(); - } - - public static build.buf.validate.conformance.cases.Int32GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32GTE 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.Int32GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTE.java deleted file mode 100644 index aa43541c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32GTELTE} - */ -public final class Int32GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32GTELTE) - Int32GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32GTELTE.class.getName()); - } - // Use Int32GTELTE.newBuilder() to construct. - private Int32GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GTELTE.class, build.buf.validate.conformance.cases.Int32GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32GTELTE other = (build.buf.validate.conformance.cases.Int32GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTELTE 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.Int32GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTELTE 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.Int32GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTELTE 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.Int32GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32GTELTE 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.Int32GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32GTELTE 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.Int32GTELTE 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.Int32GTELTE 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.Int32GTELTE 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.Int32GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32GTELTE) - build.buf.validate.conformance.cases.Int32GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GTELTE.class, build.buf.validate.conformance.cases.Int32GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTELTE build() { - build.buf.validate.conformance.cases.Int32GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTELTE buildPartial() { - build.buf.validate.conformance.cases.Int32GTELTE result = new build.buf.validate.conformance.cases.Int32GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int32GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32GTELTE other) { - if (other == build.buf.validate.conformance.cases.Int32GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32GTELTE) - private static final build.buf.validate.conformance.cases.Int32GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32GTELTE(); - } - - public static build.buf.validate.conformance.cases.Int32GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32GTELTE 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.Int32GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTEOrBuilder.java deleted file mode 100644 index 3648a074..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTEOrBuilder.java deleted file mode 100644 index df7b6371..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLT.java deleted file mode 100644 index b843e902..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32GTLT} - */ -public final class Int32GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32GTLT) - Int32GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32GTLT.class.getName()); - } - // Use Int32GTLT.newBuilder() to construct. - private Int32GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GTLT.class, build.buf.validate.conformance.cases.Int32GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32GTLT other = (build.buf.validate.conformance.cases.Int32GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTLT 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.Int32GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTLT 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.Int32GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32GTLT 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.Int32GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32GTLT 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.Int32GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32GTLT 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.Int32GTLT 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.Int32GTLT 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.Int32GTLT 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.Int32GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32GTLT) - build.buf.validate.conformance.cases.Int32GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32GTLT.class, build.buf.validate.conformance.cases.Int32GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTLT build() { - build.buf.validate.conformance.cases.Int32GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32GTLT buildPartial() { - build.buf.validate.conformance.cases.Int32GTLT result = new build.buf.validate.conformance.cases.Int32GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.Int32GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32GTLT other) { - if (other == build.buf.validate.conformance.cases.Int32GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32GTLT) - private static final build.buf.validate.conformance.cases.Int32GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32GTLT(); - } - - public static build.buf.validate.conformance.cases.Int32GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32GTLT 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.Int32GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLTOrBuilder.java deleted file mode 100644 index 85535814..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTOrBuilder.java deleted file mode 100644 index 9dcef44b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32GT) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Ignore.java deleted file mode 100644 index d131f7f4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32Ignore.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32Ignore} - */ -public final class Int32Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32Ignore) - Int32IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32Ignore.class.getName()); - } - // Use Int32Ignore.newBuilder() to construct. - private Int32Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32Ignore.class, build.buf.validate.conformance.cases.Int32Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32Ignore other = (build.buf.validate.conformance.cases.Int32Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Ignore 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.Int32Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Ignore 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.Int32Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32Ignore 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.Int32Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32Ignore 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.Int32Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32Ignore 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.Int32Ignore 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.Int32Ignore 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.Int32Ignore 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.Int32Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32Ignore) - build.buf.validate.conformance.cases.Int32IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32Ignore.class, build.buf.validate.conformance.cases.Int32Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Ignore build() { - build.buf.validate.conformance.cases.Int32Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32Ignore buildPartial() { - build.buf.validate.conformance.cases.Int32Ignore result = new build.buf.validate.conformance.cases.Int32Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.Int32Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32Ignore other) { - if (other == build.buf.validate.conformance.cases.Int32Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32Ignore) - private static final build.buf.validate.conformance.cases.Int32Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32Ignore(); - } - - public static build.buf.validate.conformance.cases.Int32Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32Ignore 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.Int32Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IgnoreOrBuilder.java deleted file mode 100644 index 7d260086..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32In.java deleted file mode 100644 index 71d77333..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32In.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32In} - */ -public final class Int32In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32In) - Int32InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32In.class.getName()); - } - // Use Int32In.newBuilder() to construct. - private Int32In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32In.class, build.buf.validate.conformance.cases.Int32In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32In other = (build.buf.validate.conformance.cases.Int32In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32In 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.Int32In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32In 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.Int32In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32In 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.Int32In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32In 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.Int32In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32In 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.Int32In 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.Int32In 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.Int32In 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.Int32In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32In) - build.buf.validate.conformance.cases.Int32InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32In.class, build.buf.validate.conformance.cases.Int32In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32In build() { - build.buf.validate.conformance.cases.Int32In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32In buildPartial() { - build.buf.validate.conformance.cases.Int32In result = new build.buf.validate.conformance.cases.Int32In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32In) { - return mergeFrom((build.buf.validate.conformance.cases.Int32In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32In other) { - if (other == build.buf.validate.conformance.cases.Int32In.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32In) - private static final build.buf.validate.conformance.cases.Int32In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32In(); - } - - public static build.buf.validate.conformance.cases.Int32In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32In 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.Int32In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32InOrBuilder.java deleted file mode 100644 index 948b24d0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32In) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectType.java deleted file mode 100644 index 0ba95c3e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectType.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32IncorrectType} - */ -public final class Int32IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32IncorrectType) - Int32IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32IncorrectType.class.getName()); - } - // Use Int32IncorrectType.newBuilder() to construct. - private Int32IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32IncorrectType.class, build.buf.validate.conformance.cases.Int32IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32IncorrectType other = (build.buf.validate.conformance.cases.Int32IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32IncorrectType 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.Int32IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32IncorrectType 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.Int32IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32IncorrectType 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.Int32IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32IncorrectType 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.Int32IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32IncorrectType 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.Int32IncorrectType 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.Int32IncorrectType 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.Int32IncorrectType 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.Int32IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32IncorrectType) - build.buf.validate.conformance.cases.Int32IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32IncorrectType.class, build.buf.validate.conformance.cases.Int32IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32IncorrectType build() { - build.buf.validate.conformance.cases.Int32IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32IncorrectType buildPartial() { - build.buf.validate.conformance.cases.Int32IncorrectType result = new build.buf.validate.conformance.cases.Int32IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.Int32IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32IncorrectType other) { - if (other == build.buf.validate.conformance.cases.Int32IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32IncorrectType) - private static final build.buf.validate.conformance.cases.Int32IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32IncorrectType(); - } - - public static build.buf.validate.conformance.cases.Int32IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32IncorrectType 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.Int32IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectTypeOrBuilder.java deleted file mode 100644 index cd8fcc95..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LT.java deleted file mode 100644 index 1021da79..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32LT} - */ -public final class Int32LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32LT) - Int32LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32LT.class.getName()); - } - // Use Int32LT.newBuilder() to construct. - private Int32LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32LT.class, build.buf.validate.conformance.cases.Int32LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32LT other = (build.buf.validate.conformance.cases.Int32LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32LT 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.Int32LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32LT 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.Int32LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32LT 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.Int32LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32LT 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.Int32LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32LT 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.Int32LT 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.Int32LT 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.Int32LT 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.Int32LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32LT) - build.buf.validate.conformance.cases.Int32LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32LT.class, build.buf.validate.conformance.cases.Int32LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32LT build() { - build.buf.validate.conformance.cases.Int32LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32LT buildPartial() { - build.buf.validate.conformance.cases.Int32LT result = new build.buf.validate.conformance.cases.Int32LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32LT) { - return mergeFrom((build.buf.validate.conformance.cases.Int32LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32LT other) { - if (other == build.buf.validate.conformance.cases.Int32LT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32LT) - private static final build.buf.validate.conformance.cases.Int32LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32LT(); - } - - public static build.buf.validate.conformance.cases.Int32LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32LT 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.Int32LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTE.java deleted file mode 100644 index 181b9aa9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32LTE} - */ -public final class Int32LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32LTE) - Int32LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32LTE.class.getName()); - } - // Use Int32LTE.newBuilder() to construct. - private Int32LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32LTE.class, build.buf.validate.conformance.cases.Int32LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32LTE other = (build.buf.validate.conformance.cases.Int32LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32LTE 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.Int32LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32LTE 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.Int32LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32LTE 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.Int32LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32LTE 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.Int32LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32LTE 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.Int32LTE 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.Int32LTE 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.Int32LTE 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.Int32LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32LTE) - build.buf.validate.conformance.cases.Int32LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32LTE.class, build.buf.validate.conformance.cases.Int32LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32LTE build() { - build.buf.validate.conformance.cases.Int32LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32LTE buildPartial() { - build.buf.validate.conformance.cases.Int32LTE result = new build.buf.validate.conformance.cases.Int32LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32LTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int32LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32LTE other) { - if (other == build.buf.validate.conformance.cases.Int32LTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32LTE) - private static final build.buf.validate.conformance.cases.Int32LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32LTE(); - } - - public static build.buf.validate.conformance.cases.Int32LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32LTE 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.Int32LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTEOrBuilder.java deleted file mode 100644 index 3c0c7d2b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTOrBuilder.java deleted file mode 100644 index ae709d21..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32LT) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32None.java deleted file mode 100644 index 6d33213b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32None.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32None} - */ -public final class Int32None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32None) - Int32NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32None.class.getName()); - } - // Use Int32None.newBuilder() to construct. - private Int32None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32None.class, build.buf.validate.conformance.cases.Int32None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32None other = (build.buf.validate.conformance.cases.Int32None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32None 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.Int32None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32None 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.Int32None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32None 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.Int32None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32None 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.Int32None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32None 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.Int32None 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.Int32None 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.Int32None 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.Int32None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32None) - build.buf.validate.conformance.cases.Int32NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32None.class, build.buf.validate.conformance.cases.Int32None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32None build() { - build.buf.validate.conformance.cases.Int32None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32None buildPartial() { - build.buf.validate.conformance.cases.Int32None result = new build.buf.validate.conformance.cases.Int32None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32None) { - return mergeFrom((build.buf.validate.conformance.cases.Int32None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32None other) { - if (other == build.buf.validate.conformance.cases.Int32None.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32None) - private static final build.buf.validate.conformance.cases.Int32None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32None(); - } - - public static build.buf.validate.conformance.cases.Int32None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32None 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.Int32None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NoneOrBuilder.java deleted file mode 100644 index 79f15e23..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32None) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val"]; - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotIn.java deleted file mode 100644 index 57e27d46..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotIn.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int32NotIn} - */ -public final class Int32NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int32NotIn) - Int32NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32NotIn.class.getName()); - } - // Use Int32NotIn.newBuilder() to construct. - private Int32NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int32NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32NotIn.class, build.buf.validate.conformance.cases.Int32NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Int32NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int32NotIn other = (build.buf.validate.conformance.cases.Int32NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int32NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32NotIn 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.Int32NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32NotIn 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.Int32NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int32NotIn 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.Int32NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int32NotIn 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.Int32NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int32NotIn 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.Int32NotIn 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.Int32NotIn 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.Int32NotIn 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.Int32NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int32NotIn) - build.buf.validate.conformance.cases.Int32NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int32NotIn.class, build.buf.validate.conformance.cases.Int32NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int32NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int32NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int32NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32NotIn build() { - build.buf.validate.conformance.cases.Int32NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int32NotIn buildPartial() { - build.buf.validate.conformance.cases.Int32NotIn result = new build.buf.validate.conformance.cases.Int32NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int32NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int32NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.Int32NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int32NotIn other) { - if (other == build.buf.validate.conformance.cases.Int32NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int32NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int32NotIn) - private static final build.buf.validate.conformance.cases.Int32NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int32NotIn(); - } - - public static build.buf.validate.conformance.cases.Int32NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32NotIn 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.Int32NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotInOrBuilder.java deleted file mode 100644 index 1d04c040..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int32NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int32NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int32NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraints.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraints.java deleted file mode 100644 index e25ed0ce..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraints.java +++ /dev/null @@ -1,1185 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64BigConstraints} - */ -public final class Int64BigConstraints extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64BigConstraints) - Int64BigConstraintsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64BigConstraints.class.getName()); - } - // Use Int64BigConstraints.newBuilder() to construct. - private Int64BigConstraints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64BigConstraints() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64BigConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64BigConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64BigConstraints.class, build.buf.validate.conformance.cases.Int64BigConstraints.Builder.class); - } - - public static final int LT_POS_FIELD_NUMBER = 1; - private long ltPos_ = 0L; - /** - *
-   * Intentionally choose limits that are outside the range of both signed and unsigned 32-bit integers.
-   * 
- * - * int64 lt_pos = 1 [json_name = "ltPos", (.buf.validate.field) = { ... } - * @return The ltPos. - */ - @java.lang.Override - public long getLtPos() { - return ltPos_; - } - - public static final int LT_NEG_FIELD_NUMBER = 2; - private long ltNeg_ = 0L; - /** - * int64 lt_neg = 2 [json_name = "ltNeg", (.buf.validate.field) = { ... } - * @return The ltNeg. - */ - @java.lang.Override - public long getLtNeg() { - return ltNeg_; - } - - public static final int GT_POS_FIELD_NUMBER = 3; - private long gtPos_ = 0L; - /** - * int64 gt_pos = 3 [json_name = "gtPos", (.buf.validate.field) = { ... } - * @return The gtPos. - */ - @java.lang.Override - public long getGtPos() { - return gtPos_; - } - - public static final int GT_NEG_FIELD_NUMBER = 4; - private long gtNeg_ = 0L; - /** - * int64 gt_neg = 4 [json_name = "gtNeg", (.buf.validate.field) = { ... } - * @return The gtNeg. - */ - @java.lang.Override - public long getGtNeg() { - return gtNeg_; - } - - public static final int LTE_POS_FIELD_NUMBER = 5; - private long ltePos_ = 0L; - /** - * int64 lte_pos = 5 [json_name = "ltePos", (.buf.validate.field) = { ... } - * @return The ltePos. - */ - @java.lang.Override - public long getLtePos() { - return ltePos_; - } - - public static final int LTE_NEG_FIELD_NUMBER = 6; - private long lteNeg_ = 0L; - /** - * int64 lte_neg = 6 [json_name = "lteNeg", (.buf.validate.field) = { ... } - * @return The lteNeg. - */ - @java.lang.Override - public long getLteNeg() { - return lteNeg_; - } - - public static final int GTE_POS_FIELD_NUMBER = 7; - private long gtePos_ = 0L; - /** - * int64 gte_pos = 7 [json_name = "gtePos", (.buf.validate.field) = { ... } - * @return The gtePos. - */ - @java.lang.Override - public long getGtePos() { - return gtePos_; - } - - public static final int GTE_NEG_FIELD_NUMBER = 8; - private long gteNeg_ = 0L; - /** - * int64 gte_neg = 8 [json_name = "gteNeg", (.buf.validate.field) = { ... } - * @return The gteNeg. - */ - @java.lang.Override - public long getGteNeg() { - return gteNeg_; - } - - public static final int CONSTANT_POS_FIELD_NUMBER = 9; - private long constantPos_ = 0L; - /** - * int64 constant_pos = 9 [json_name = "constantPos", (.buf.validate.field) = { ... } - * @return The constantPos. - */ - @java.lang.Override - public long getConstantPos() { - return constantPos_; - } - - public static final int CONSTANT_NEG_FIELD_NUMBER = 10; - private long constantNeg_ = 0L; - /** - * int64 constant_neg = 10 [json_name = "constantNeg", (.buf.validate.field) = { ... } - * @return The constantNeg. - */ - @java.lang.Override - public long getConstantNeg() { - return constantNeg_; - } - - public static final int IN_FIELD_NUMBER = 11; - private long in_ = 0L; - /** - * int64 in = 11 [json_name = "in", (.buf.validate.field) = { ... } - * @return The in. - */ - @java.lang.Override - public long getIn() { - return in_; - } - - public static final int NOTIN_FIELD_NUMBER = 12; - private long notin_ = 0L; - /** - * int64 notin = 12 [json_name = "notin", (.buf.validate.field) = { ... } - * @return The notin. - */ - @java.lang.Override - public long getNotin() { - return notin_; - } - - 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 (ltPos_ != 0L) { - output.writeInt64(1, ltPos_); - } - if (ltNeg_ != 0L) { - output.writeInt64(2, ltNeg_); - } - if (gtPos_ != 0L) { - output.writeInt64(3, gtPos_); - } - if (gtNeg_ != 0L) { - output.writeInt64(4, gtNeg_); - } - if (ltePos_ != 0L) { - output.writeInt64(5, ltePos_); - } - if (lteNeg_ != 0L) { - output.writeInt64(6, lteNeg_); - } - if (gtePos_ != 0L) { - output.writeInt64(7, gtePos_); - } - if (gteNeg_ != 0L) { - output.writeInt64(8, gteNeg_); - } - if (constantPos_ != 0L) { - output.writeInt64(9, constantPos_); - } - if (constantNeg_ != 0L) { - output.writeInt64(10, constantNeg_); - } - if (in_ != 0L) { - output.writeInt64(11, in_); - } - if (notin_ != 0L) { - output.writeInt64(12, notin_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (ltPos_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, ltPos_); - } - if (ltNeg_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, ltNeg_); - } - if (gtPos_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, gtPos_); - } - if (gtNeg_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, gtNeg_); - } - if (ltePos_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, ltePos_); - } - if (lteNeg_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, lteNeg_); - } - if (gtePos_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(7, gtePos_); - } - if (gteNeg_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(8, gteNeg_); - } - if (constantPos_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(9, constantPos_); - } - if (constantNeg_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(10, constantNeg_); - } - if (in_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(11, in_); - } - if (notin_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(12, notin_); - } - 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.Int64BigConstraints)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64BigConstraints other = (build.buf.validate.conformance.cases.Int64BigConstraints) obj; - - if (getLtPos() - != other.getLtPos()) return false; - if (getLtNeg() - != other.getLtNeg()) return false; - if (getGtPos() - != other.getGtPos()) return false; - if (getGtNeg() - != other.getGtNeg()) return false; - if (getLtePos() - != other.getLtePos()) return false; - if (getLteNeg() - != other.getLteNeg()) return false; - if (getGtePos() - != other.getGtePos()) return false; - if (getGteNeg() - != other.getGteNeg()) return false; - if (getConstantPos() - != other.getConstantPos()) return false; - if (getConstantNeg() - != other.getConstantNeg()) return false; - if (getIn() - != other.getIn()) return false; - if (getNotin() - != other.getNotin()) 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(); - hash = (37 * hash) + LT_POS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLtPos()); - hash = (37 * hash) + LT_NEG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLtNeg()); - hash = (37 * hash) + GT_POS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGtPos()); - hash = (37 * hash) + GT_NEG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGtNeg()); - hash = (37 * hash) + LTE_POS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLtePos()); - hash = (37 * hash) + LTE_NEG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLteNeg()); - hash = (37 * hash) + GTE_POS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGtePos()); - hash = (37 * hash) + GTE_NEG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGteNeg()); - hash = (37 * hash) + CONSTANT_POS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConstantPos()); - hash = (37 * hash) + CONSTANT_NEG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConstantNeg()); - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getIn()); - hash = (37 * hash) + NOTIN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getNotin()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64BigConstraints parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64BigConstraints 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.Int64BigConstraints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64BigConstraints 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.Int64BigConstraints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64BigConstraints 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.Int64BigConstraints parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64BigConstraints 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.Int64BigConstraints parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64BigConstraints 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.Int64BigConstraints 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.Int64BigConstraints 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.Int64BigConstraints 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.Int64BigConstraints} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64BigConstraints) - build.buf.validate.conformance.cases.Int64BigConstraintsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64BigConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64BigConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64BigConstraints.class, build.buf.validate.conformance.cases.Int64BigConstraints.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64BigConstraints.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ltPos_ = 0L; - ltNeg_ = 0L; - gtPos_ = 0L; - gtNeg_ = 0L; - ltePos_ = 0L; - lteNeg_ = 0L; - gtePos_ = 0L; - gteNeg_ = 0L; - constantPos_ = 0L; - constantNeg_ = 0L; - in_ = 0L; - notin_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64BigConstraints_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64BigConstraints getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64BigConstraints.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64BigConstraints build() { - build.buf.validate.conformance.cases.Int64BigConstraints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64BigConstraints buildPartial() { - build.buf.validate.conformance.cases.Int64BigConstraints result = new build.buf.validate.conformance.cases.Int64BigConstraints(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64BigConstraints result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ltPos_ = ltPos_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.ltNeg_ = ltNeg_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.gtPos_ = gtPos_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gtNeg_ = gtNeg_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.ltePos_ = ltePos_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.lteNeg_ = lteNeg_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.gtePos_ = gtePos_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.gteNeg_ = gteNeg_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.constantPos_ = constantPos_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.constantNeg_ = constantNeg_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.notin_ = notin_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64BigConstraints) { - return mergeFrom((build.buf.validate.conformance.cases.Int64BigConstraints)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64BigConstraints other) { - if (other == build.buf.validate.conformance.cases.Int64BigConstraints.getDefaultInstance()) return this; - if (other.getLtPos() != 0L) { - setLtPos(other.getLtPos()); - } - if (other.getLtNeg() != 0L) { - setLtNeg(other.getLtNeg()); - } - if (other.getGtPos() != 0L) { - setGtPos(other.getGtPos()); - } - if (other.getGtNeg() != 0L) { - setGtNeg(other.getGtNeg()); - } - if (other.getLtePos() != 0L) { - setLtePos(other.getLtePos()); - } - if (other.getLteNeg() != 0L) { - setLteNeg(other.getLteNeg()); - } - if (other.getGtePos() != 0L) { - setGtePos(other.getGtePos()); - } - if (other.getGteNeg() != 0L) { - setGteNeg(other.getGteNeg()); - } - if (other.getConstantPos() != 0L) { - setConstantPos(other.getConstantPos()); - } - if (other.getConstantNeg() != 0L) { - setConstantNeg(other.getConstantNeg()); - } - if (other.getIn() != 0L) { - setIn(other.getIn()); - } - if (other.getNotin() != 0L) { - setNotin(other.getNotin()); - } - 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 8: { - ltPos_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - ltNeg_ = input.readInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - gtPos_ = input.readInt64(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: { - gtNeg_ = input.readInt64(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: { - ltePos_ = input.readInt64(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 48: { - lteNeg_ = input.readInt64(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 56: { - gtePos_ = input.readInt64(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 64: { - gteNeg_ = input.readInt64(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 72: { - constantPos_ = input.readInt64(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 80: { - constantNeg_ = input.readInt64(); - bitField0_ |= 0x00000200; - break; - } // case 80 - case 88: { - in_ = input.readInt64(); - bitField0_ |= 0x00000400; - break; - } // case 88 - case 96: { - notin_ = input.readInt64(); - bitField0_ |= 0x00000800; - break; - } // case 96 - 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 long ltPos_ ; - /** - *
-     * Intentionally choose limits that are outside the range of both signed and unsigned 32-bit integers.
-     * 
- * - * int64 lt_pos = 1 [json_name = "ltPos", (.buf.validate.field) = { ... } - * @return The ltPos. - */ - @java.lang.Override - public long getLtPos() { - return ltPos_; - } - /** - *
-     * Intentionally choose limits that are outside the range of both signed and unsigned 32-bit integers.
-     * 
- * - * int64 lt_pos = 1 [json_name = "ltPos", (.buf.validate.field) = { ... } - * @param value The ltPos to set. - * @return This builder for chaining. - */ - public Builder setLtPos(long value) { - - ltPos_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Intentionally choose limits that are outside the range of both signed and unsigned 32-bit integers.
-     * 
- * - * int64 lt_pos = 1 [json_name = "ltPos", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearLtPos() { - bitField0_ = (bitField0_ & ~0x00000001); - ltPos_ = 0L; - onChanged(); - return this; - } - - private long ltNeg_ ; - /** - * int64 lt_neg = 2 [json_name = "ltNeg", (.buf.validate.field) = { ... } - * @return The ltNeg. - */ - @java.lang.Override - public long getLtNeg() { - return ltNeg_; - } - /** - * int64 lt_neg = 2 [json_name = "ltNeg", (.buf.validate.field) = { ... } - * @param value The ltNeg to set. - * @return This builder for chaining. - */ - public Builder setLtNeg(long value) { - - ltNeg_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * int64 lt_neg = 2 [json_name = "ltNeg", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearLtNeg() { - bitField0_ = (bitField0_ & ~0x00000002); - ltNeg_ = 0L; - onChanged(); - return this; - } - - private long gtPos_ ; - /** - * int64 gt_pos = 3 [json_name = "gtPos", (.buf.validate.field) = { ... } - * @return The gtPos. - */ - @java.lang.Override - public long getGtPos() { - return gtPos_; - } - /** - * int64 gt_pos = 3 [json_name = "gtPos", (.buf.validate.field) = { ... } - * @param value The gtPos to set. - * @return This builder for chaining. - */ - public Builder setGtPos(long value) { - - gtPos_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * int64 gt_pos = 3 [json_name = "gtPos", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearGtPos() { - bitField0_ = (bitField0_ & ~0x00000004); - gtPos_ = 0L; - onChanged(); - return this; - } - - private long gtNeg_ ; - /** - * int64 gt_neg = 4 [json_name = "gtNeg", (.buf.validate.field) = { ... } - * @return The gtNeg. - */ - @java.lang.Override - public long getGtNeg() { - return gtNeg_; - } - /** - * int64 gt_neg = 4 [json_name = "gtNeg", (.buf.validate.field) = { ... } - * @param value The gtNeg to set. - * @return This builder for chaining. - */ - public Builder setGtNeg(long value) { - - gtNeg_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * int64 gt_neg = 4 [json_name = "gtNeg", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearGtNeg() { - bitField0_ = (bitField0_ & ~0x00000008); - gtNeg_ = 0L; - onChanged(); - return this; - } - - private long ltePos_ ; - /** - * int64 lte_pos = 5 [json_name = "ltePos", (.buf.validate.field) = { ... } - * @return The ltePos. - */ - @java.lang.Override - public long getLtePos() { - return ltePos_; - } - /** - * int64 lte_pos = 5 [json_name = "ltePos", (.buf.validate.field) = { ... } - * @param value The ltePos to set. - * @return This builder for chaining. - */ - public Builder setLtePos(long value) { - - ltePos_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * int64 lte_pos = 5 [json_name = "ltePos", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearLtePos() { - bitField0_ = (bitField0_ & ~0x00000010); - ltePos_ = 0L; - onChanged(); - return this; - } - - private long lteNeg_ ; - /** - * int64 lte_neg = 6 [json_name = "lteNeg", (.buf.validate.field) = { ... } - * @return The lteNeg. - */ - @java.lang.Override - public long getLteNeg() { - return lteNeg_; - } - /** - * int64 lte_neg = 6 [json_name = "lteNeg", (.buf.validate.field) = { ... } - * @param value The lteNeg to set. - * @return This builder for chaining. - */ - public Builder setLteNeg(long value) { - - lteNeg_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * int64 lte_neg = 6 [json_name = "lteNeg", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearLteNeg() { - bitField0_ = (bitField0_ & ~0x00000020); - lteNeg_ = 0L; - onChanged(); - return this; - } - - private long gtePos_ ; - /** - * int64 gte_pos = 7 [json_name = "gtePos", (.buf.validate.field) = { ... } - * @return The gtePos. - */ - @java.lang.Override - public long getGtePos() { - return gtePos_; - } - /** - * int64 gte_pos = 7 [json_name = "gtePos", (.buf.validate.field) = { ... } - * @param value The gtePos to set. - * @return This builder for chaining. - */ - public Builder setGtePos(long value) { - - gtePos_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * int64 gte_pos = 7 [json_name = "gtePos", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearGtePos() { - bitField0_ = (bitField0_ & ~0x00000040); - gtePos_ = 0L; - onChanged(); - return this; - } - - private long gteNeg_ ; - /** - * int64 gte_neg = 8 [json_name = "gteNeg", (.buf.validate.field) = { ... } - * @return The gteNeg. - */ - @java.lang.Override - public long getGteNeg() { - return gteNeg_; - } - /** - * int64 gte_neg = 8 [json_name = "gteNeg", (.buf.validate.field) = { ... } - * @param value The gteNeg to set. - * @return This builder for chaining. - */ - public Builder setGteNeg(long value) { - - gteNeg_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * int64 gte_neg = 8 [json_name = "gteNeg", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearGteNeg() { - bitField0_ = (bitField0_ & ~0x00000080); - gteNeg_ = 0L; - onChanged(); - return this; - } - - private long constantPos_ ; - /** - * int64 constant_pos = 9 [json_name = "constantPos", (.buf.validate.field) = { ... } - * @return The constantPos. - */ - @java.lang.Override - public long getConstantPos() { - return constantPos_; - } - /** - * int64 constant_pos = 9 [json_name = "constantPos", (.buf.validate.field) = { ... } - * @param value The constantPos to set. - * @return This builder for chaining. - */ - public Builder setConstantPos(long value) { - - constantPos_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - * int64 constant_pos = 9 [json_name = "constantPos", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearConstantPos() { - bitField0_ = (bitField0_ & ~0x00000100); - constantPos_ = 0L; - onChanged(); - return this; - } - - private long constantNeg_ ; - /** - * int64 constant_neg = 10 [json_name = "constantNeg", (.buf.validate.field) = { ... } - * @return The constantNeg. - */ - @java.lang.Override - public long getConstantNeg() { - return constantNeg_; - } - /** - * int64 constant_neg = 10 [json_name = "constantNeg", (.buf.validate.field) = { ... } - * @param value The constantNeg to set. - * @return This builder for chaining. - */ - public Builder setConstantNeg(long value) { - - constantNeg_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - * int64 constant_neg = 10 [json_name = "constantNeg", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearConstantNeg() { - bitField0_ = (bitField0_ & ~0x00000200); - constantNeg_ = 0L; - onChanged(); - return this; - } - - private long in_ ; - /** - * int64 in = 11 [json_name = "in", (.buf.validate.field) = { ... } - * @return The in. - */ - @java.lang.Override - public long getIn() { - return in_; - } - /** - * int64 in = 11 [json_name = "in", (.buf.validate.field) = { ... } - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn(long value) { - - in_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - * int64 in = 11 [json_name = "in", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - bitField0_ = (bitField0_ & ~0x00000400); - in_ = 0L; - onChanged(); - return this; - } - - private long notin_ ; - /** - * int64 notin = 12 [json_name = "notin", (.buf.validate.field) = { ... } - * @return The notin. - */ - @java.lang.Override - public long getNotin() { - return notin_; - } - /** - * int64 notin = 12 [json_name = "notin", (.buf.validate.field) = { ... } - * @param value The notin to set. - * @return This builder for chaining. - */ - public Builder setNotin(long value) { - - notin_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - * int64 notin = 12 [json_name = "notin", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotin() { - bitField0_ = (bitField0_ & ~0x00000800); - notin_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64BigConstraints) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64BigConstraints) - private static final build.buf.validate.conformance.cases.Int64BigConstraints DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64BigConstraints(); - } - - public static build.buf.validate.conformance.cases.Int64BigConstraints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64BigConstraints 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.Int64BigConstraints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraintsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraintsOrBuilder.java deleted file mode 100644 index 3ae8d20d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64BigConstraintsOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64BigConstraintsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64BigConstraints) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Intentionally choose limits that are outside the range of both signed and unsigned 32-bit integers.
-   * 
- * - * int64 lt_pos = 1 [json_name = "ltPos", (.buf.validate.field) = { ... } - * @return The ltPos. - */ - long getLtPos(); - - /** - * int64 lt_neg = 2 [json_name = "ltNeg", (.buf.validate.field) = { ... } - * @return The ltNeg. - */ - long getLtNeg(); - - /** - * int64 gt_pos = 3 [json_name = "gtPos", (.buf.validate.field) = { ... } - * @return The gtPos. - */ - long getGtPos(); - - /** - * int64 gt_neg = 4 [json_name = "gtNeg", (.buf.validate.field) = { ... } - * @return The gtNeg. - */ - long getGtNeg(); - - /** - * int64 lte_pos = 5 [json_name = "ltePos", (.buf.validate.field) = { ... } - * @return The ltePos. - */ - long getLtePos(); - - /** - * int64 lte_neg = 6 [json_name = "lteNeg", (.buf.validate.field) = { ... } - * @return The lteNeg. - */ - long getLteNeg(); - - /** - * int64 gte_pos = 7 [json_name = "gtePos", (.buf.validate.field) = { ... } - * @return The gtePos. - */ - long getGtePos(); - - /** - * int64 gte_neg = 8 [json_name = "gteNeg", (.buf.validate.field) = { ... } - * @return The gteNeg. - */ - long getGteNeg(); - - /** - * int64 constant_pos = 9 [json_name = "constantPos", (.buf.validate.field) = { ... } - * @return The constantPos. - */ - long getConstantPos(); - - /** - * int64 constant_neg = 10 [json_name = "constantNeg", (.buf.validate.field) = { ... } - * @return The constantNeg. - */ - long getConstantNeg(); - - /** - * int64 in = 11 [json_name = "in", (.buf.validate.field) = { ... } - * @return The in. - */ - long getIn(); - - /** - * int64 notin = 12 [json_name = "notin", (.buf.validate.field) = { ... } - * @return The notin. - */ - long getNotin(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Const.java deleted file mode 100644 index 68a1936f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Const.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64Const} - */ -public final class Int64Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64Const) - Int64ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64Const.class.getName()); - } - // Use Int64Const.newBuilder() to construct. - private Int64Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64Const.class, build.buf.validate.conformance.cases.Int64Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64Const other = (build.buf.validate.conformance.cases.Int64Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Const 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.Int64Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Const 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.Int64Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Const 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.Int64Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64Const 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.Int64Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64Const 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.Int64Const 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.Int64Const 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.Int64Const 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.Int64Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64Const) - build.buf.validate.conformance.cases.Int64ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64Const.class, build.buf.validate.conformance.cases.Int64Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Const build() { - build.buf.validate.conformance.cases.Int64Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Const buildPartial() { - build.buf.validate.conformance.cases.Int64Const result = new build.buf.validate.conformance.cases.Int64Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64Const) { - return mergeFrom((build.buf.validate.conformance.cases.Int64Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64Const other) { - if (other == build.buf.validate.conformance.cases.Int64Const.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64Const) - private static final build.buf.validate.conformance.cases.Int64Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64Const(); - } - - public static build.buf.validate.conformance.cases.Int64Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64Const 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.Int64Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ConstOrBuilder.java deleted file mode 100644 index 35ed1946..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64Const) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTE.java deleted file mode 100644 index d5a22841..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64ExGTELTE} - */ -public final class Int64ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64ExGTELTE) - Int64ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64ExGTELTE.class.getName()); - } - // Use Int64ExGTELTE.newBuilder() to construct. - private Int64ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64ExGTELTE.class, build.buf.validate.conformance.cases.Int64ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64ExGTELTE other = (build.buf.validate.conformance.cases.Int64ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64ExGTELTE 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.Int64ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64ExGTELTE 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.Int64ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64ExGTELTE 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.Int64ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64ExGTELTE 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.Int64ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64ExGTELTE 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.Int64ExGTELTE 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.Int64ExGTELTE 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.Int64ExGTELTE 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.Int64ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64ExGTELTE) - build.buf.validate.conformance.cases.Int64ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64ExGTELTE.class, build.buf.validate.conformance.cases.Int64ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64ExGTELTE build() { - build.buf.validate.conformance.cases.Int64ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.Int64ExGTELTE result = new build.buf.validate.conformance.cases.Int64ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int64ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.Int64ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64ExGTELTE) - private static final build.buf.validate.conformance.cases.Int64ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.Int64ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64ExGTELTE 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.Int64ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTEOrBuilder.java deleted file mode 100644 index b15438bb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGT.java deleted file mode 100644 index 285622c3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64ExLTGT} - */ -public final class Int64ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64ExLTGT) - Int64ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64ExLTGT.class.getName()); - } - // Use Int64ExLTGT.newBuilder() to construct. - private Int64ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64ExLTGT.class, build.buf.validate.conformance.cases.Int64ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64ExLTGT other = (build.buf.validate.conformance.cases.Int64ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64ExLTGT 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.Int64ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64ExLTGT 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.Int64ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64ExLTGT 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.Int64ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64ExLTGT 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.Int64ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64ExLTGT 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.Int64ExLTGT 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.Int64ExLTGT 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.Int64ExLTGT 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.Int64ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64ExLTGT) - build.buf.validate.conformance.cases.Int64ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64ExLTGT.class, build.buf.validate.conformance.cases.Int64ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64ExLTGT build() { - build.buf.validate.conformance.cases.Int64ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64ExLTGT buildPartial() { - build.buf.validate.conformance.cases.Int64ExLTGT result = new build.buf.validate.conformance.cases.Int64ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.Int64ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64ExLTGT other) { - if (other == build.buf.validate.conformance.cases.Int64ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64ExLTGT) - private static final build.buf.validate.conformance.cases.Int64ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64ExLTGT(); - } - - public static build.buf.validate.conformance.cases.Int64ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64ExLTGT 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.Int64ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGTOrBuilder.java deleted file mode 100644 index 0a0c20ed..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Example.java deleted file mode 100644 index 770756e1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Example.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64Example} - */ -public final class Int64Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64Example) - Int64ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64Example.class.getName()); - } - // Use Int64Example.newBuilder() to construct. - private Int64Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64Example.class, build.buf.validate.conformance.cases.Int64Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64Example other = (build.buf.validate.conformance.cases.Int64Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Example 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.Int64Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Example 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.Int64Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Example 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.Int64Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64Example 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.Int64Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64Example 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.Int64Example 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.Int64Example 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.Int64Example 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.Int64Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64Example) - build.buf.validate.conformance.cases.Int64ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64Example.class, build.buf.validate.conformance.cases.Int64Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Example build() { - build.buf.validate.conformance.cases.Int64Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Example buildPartial() { - build.buf.validate.conformance.cases.Int64Example result = new build.buf.validate.conformance.cases.Int64Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64Example) { - return mergeFrom((build.buf.validate.conformance.cases.Int64Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64Example other) { - if (other == build.buf.validate.conformance.cases.Int64Example.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64Example) - private static final build.buf.validate.conformance.cases.Int64Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64Example(); - } - - public static build.buf.validate.conformance.cases.Int64Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64Example 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.Int64Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExampleOrBuilder.java deleted file mode 100644 index 7118f7b3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64Example) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GT.java deleted file mode 100644 index a763ca9a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64GT} - */ -public final class Int64GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64GT) - Int64GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64GT.class.getName()); - } - // Use Int64GT.newBuilder() to construct. - private Int64GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GT.class, build.buf.validate.conformance.cases.Int64GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64GT other = (build.buf.validate.conformance.cases.Int64GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GT 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.Int64GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GT 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.Int64GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GT 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.Int64GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64GT 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.Int64GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64GT 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.Int64GT 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.Int64GT 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.Int64GT 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.Int64GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64GT) - build.buf.validate.conformance.cases.Int64GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GT.class, build.buf.validate.conformance.cases.Int64GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GT build() { - build.buf.validate.conformance.cases.Int64GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GT buildPartial() { - build.buf.validate.conformance.cases.Int64GT result = new build.buf.validate.conformance.cases.Int64GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64GT) { - return mergeFrom((build.buf.validate.conformance.cases.Int64GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64GT other) { - if (other == build.buf.validate.conformance.cases.Int64GT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64GT) - private static final build.buf.validate.conformance.cases.Int64GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64GT(); - } - - public static build.buf.validate.conformance.cases.Int64GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64GT 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.Int64GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTE.java deleted file mode 100644 index 7bfd6c1d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64GTE} - */ -public final class Int64GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64GTE) - Int64GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64GTE.class.getName()); - } - // Use Int64GTE.newBuilder() to construct. - private Int64GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GTE.class, build.buf.validate.conformance.cases.Int64GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64GTE other = (build.buf.validate.conformance.cases.Int64GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTE 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.Int64GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTE 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.Int64GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTE 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.Int64GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64GTE 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.Int64GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64GTE 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.Int64GTE 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.Int64GTE 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.Int64GTE 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.Int64GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64GTE) - build.buf.validate.conformance.cases.Int64GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GTE.class, build.buf.validate.conformance.cases.Int64GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTE build() { - build.buf.validate.conformance.cases.Int64GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTE buildPartial() { - build.buf.validate.conformance.cases.Int64GTE result = new build.buf.validate.conformance.cases.Int64GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64GTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int64GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64GTE other) { - if (other == build.buf.validate.conformance.cases.Int64GTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64GTE) - private static final build.buf.validate.conformance.cases.Int64GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64GTE(); - } - - public static build.buf.validate.conformance.cases.Int64GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64GTE 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.Int64GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTE.java deleted file mode 100644 index 2a63f9b1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64GTELTE} - */ -public final class Int64GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64GTELTE) - Int64GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64GTELTE.class.getName()); - } - // Use Int64GTELTE.newBuilder() to construct. - private Int64GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GTELTE.class, build.buf.validate.conformance.cases.Int64GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64GTELTE other = (build.buf.validate.conformance.cases.Int64GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTELTE 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.Int64GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTELTE 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.Int64GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTELTE 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.Int64GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64GTELTE 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.Int64GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64GTELTE 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.Int64GTELTE 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.Int64GTELTE 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.Int64GTELTE 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.Int64GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64GTELTE) - build.buf.validate.conformance.cases.Int64GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GTELTE.class, build.buf.validate.conformance.cases.Int64GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTELTE build() { - build.buf.validate.conformance.cases.Int64GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTELTE buildPartial() { - build.buf.validate.conformance.cases.Int64GTELTE result = new build.buf.validate.conformance.cases.Int64GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int64GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64GTELTE other) { - if (other == build.buf.validate.conformance.cases.Int64GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64GTELTE) - private static final build.buf.validate.conformance.cases.Int64GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64GTELTE(); - } - - public static build.buf.validate.conformance.cases.Int64GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64GTELTE 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.Int64GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTEOrBuilder.java deleted file mode 100644 index 94d51c2f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTEOrBuilder.java deleted file mode 100644 index 8e89d19e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLT.java deleted file mode 100644 index 941db93d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64GTLT} - */ -public final class Int64GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64GTLT) - Int64GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64GTLT.class.getName()); - } - // Use Int64GTLT.newBuilder() to construct. - private Int64GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GTLT.class, build.buf.validate.conformance.cases.Int64GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64GTLT other = (build.buf.validate.conformance.cases.Int64GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTLT 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.Int64GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTLT 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.Int64GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64GTLT 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.Int64GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64GTLT 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.Int64GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64GTLT 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.Int64GTLT 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.Int64GTLT 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.Int64GTLT 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.Int64GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64GTLT) - build.buf.validate.conformance.cases.Int64GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64GTLT.class, build.buf.validate.conformance.cases.Int64GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTLT build() { - build.buf.validate.conformance.cases.Int64GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64GTLT buildPartial() { - build.buf.validate.conformance.cases.Int64GTLT result = new build.buf.validate.conformance.cases.Int64GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.Int64GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64GTLT other) { - if (other == build.buf.validate.conformance.cases.Int64GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64GTLT) - private static final build.buf.validate.conformance.cases.Int64GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64GTLT(); - } - - public static build.buf.validate.conformance.cases.Int64GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64GTLT 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.Int64GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLTOrBuilder.java deleted file mode 100644 index 9a439258..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTOrBuilder.java deleted file mode 100644 index 5a8e1fa4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64GT) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Ignore.java deleted file mode 100644 index 446a0e98..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64Ignore.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64Ignore} - */ -public final class Int64Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64Ignore) - Int64IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64Ignore.class.getName()); - } - // Use Int64Ignore.newBuilder() to construct. - private Int64Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64Ignore.class, build.buf.validate.conformance.cases.Int64Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64Ignore other = (build.buf.validate.conformance.cases.Int64Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Ignore 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.Int64Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Ignore 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.Int64Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64Ignore 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.Int64Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64Ignore 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.Int64Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64Ignore 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.Int64Ignore 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.Int64Ignore 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.Int64Ignore 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.Int64Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64Ignore) - build.buf.validate.conformance.cases.Int64IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64Ignore.class, build.buf.validate.conformance.cases.Int64Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Ignore build() { - build.buf.validate.conformance.cases.Int64Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64Ignore buildPartial() { - build.buf.validate.conformance.cases.Int64Ignore result = new build.buf.validate.conformance.cases.Int64Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.Int64Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64Ignore other) { - if (other == build.buf.validate.conformance.cases.Int64Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64Ignore) - private static final build.buf.validate.conformance.cases.Int64Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64Ignore(); - } - - public static build.buf.validate.conformance.cases.Int64Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64Ignore 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.Int64Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IgnoreOrBuilder.java deleted file mode 100644 index 348f715a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64In.java deleted file mode 100644 index 8426ed90..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64In.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64In} - */ -public final class Int64In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64In) - Int64InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64In.class.getName()); - } - // Use Int64In.newBuilder() to construct. - private Int64In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64In.class, build.buf.validate.conformance.cases.Int64In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64In other = (build.buf.validate.conformance.cases.Int64In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64In 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.Int64In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64In 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.Int64In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64In 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.Int64In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64In 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.Int64In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64In 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.Int64In 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.Int64In 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.Int64In 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.Int64In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64In) - build.buf.validate.conformance.cases.Int64InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64In.class, build.buf.validate.conformance.cases.Int64In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64In build() { - build.buf.validate.conformance.cases.Int64In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64In buildPartial() { - build.buf.validate.conformance.cases.Int64In result = new build.buf.validate.conformance.cases.Int64In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64In) { - return mergeFrom((build.buf.validate.conformance.cases.Int64In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64In other) { - if (other == build.buf.validate.conformance.cases.Int64In.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64In) - private static final build.buf.validate.conformance.cases.Int64In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64In(); - } - - public static build.buf.validate.conformance.cases.Int64In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64In 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.Int64In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64InOrBuilder.java deleted file mode 100644 index e1d55ad5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64In) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectType.java deleted file mode 100644 index deacf23d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectType.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64IncorrectType} - */ -public final class Int64IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64IncorrectType) - Int64IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64IncorrectType.class.getName()); - } - // Use Int64IncorrectType.newBuilder() to construct. - private Int64IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64IncorrectType.class, build.buf.validate.conformance.cases.Int64IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64IncorrectType other = (build.buf.validate.conformance.cases.Int64IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64IncorrectType 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.Int64IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64IncorrectType 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.Int64IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64IncorrectType 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.Int64IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64IncorrectType 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.Int64IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64IncorrectType 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.Int64IncorrectType 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.Int64IncorrectType 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.Int64IncorrectType 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.Int64IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64IncorrectType) - build.buf.validate.conformance.cases.Int64IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64IncorrectType.class, build.buf.validate.conformance.cases.Int64IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64IncorrectType build() { - build.buf.validate.conformance.cases.Int64IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64IncorrectType buildPartial() { - build.buf.validate.conformance.cases.Int64IncorrectType result = new build.buf.validate.conformance.cases.Int64IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.Int64IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64IncorrectType other) { - if (other == build.buf.validate.conformance.cases.Int64IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64IncorrectType) - private static final build.buf.validate.conformance.cases.Int64IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64IncorrectType(); - } - - public static build.buf.validate.conformance.cases.Int64IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64IncorrectType 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.Int64IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectTypeOrBuilder.java deleted file mode 100644 index 23d691bd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LT.java deleted file mode 100644 index a6875c2d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64LT} - */ -public final class Int64LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64LT) - Int64LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64LT.class.getName()); - } - // Use Int64LT.newBuilder() to construct. - private Int64LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64LT.class, build.buf.validate.conformance.cases.Int64LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64LT other = (build.buf.validate.conformance.cases.Int64LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LT 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.Int64LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LT 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.Int64LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LT 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.Int64LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64LT 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.Int64LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64LT 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.Int64LT 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.Int64LT 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.Int64LT 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.Int64LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64LT) - build.buf.validate.conformance.cases.Int64LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64LT.class, build.buf.validate.conformance.cases.Int64LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LT build() { - build.buf.validate.conformance.cases.Int64LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LT buildPartial() { - build.buf.validate.conformance.cases.Int64LT result = new build.buf.validate.conformance.cases.Int64LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64LT) { - return mergeFrom((build.buf.validate.conformance.cases.Int64LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64LT other) { - if (other == build.buf.validate.conformance.cases.Int64LT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64LT) - private static final build.buf.validate.conformance.cases.Int64LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64LT(); - } - - public static build.buf.validate.conformance.cases.Int64LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64LT 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.Int64LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTE.java deleted file mode 100644 index 6131bf70..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64LTE} - */ -public final class Int64LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64LTE) - Int64LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64LTE.class.getName()); - } - // Use Int64LTE.newBuilder() to construct. - private Int64LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64LTE.class, build.buf.validate.conformance.cases.Int64LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64LTE other = (build.buf.validate.conformance.cases.Int64LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LTE 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.Int64LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LTE 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.Int64LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LTE 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.Int64LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64LTE 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.Int64LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64LTE 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.Int64LTE 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.Int64LTE 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.Int64LTE 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.Int64LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64LTE) - build.buf.validate.conformance.cases.Int64LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64LTE.class, build.buf.validate.conformance.cases.Int64LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LTE build() { - build.buf.validate.conformance.cases.Int64LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LTE buildPartial() { - build.buf.validate.conformance.cases.Int64LTE result = new build.buf.validate.conformance.cases.Int64LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64LTE) { - return mergeFrom((build.buf.validate.conformance.cases.Int64LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64LTE other) { - if (other == build.buf.validate.conformance.cases.Int64LTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64LTE) - private static final build.buf.validate.conformance.cases.Int64LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64LTE(); - } - - public static build.buf.validate.conformance.cases.Int64LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64LTE 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.Int64LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptional.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptional.java deleted file mode 100644 index bf550305..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptional.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64LTEOptional} - */ -public final class Int64LTEOptional extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64LTEOptional) - Int64LTEOptionalOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64LTEOptional.class.getName()); - } - // Use Int64LTEOptional.newBuilder() to construct. - private Int64LTEOptional(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64LTEOptional() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTEOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTEOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64LTEOptional.class, build.buf.validate.conformance.cases.Int64LTEOptional.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * optional int64 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 int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeInt64(1, val_); - } - 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 - .computeInt64Size(1, val_); - } - 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.Int64LTEOptional)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64LTEOptional other = (build.buf.validate.conformance.cases.Int64LTEOptional) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64LTEOptional parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LTEOptional 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.Int64LTEOptional parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LTEOptional 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.Int64LTEOptional parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64LTEOptional 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.Int64LTEOptional parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64LTEOptional 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.Int64LTEOptional parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64LTEOptional 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.Int64LTEOptional 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.Int64LTEOptional 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.Int64LTEOptional 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.Int64LTEOptional} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64LTEOptional) - build.buf.validate.conformance.cases.Int64LTEOptionalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTEOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTEOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64LTEOptional.class, build.buf.validate.conformance.cases.Int64LTEOptional.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64LTEOptional.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64LTEOptional_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LTEOptional getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64LTEOptional.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LTEOptional build() { - build.buf.validate.conformance.cases.Int64LTEOptional result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64LTEOptional buildPartial() { - build.buf.validate.conformance.cases.Int64LTEOptional result = new build.buf.validate.conformance.cases.Int64LTEOptional(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64LTEOptional result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Int64LTEOptional) { - return mergeFrom((build.buf.validate.conformance.cases.Int64LTEOptional)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64LTEOptional other) { - if (other == build.buf.validate.conformance.cases.Int64LTEOptional.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * optional int64 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 int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64LTEOptional) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64LTEOptional) - private static final build.buf.validate.conformance.cases.Int64LTEOptional DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64LTEOptional(); - } - - public static build.buf.validate.conformance.cases.Int64LTEOptional getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64LTEOptional 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.Int64LTEOptional getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptionalOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptionalOrBuilder.java deleted file mode 100644 index 785e8d28..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOptionalOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64LTEOptionalOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64LTEOptional) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOrBuilder.java deleted file mode 100644 index 1f8e05fc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTOrBuilder.java deleted file mode 100644 index 936a4237..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64LT) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64None.java deleted file mode 100644 index 9d1f9dd3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64None.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64None} - */ -public final class Int64None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64None) - Int64NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64None.class.getName()); - } - // Use Int64None.newBuilder() to construct. - private Int64None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64None.class, build.buf.validate.conformance.cases.Int64None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64None other = (build.buf.validate.conformance.cases.Int64None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64None 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.Int64None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64None 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.Int64None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64None 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.Int64None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64None 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.Int64None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64None 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.Int64None 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.Int64None 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.Int64None 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.Int64None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64None) - build.buf.validate.conformance.cases.Int64NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64None.class, build.buf.validate.conformance.cases.Int64None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64None build() { - build.buf.validate.conformance.cases.Int64None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64None buildPartial() { - build.buf.validate.conformance.cases.Int64None result = new build.buf.validate.conformance.cases.Int64None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64None) { - return mergeFrom((build.buf.validate.conformance.cases.Int64None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64None other) { - if (other == build.buf.validate.conformance.cases.Int64None.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64None) - private static final build.buf.validate.conformance.cases.Int64None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64None(); - } - - public static build.buf.validate.conformance.cases.Int64None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64None 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.Int64None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NoneOrBuilder.java deleted file mode 100644 index 67977cfb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64None) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val"]; - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotIn.java deleted file mode 100644 index c8beb2d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Int64NotIn} - */ -public final class Int64NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Int64NotIn) - Int64NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64NotIn.class.getName()); - } - // Use Int64NotIn.newBuilder() to construct. - private Int64NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Int64NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64NotIn.class, build.buf.validate.conformance.cases.Int64NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.Int64NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Int64NotIn other = (build.buf.validate.conformance.cases.Int64NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Int64NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64NotIn 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.Int64NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64NotIn 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.Int64NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Int64NotIn 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.Int64NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Int64NotIn 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.Int64NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Int64NotIn 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.Int64NotIn 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.Int64NotIn 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.Int64NotIn 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.Int64NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Int64NotIn) - build.buf.validate.conformance.cases.Int64NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Int64NotIn.class, build.buf.validate.conformance.cases.Int64NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Int64NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_Int64NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Int64NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64NotIn build() { - build.buf.validate.conformance.cases.Int64NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Int64NotIn buildPartial() { - build.buf.validate.conformance.cases.Int64NotIn result = new build.buf.validate.conformance.cases.Int64NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Int64NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Int64NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.Int64NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Int64NotIn other) { - if (other == build.buf.validate.conformance.cases.Int64NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Int64NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Int64NotIn) - private static final build.buf.validate.conformance.cases.Int64NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Int64NotIn(); - } - - public static build.buf.validate.conformance.cases.Int64NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64NotIn 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.Int64NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotInOrBuilder.java deleted file mode 100644 index 0f888484..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Int64NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Int64NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Int64NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessage.java b/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessage.java deleted file mode 100644 index 8fbc4a78..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessage.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/kitchen_sink.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.KitchenSinkMessage} - */ -public final class KitchenSinkMessage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.KitchenSinkMessage) - KitchenSinkMessageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - KitchenSinkMessage.class.getName()); - } - // Use KitchenSinkMessage.newBuilder() to construct. - private KitchenSinkMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private KitchenSinkMessage() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_KitchenSinkMessage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_KitchenSinkMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.KitchenSinkMessage.class, build.buf.validate.conformance.cases.KitchenSinkMessage.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.ComplexTestMsg val_; - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.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.KitchenSinkMessage)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.KitchenSinkMessage other = (build.buf.validate.conformance.cases.KitchenSinkMessage) 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.KitchenSinkMessage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.KitchenSinkMessage 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.KitchenSinkMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.KitchenSinkMessage 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.KitchenSinkMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.KitchenSinkMessage 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.KitchenSinkMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.KitchenSinkMessage 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.KitchenSinkMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.KitchenSinkMessage 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.KitchenSinkMessage 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.KitchenSinkMessage 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.KitchenSinkMessage 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.KitchenSinkMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.KitchenSinkMessage) - build.buf.validate.conformance.cases.KitchenSinkMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_KitchenSinkMessage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.KitchenSinkProto.internal_static_buf_validate_conformance_cases_KitchenSinkMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.KitchenSinkMessage.class, build.buf.validate.conformance.cases.KitchenSinkMessage.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.KitchenSinkMessage.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.KitchenSinkProto.internal_static_buf_validate_conformance_cases_KitchenSinkMessage_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.KitchenSinkMessage getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.KitchenSinkMessage.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.KitchenSinkMessage build() { - build.buf.validate.conformance.cases.KitchenSinkMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.KitchenSinkMessage buildPartial() { - build.buf.validate.conformance.cases.KitchenSinkMessage result = new build.buf.validate.conformance.cases.KitchenSinkMessage(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.KitchenSinkMessage 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.KitchenSinkMessage) { - return mergeFrom((build.buf.validate.conformance.cases.KitchenSinkMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.KitchenSinkMessage other) { - if (other == build.buf.validate.conformance.cases.KitchenSinkMessage.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 build.buf.validate.conformance.cases.ComplexTestMsg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - * @return The val. - */ - public build.buf.validate.conformance.cases.ComplexTestMsg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - public Builder setVal(build.buf.validate.conformance.cases.ComplexTestMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - public Builder setVal( - build.buf.validate.conformance.cases.ComplexTestMsg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - public Builder mergeVal(build.buf.validate.conformance.cases.ComplexTestMsg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.ComplexTestMsg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.ComplexTestMsg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.ComplexTestMsg, build.buf.validate.conformance.cases.ComplexTestMsg.Builder, build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.KitchenSinkMessage) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.KitchenSinkMessage) - private static final build.buf.validate.conformance.cases.KitchenSinkMessage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.KitchenSinkMessage(); - } - - public static build.buf.validate.conformance.cases.KitchenSinkMessage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KitchenSinkMessage 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.KitchenSinkMessage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessageOrBuilder.java deleted file mode 100644 index efb6be67..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkMessageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/kitchen_sink.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface KitchenSinkMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.KitchenSinkMessage) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - * @return The val. - */ - build.buf.validate.conformance.cases.ComplexTestMsg getVal(); - /** - * .buf.validate.conformance.cases.ComplexTestMsg val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.ComplexTestMsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkProto.java deleted file mode 100644 index 62f7e90f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/KitchenSinkProto.java +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/kitchen_sink.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class KitchenSinkProto { - private KitchenSinkProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - KitchenSinkProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_ComplexTestMsg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_ComplexTestMsg_MapValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_ComplexTestMsg_MapValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_KitchenSinkMessage_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_KitchenSinkMessage_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1buf/validate/conformance/cases/kitchen" + - "_sink.proto\022\036buf.validate.conformance.ca" + - "ses\032\033buf/validate/validate.proto\032\031google" + - "/protobuf/any.proto\032\036google/protobuf/dur" + - "ation.proto\032\037google/protobuf/timestamp.p" + - "roto\032\036google/protobuf/wrappers.proto\"\274\010\n" + - "\016ComplexTestMsg\022!\n\005const\030\001 \001(\tB\013\272H\010r\006\n\004a" + - "bcdR\005const\022F\n\006nested\030\002 \001(\0132..buf.validat" + - "e.conformance.cases.ComplexTestMsgR\006nest" + - "ed\022$\n\tint_const\030\003 \001(\005B\007\272H\004\032\002\010\005R\010intConst" + - "\022&\n\nbool_const\030\004 \001(\010B\007\272H\004j\002\010\000R\tboolConst" + - "\022D\n\tfloat_val\030\005 \001(\0132\033.google.protobuf.Fl" + - "oatValueB\n\272H\007\n\005%\000\000\000\000R\010floatVal\022A\n\007dur_va" + - "l\030\006 \001(\0132\031.google.protobuf.DurationB\r\272H\n\252" + - "\001\004\032\002\010\021\310\001\001R\006durVal\022=\n\006ts_val\030\007 \001(\0132\032.goog" + - "le.protobuf.TimestampB\n\272H\007\262\001\004*\002\010\007R\005tsVal" + - "\022H\n\007another\030\010 \001(\0132..buf.validate.conform" + - "ance.cases.ComplexTestMsgR\007another\022+\n\013fl" + - "oat_const\030\t \001(\002B\n\272H\007\n\005\025\000\000\000AR\nfloatConst\022" + - "4\n\tdouble_in\030\n \001(\001B\027\272H\024\022\0221\264\310v\276\237\214|@1\000\000\000\000\000" + - "\300^@R\010doubleIn\022X\n\nenum_const\030\013 \001(\0162/.buf." + - "validate.conformance.cases.ComplexTestEn" + - "umB\010\272H\005\202\001\002\010\002R\tenumConst\022c\n\007any_val\030\014 \001(\013" + - "2\024.google.protobuf.AnyB4\272H1\242\001.\022,type.goo" + - "gleapis.com/google.protobuf.DurationR\006an" + - "yVal\022K\n\nrep_ts_val\030\r \003(\0132\032.google.protob" + - "uf.TimestampB\021\272H\016\222\001\013\"\t\262\001\0062\004\020\300\204=R\010repTsVa" + - "l\022a\n\007map_val\030\016 \003(\0132:.buf.validate.confor" + - "mance.cases.ComplexTestMsg.MapValEntryB\014" + - "\272H\t\232\001\006\"\004:\002\020\000R\006mapVal\022&\n\tbytes_val\030\017 \001(\014B" + - "\t\272H\006z\004\n\002\000\231R\010bytesVal\022\016\n\001x\030\020 \001(\tH\000R\001x\022\016\n\001" + - "y\030\021 \001(\005H\000R\001y\0329\n\013MapValEntry\022\020\n\003key\030\001 \001(\021" + - "R\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001B\n\n\001o\022\005\272H" + - "\002\010\001\"V\n\022KitchenSinkMessage\022@\n\003val\030\001 \001(\0132." + - ".buf.validate.conformance.cases.ComplexT" + - "estMsgR\003val*j\n\017ComplexTestEnum\022!\n\035COMPLE" + - "X_TEST_ENUM_UNSPECIFIED\020\000\022\031\n\025COMPLEX_TES" + - "T_ENUM_ONE\020\001\022\031\n\025COMPLEX_TEST_ENUM_TWO\020\002B" + - "\324\001\n$build.buf.validate.conformance.cases" + - "B\020KitchenSinkProtoP\001\242\002\004BVCC\252\002\036Buf.Valida" + - "te.Conformance.Cases\312\002\036Buf\\Validate\\Conf" + - "ormance\\Cases\342\002*Buf\\Validate\\Conformance" + - "\\Cases\\GPBMetadata\352\002!Buf::Validate::Conf" + - "ormance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_ComplexTestMsg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor, - new java.lang.String[] { "Const", "Nested", "IntConst", "BoolConst", "FloatVal", "DurVal", "TsVal", "Another", "FloatConst", "DoubleIn", "EnumConst", "AnyVal", "RepTsVal", "MapVal", "BytesVal", "X", "Y", "O", }); - internal_static_buf_validate_conformance_cases_ComplexTestMsg_MapValEntry_descriptor = - internal_static_buf_validate_conformance_cases_ComplexTestMsg_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_ComplexTestMsg_MapValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_ComplexTestMsg_MapValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_KitchenSinkMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_KitchenSinkMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_KitchenSinkMessage_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.AnyProto.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.ValidateProto.field); - registry.add(build.buf.validate.ValidateProto.oneof); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefined.java deleted file mode 100644 index c8611a5d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefined.java +++ /dev/null @@ -1,785 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapEnumDefined} - */ -public final class MapEnumDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapEnumDefined) - MapEnumDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapEnumDefined.class.getName()); - } - // Use MapEnumDefined.newBuilder() to construct. - private MapEnumDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapEnumDefined() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapEnumDefined.class, build.buf.validate.conformance.cases.MapEnumDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapEnumDefined_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.ENUM, - build.buf.validate.conformance.cases.TestEnum.TEST_ENUM_UNSPECIFIED.getNumber()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private static final - com.google.protobuf.Internal.MapAdapter.Converter< - java.lang.Integer, build.buf.validate.conformance.cases.TestEnum> valValueConverter = - com.google.protobuf.Internal.MapAdapter.newEnumConverter( - build.buf.validate.conformance.cases.TestEnum.internalGetValueMap(), - build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED); - private static final java.util.Map - internalGetAdaptedValMap( - java.util.Map map) { - return new com.google.protobuf.Internal.MapAdapter< - java.lang.String, build.buf.validate.conformance.cases.TestEnum, java.lang.Integer>( - map, valValueConverter); - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getVal() { - return getValMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValMap() { - return internalGetAdaptedValMap( - internalGetVal().getMap());} - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.cases.TestEnum getValOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.cases.TestEnum defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) - ? valValueConverter.doForward(map.get(key)) - : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return valValueConverter.doForward(map.get(key)); - } - /** - * Use {@link #getValValueMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getValValue() { - return getValValueMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValValueMap() { - return internalGetVal().getMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrDefault( - java.lang.String key, - int defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapEnumDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapEnumDefined other = (build.buf.validate.conformance.cases.MapEnumDefined) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapEnumDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapEnumDefined 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.MapEnumDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapEnumDefined 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.MapEnumDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapEnumDefined 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.MapEnumDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapEnumDefined 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.MapEnumDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapEnumDefined 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.MapEnumDefined 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.MapEnumDefined 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.MapEnumDefined 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.MapEnumDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapEnumDefined) - build.buf.validate.conformance.cases.MapEnumDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapEnumDefined.class, build.buf.validate.conformance.cases.MapEnumDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapEnumDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapEnumDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapEnumDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapEnumDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapEnumDefined build() { - build.buf.validate.conformance.cases.MapEnumDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapEnumDefined buildPartial() { - build.buf.validate.conformance.cases.MapEnumDefined result = new build.buf.validate.conformance.cases.MapEnumDefined(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapEnumDefined result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapEnumDefined) { - return mergeFrom((build.buf.validate.conformance.cases.MapEnumDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapEnumDefined other) { - if (other == build.buf.validate.conformance.cases.MapEnumDefined.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getVal() { - return getValMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValMap() { - return internalGetAdaptedValMap( - internalGetVal().getMap());} - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.cases.TestEnum getValOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.cases.TestEnum defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) - ? valValueConverter.doForward(map.get(key)) - : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return valValueConverter.doForward(map.get(key)); - } - /** - * Use {@link #getValValueMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getValValue() { - return getValValueMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValValueMap() { - return internalGetVal().getMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrDefault( - java.lang.String key, - int defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetAdaptedValMap( - internalGetMutableVal().getMutableMap()); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - build.buf.validate.conformance.cases.TestEnum value) { - if (key == null) { throw new NullPointerException("map key"); } - - internalGetMutableVal().getMutableMap() - .put(key, valValueConverter.doBackward(value)); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetAdaptedValMap( - internalGetMutableVal().getMutableMap()) - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableValValue() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putValValue( - java.lang.String key, - int value) { - if (key == null) { throw new NullPointerException("map key"); } - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllValValue( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapEnumDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapEnumDefined) - private static final build.buf.validate.conformance.cases.MapEnumDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapEnumDefined(); - } - - public static build.buf.validate.conformance.cases.MapEnumDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapEnumDefined 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.MapEnumDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefinedOrBuilder.java deleted file mode 100644 index 61fab67f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapEnumDefinedOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapEnumDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapEnumDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -build.buf.validate.conformance.cases.TestEnum getValOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.cases.TestEnum defaultValue); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.TestEnum getValOrThrow( - java.lang.String key); - /** - * Use {@link #getValValueMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getValValue(); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValValueMap(); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValValueOrDefault( - java.lang.String key, - int defaultValue); - /** - * map<string, .buf.validate.conformance.cases.TestEnum> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValValueOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExact.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapExact.java deleted file mode 100644 index d0d78e4e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExact.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapExact} - */ -public final class MapExact extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapExact) - MapExactOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapExact.class.getName()); - } - // Use MapExact.newBuilder() to construct. - private MapExact(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapExact() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExact_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapExact.class, build.buf.validate.conformance.cases.MapExact.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Long, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExact_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT64, - 0L, - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Long, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeLongMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapExact)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapExact other = (build.buf.validate.conformance.cases.MapExact) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapExact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExact 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.MapExact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExact 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.MapExact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExact 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.MapExact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapExact 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.MapExact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapExact 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.MapExact 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.MapExact 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.MapExact 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.MapExact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapExact) - build.buf.validate.conformance.cases.MapExactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExact_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapExact.class, build.buf.validate.conformance.cases.MapExact.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapExact.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExact_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExact getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapExact.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExact build() { - build.buf.validate.conformance.cases.MapExact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExact buildPartial() { - build.buf.validate.conformance.cases.MapExact result = new build.buf.validate.conformance.cases.MapExact(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapExact result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapExact) { - return mergeFrom((build.buf.validate.conformance.cases.MapExact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapExact other) { - if (other == build.buf.validate.conformance.cases.MapExact.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Long, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - long key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - long key, - java.lang.String value) { - - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapExact) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapExact) - private static final build.buf.validate.conformance.cases.MapExact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapExact(); - } - - public static build.buf.validate.conformance.cases.MapExact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapExact 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.MapExact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnore.java deleted file mode 100644 index 8cc9e280..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnore.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapExactIgnore} - */ -public final class MapExactIgnore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapExactIgnore) - MapExactIgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapExactIgnore.class.getName()); - } - // Use MapExactIgnore.newBuilder() to construct. - private MapExactIgnore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapExactIgnore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExactIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapExactIgnore.class, build.buf.validate.conformance.cases.MapExactIgnore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Long, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExactIgnore_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT64, - 0L, - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Long, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeLongMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapExactIgnore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapExactIgnore other = (build.buf.validate.conformance.cases.MapExactIgnore) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapExactIgnore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExactIgnore 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.MapExactIgnore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExactIgnore 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.MapExactIgnore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExactIgnore 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.MapExactIgnore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapExactIgnore 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.MapExactIgnore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapExactIgnore 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.MapExactIgnore 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.MapExactIgnore 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.MapExactIgnore 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.MapExactIgnore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapExactIgnore) - build.buf.validate.conformance.cases.MapExactIgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExactIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapExactIgnore.class, build.buf.validate.conformance.cases.MapExactIgnore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapExactIgnore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExactIgnore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapExactIgnore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExactIgnore build() { - build.buf.validate.conformance.cases.MapExactIgnore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExactIgnore buildPartial() { - build.buf.validate.conformance.cases.MapExactIgnore result = new build.buf.validate.conformance.cases.MapExactIgnore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapExactIgnore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapExactIgnore) { - return mergeFrom((build.buf.validate.conformance.cases.MapExactIgnore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapExactIgnore other) { - if (other == build.buf.validate.conformance.cases.MapExactIgnore.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Long, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - long key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - long key, - java.lang.String value) { - - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapExactIgnore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapExactIgnore) - private static final build.buf.validate.conformance.cases.MapExactIgnore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapExactIgnore(); - } - - public static build.buf.validate.conformance.cases.MapExactIgnore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapExactIgnore 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.MapExactIgnore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnoreOrBuilder.java deleted file mode 100644 index de0594ed..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactIgnoreOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapExactIgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapExactIgnore) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - long key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - long key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactOrBuilder.java deleted file mode 100644 index 5608bb35..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExactOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapExactOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapExact) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - long key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<uint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - long key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefined.java deleted file mode 100644 index 972a9a48..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefined.java +++ /dev/null @@ -1,785 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapExternalEnumDefined} - */ -public final class MapExternalEnumDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapExternalEnumDefined) - MapExternalEnumDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapExternalEnumDefined.class.getName()); - } - // Use MapExternalEnumDefined.newBuilder() to construct. - private MapExternalEnumDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapExternalEnumDefined() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapExternalEnumDefined.class, build.buf.validate.conformance.cases.MapExternalEnumDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.ENUM, - build.buf.validate.conformance.cases.other_package.Embed.Enumerated.ENUMERATED_UNSPECIFIED.getNumber()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private static final - com.google.protobuf.Internal.MapAdapter.Converter< - java.lang.Integer, build.buf.validate.conformance.cases.other_package.Embed.Enumerated> valValueConverter = - com.google.protobuf.Internal.MapAdapter.newEnumConverter( - build.buf.validate.conformance.cases.other_package.Embed.Enumerated.internalGetValueMap(), - build.buf.validate.conformance.cases.other_package.Embed.Enumerated.UNRECOGNIZED); - private static final java.util.Map - internalGetAdaptedValMap( - java.util.Map map) { - return new com.google.protobuf.Internal.MapAdapter< - java.lang.String, build.buf.validate.conformance.cases.other_package.Embed.Enumerated, java.lang.Integer>( - map, valValueConverter); - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getVal() { - return getValMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValMap() { - return internalGetAdaptedValMap( - internalGetVal().getMap());} - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.cases.other_package.Embed.Enumerated getValOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.cases.other_package.Embed.Enumerated defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) - ? valValueConverter.doForward(map.get(key)) - : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.Enumerated getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return valValueConverter.doForward(map.get(key)); - } - /** - * Use {@link #getValValueMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getValValue() { - return getValValueMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValValueMap() { - return internalGetVal().getMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrDefault( - java.lang.String key, - int defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapExternalEnumDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapExternalEnumDefined other = (build.buf.validate.conformance.cases.MapExternalEnumDefined) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapExternalEnumDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExternalEnumDefined 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.MapExternalEnumDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExternalEnumDefined 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.MapExternalEnumDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapExternalEnumDefined 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.MapExternalEnumDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapExternalEnumDefined 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.MapExternalEnumDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapExternalEnumDefined 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.MapExternalEnumDefined 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.MapExternalEnumDefined 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.MapExternalEnumDefined 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.MapExternalEnumDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapExternalEnumDefined) - build.buf.validate.conformance.cases.MapExternalEnumDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapExternalEnumDefined.class, build.buf.validate.conformance.cases.MapExternalEnumDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapExternalEnumDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_MapExternalEnumDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExternalEnumDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapExternalEnumDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExternalEnumDefined build() { - build.buf.validate.conformance.cases.MapExternalEnumDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapExternalEnumDefined buildPartial() { - build.buf.validate.conformance.cases.MapExternalEnumDefined result = new build.buf.validate.conformance.cases.MapExternalEnumDefined(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapExternalEnumDefined result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapExternalEnumDefined) { - return mergeFrom((build.buf.validate.conformance.cases.MapExternalEnumDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapExternalEnumDefined other) { - if (other == build.buf.validate.conformance.cases.MapExternalEnumDefined.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getVal() { - return getValMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValMap() { - return internalGetAdaptedValMap( - internalGetVal().getMap());} - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.cases.other_package.Embed.Enumerated getValOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.cases.other_package.Embed.Enumerated defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) - ? valValueConverter.doForward(map.get(key)) - : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.Enumerated getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return valValueConverter.doForward(map.get(key)); - } - /** - * Use {@link #getValValueMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getValValue() { - return getValValueMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map - getValValueMap() { - return internalGetVal().getMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrDefault( - java.lang.String key, - int defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValValueOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetAdaptedValMap( - internalGetMutableVal().getMutableMap()); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - build.buf.validate.conformance.cases.other_package.Embed.Enumerated value) { - if (key == null) { throw new NullPointerException("map key"); } - - internalGetMutableVal().getMutableMap() - .put(key, valValueConverter.doBackward(value)); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetAdaptedValMap( - internalGetMutableVal().getMutableMap()) - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableValValue() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putValValue( - java.lang.String key, - int value) { - if (key == null) { throw new NullPointerException("map key"); } - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllValValue( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapExternalEnumDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapExternalEnumDefined) - private static final build.buf.validate.conformance.cases.MapExternalEnumDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapExternalEnumDefined(); - } - - public static build.buf.validate.conformance.cases.MapExternalEnumDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapExternalEnumDefined 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.MapExternalEnumDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefinedOrBuilder.java deleted file mode 100644 index 46386df8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapExternalEnumDefinedOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapExternalEnumDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapExternalEnumDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -build.buf.validate.conformance.cases.other_package.Embed.Enumerated getValOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.cases.other_package.Embed.Enumerated defaultValue); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.other_package.Embed.Enumerated getValOrThrow( - java.lang.String key); - /** - * Use {@link #getValValueMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getValValue(); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValValueMap(); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValValueOrDefault( - java.lang.String key, - int defaultValue); - /** - * map<string, .buf.validate.conformance.cases.other_package.Embed.Enumerated> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValValueOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeys.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeys.java deleted file mode 100644 index 2095b43e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeys.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapKeys} - */ -public final class MapKeys extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapKeys) - MapKeysOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapKeys.class.getName()); - } - // Use MapKeys.newBuilder() to construct. - private MapKeys(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapKeys() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeys_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeys_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapKeys.class, build.buf.validate.conformance.cases.MapKeys.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Long, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeys_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.SINT64, - 0L, - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Long, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeLongMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapKeys)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapKeys other = (build.buf.validate.conformance.cases.MapKeys) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapKeys parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapKeys 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.MapKeys parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapKeys 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.MapKeys parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapKeys 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.MapKeys parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapKeys 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.MapKeys parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapKeys 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.MapKeys 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.MapKeys 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.MapKeys 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.MapKeys} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapKeys) - build.buf.validate.conformance.cases.MapKeysOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeys_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeys_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapKeys.class, build.buf.validate.conformance.cases.MapKeys.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapKeys.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeys_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapKeys getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapKeys.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapKeys build() { - build.buf.validate.conformance.cases.MapKeys result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapKeys buildPartial() { - build.buf.validate.conformance.cases.MapKeys result = new build.buf.validate.conformance.cases.MapKeys(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapKeys result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapKeys) { - return mergeFrom((build.buf.validate.conformance.cases.MapKeys)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapKeys other) { - if (other == build.buf.validate.conformance.cases.MapKeys.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Long, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - long key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - long key, - java.lang.String value) { - - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapKeys) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapKeys) - private static final build.buf.validate.conformance.cases.MapKeys DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapKeys(); - } - - public static build.buf.validate.conformance.cases.MapKeys getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapKeys 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.MapKeys getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysOrBuilder.java deleted file mode 100644 index dbd14245..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapKeysOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapKeys) - com.google.protobuf.MessageOrBuilder { - - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - long key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - long key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<sint64, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - long key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPattern.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPattern.java deleted file mode 100644 index fa94c258..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPattern.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapKeysPattern} - */ -public final class MapKeysPattern extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapKeysPattern) - MapKeysPatternOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapKeysPattern.class.getName()); - } - // Use MapKeysPattern.newBuilder() to construct. - private MapKeysPattern(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapKeysPattern() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeysPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapKeysPattern.class, build.buf.validate.conformance.cases.MapKeysPattern.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeysPattern_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapKeysPattern)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapKeysPattern other = (build.buf.validate.conformance.cases.MapKeysPattern) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapKeysPattern parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapKeysPattern 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.MapKeysPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapKeysPattern 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.MapKeysPattern parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapKeysPattern 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.MapKeysPattern parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapKeysPattern 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.MapKeysPattern parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapKeysPattern 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.MapKeysPattern 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.MapKeysPattern 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.MapKeysPattern 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.MapKeysPattern} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapKeysPattern) - build.buf.validate.conformance.cases.MapKeysPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeysPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapKeysPattern.class, build.buf.validate.conformance.cases.MapKeysPattern.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapKeysPattern.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapKeysPattern getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapKeysPattern.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapKeysPattern build() { - build.buf.validate.conformance.cases.MapKeysPattern result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapKeysPattern buildPartial() { - build.buf.validate.conformance.cases.MapKeysPattern result = new build.buf.validate.conformance.cases.MapKeysPattern(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapKeysPattern result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapKeysPattern) { - return mergeFrom((build.buf.validate.conformance.cases.MapKeysPattern)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapKeysPattern other) { - if (other == build.buf.validate.conformance.cases.MapKeysPattern.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapKeysPattern) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapKeysPattern) - private static final build.buf.validate.conformance.cases.MapKeysPattern DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapKeysPattern(); - } - - public static build.buf.validate.conformance.cases.MapKeysPattern getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapKeysPattern 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.MapKeysPattern getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPatternOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPatternOrBuilder.java deleted file mode 100644 index d052418a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapKeysPatternOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapKeysPatternOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapKeysPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMax.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapMax.java deleted file mode 100644 index b7ad2b85..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMax.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapMax} - */ -public final class MapMax extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapMax) - MapMaxOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapMax.class.getName()); - } - // Use MapMax.newBuilder() to construct. - private MapMax(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapMax() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMax_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapMax.class, build.buf.validate.conformance.cases.MapMax.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Long, java.lang.Double> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMax_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT64, - 0L, - com.google.protobuf.WireFormat.FieldType.DOUBLE, - 0D); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Long, java.lang.Double> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public double getValOrDefault( - long key, - double defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public double getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeLongMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapMax)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapMax other = (build.buf.validate.conformance.cases.MapMax) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapMax parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMax 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.MapMax parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMax 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.MapMax parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMax 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.MapMax parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapMax 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.MapMax parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapMax 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.MapMax 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.MapMax 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.MapMax 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.MapMax} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapMax) - build.buf.validate.conformance.cases.MapMaxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMax_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapMax.class, build.buf.validate.conformance.cases.MapMax.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapMax.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMax_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMax getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapMax.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMax build() { - build.buf.validate.conformance.cases.MapMax result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMax buildPartial() { - build.buf.validate.conformance.cases.MapMax result = new build.buf.validate.conformance.cases.MapMax(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapMax result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapMax) { - return mergeFrom((build.buf.validate.conformance.cases.MapMax)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapMax other) { - if (other == build.buf.validate.conformance.cases.MapMax.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Long, java.lang.Double> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public double getValOrDefault( - long key, - double defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public double getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - long key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - long key, - double value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapMax) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapMax) - private static final build.buf.validate.conformance.cases.MapMax DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapMax(); - } - - public static build.buf.validate.conformance.cases.MapMax getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapMax 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.MapMax getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMaxOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapMaxOrBuilder.java deleted file mode 100644 index 3fda2546..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMaxOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapMaxOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapMax) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - long key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - double getValOrDefault( - long key, - double defaultValue); - /** - * map<int64, double> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - double getValOrThrow( - long key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMin.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapMin.java deleted file mode 100644 index 50e6d61d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMin.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapMin} - */ -public final class MapMin extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapMin) - MapMinOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapMin.class.getName()); - } - // Use MapMin.newBuilder() to construct. - private MapMin(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapMin() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMin_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapMin.class, build.buf.validate.conformance.cases.MapMin.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Float> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMin_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.FLOAT, - 0F); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Float> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public float getValOrDefault( - int key, - float defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public float getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapMin)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapMin other = (build.buf.validate.conformance.cases.MapMin) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapMin parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMin 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.MapMin parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMin 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.MapMin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMin 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.MapMin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapMin 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.MapMin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapMin 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.MapMin 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.MapMin 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.MapMin 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.MapMin} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapMin) - build.buf.validate.conformance.cases.MapMinOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMin_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapMin.class, build.buf.validate.conformance.cases.MapMin.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapMin.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMin_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMin getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapMin.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMin build() { - build.buf.validate.conformance.cases.MapMin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMin buildPartial() { - build.buf.validate.conformance.cases.MapMin result = new build.buf.validate.conformance.cases.MapMin(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapMin result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapMin) { - return mergeFrom((build.buf.validate.conformance.cases.MapMin)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapMin other) { - if (other == build.buf.validate.conformance.cases.MapMin.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Float> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public float getValOrDefault( - int key, - float defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public float getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - float value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapMin) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapMin) - private static final build.buf.validate.conformance.cases.MapMin DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapMin(); - } - - public static build.buf.validate.conformance.cases.MapMin getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapMin 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.MapMin getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMax.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMax.java deleted file mode 100644 index 580c84c7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMax.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapMinMax} - */ -public final class MapMinMax extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapMinMax) - MapMinMaxOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapMinMax.class.getName()); - } - // Use MapMinMax.newBuilder() to construct. - private MapMinMax(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapMinMax() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMinMax_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMinMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapMinMax.class, build.buf.validate.conformance.cases.MapMinMax.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.Boolean> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMinMax_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.BOOL, - false); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.Boolean> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getValOrDefault( - java.lang.String key, - boolean defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapMinMax)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapMinMax other = (build.buf.validate.conformance.cases.MapMinMax) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapMinMax parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMinMax 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.MapMinMax parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMinMax 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.MapMinMax parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapMinMax 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.MapMinMax parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapMinMax 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.MapMinMax parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapMinMax 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.MapMinMax 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.MapMinMax 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.MapMinMax 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.MapMinMax} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapMinMax) - build.buf.validate.conformance.cases.MapMinMaxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMinMax_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMinMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapMinMax.class, build.buf.validate.conformance.cases.MapMinMax.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapMinMax.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapMinMax_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMinMax getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapMinMax.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMinMax build() { - build.buf.validate.conformance.cases.MapMinMax result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapMinMax buildPartial() { - build.buf.validate.conformance.cases.MapMinMax result = new build.buf.validate.conformance.cases.MapMinMax(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapMinMax result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapMinMax) { - return mergeFrom((build.buf.validate.conformance.cases.MapMinMax)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapMinMax other) { - if (other == build.buf.validate.conformance.cases.MapMinMax.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.Boolean> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getValOrDefault( - java.lang.String key, - boolean defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - boolean value) { - if (key == null) { throw new NullPointerException("map key"); } - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapMinMax) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapMinMax) - private static final build.buf.validate.conformance.cases.MapMinMax DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapMinMax(); - } - - public static build.buf.validate.conformance.cases.MapMinMax getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapMinMax 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.MapMinMax getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMaxOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMaxOrBuilder.java deleted file mode 100644 index 5e48e41c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinMaxOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapMinMaxOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapMinMax) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean getValOrDefault( - java.lang.String key, - boolean defaultValue); - /** - * map<string, bool> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinOrBuilder.java deleted file mode 100644 index 2d36579c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapMinOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapMinOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapMin) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - float getValOrDefault( - int key, - float defaultValue); - /** - * map<int32, float> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - float getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapNone.java deleted file mode 100644 index 48430d5c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapNone.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapNone} - */ -public final class MapNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapNone) - MapNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapNone.class.getName()); - } - // Use MapNone.newBuilder() to construct. - private MapNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapNone_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapNone.class, build.buf.validate.conformance.cases.MapNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Boolean> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapNone_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT32, - 0, - com.google.protobuf.WireFormat.FieldType.BOOL, - false); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Boolean> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean getValOrDefault( - int key, - boolean defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapNone other = (build.buf.validate.conformance.cases.MapNone) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapNone 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.MapNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapNone 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.MapNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapNone 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.MapNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapNone 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.MapNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapNone 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.MapNone 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.MapNone 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.MapNone 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.MapNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapNone) - build.buf.validate.conformance.cases.MapNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapNone_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapNone.class, build.buf.validate.conformance.cases.MapNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapNone build() { - build.buf.validate.conformance.cases.MapNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapNone buildPartial() { - build.buf.validate.conformance.cases.MapNone result = new build.buf.validate.conformance.cases.MapNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapNone) { - return mergeFrom((build.buf.validate.conformance.cases.MapNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapNone other) { - if (other == build.buf.validate.conformance.cases.MapNone.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Boolean> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean getValOrDefault( - int key, - boolean defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - public Builder putVal( - int key, - boolean value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapNone) - private static final build.buf.validate.conformance.cases.MapNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapNone(); - } - - public static build.buf.validate.conformance.cases.MapNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapNone 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.MapNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapNoneOrBuilder.java deleted file mode 100644 index 4c2f8e79..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapNoneOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapNone) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - int getValCount(); - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - java.util.Map - getValMap(); - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - boolean getValOrDefault( - int key, - boolean defaultValue); - /** - * map<uint32, bool> val = 1 [json_name = "val"]; - */ - boolean getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursive.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursive.java deleted file mode 100644 index 679b6c94..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursive.java +++ /dev/null @@ -1,1181 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapRecursive} - */ -public final class MapRecursive extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapRecursive) - MapRecursiveOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapRecursive.class.getName()); - } - // Use MapRecursive.newBuilder() to construct. - private MapRecursive(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapRecursive() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapRecursive.class, build.buf.validate.conformance.cases.MapRecursive.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapRecursive.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.MapRecursive.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapRecursive.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapRecursive.Msg.class, build.buf.validate.conformance.cases.MapRecursive.Msg.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.MapRecursive.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapRecursive.Msg other = (build.buf.validate.conformance.cases.MapRecursive.Msg) obj; - - 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(); - 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.MapRecursive.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapRecursive.Msg 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.MapRecursive.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapRecursive.Msg 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.MapRecursive.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapRecursive.Msg 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.MapRecursive.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapRecursive.Msg 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.MapRecursive.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapRecursive.Msg 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.MapRecursive.Msg 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.MapRecursive.Msg 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.MapRecursive.Msg 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.MapRecursive.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapRecursive.Msg) - build.buf.validate.conformance.cases.MapRecursive.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapRecursive.Msg.class, build.buf.validate.conformance.cases.MapRecursive.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapRecursive.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapRecursive.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive.Msg build() { - build.buf.validate.conformance.cases.MapRecursive.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive.Msg buildPartial() { - build.buf.validate.conformance.cases.MapRecursive.Msg result = new build.buf.validate.conformance.cases.MapRecursive.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapRecursive.Msg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapRecursive.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.MapRecursive.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapRecursive.Msg other) { - if (other == build.buf.validate.conformance.cases.MapRecursive.Msg.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapRecursive.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapRecursive.Msg) - private static final build.buf.validate.conformance.cases.MapRecursive.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapRecursive.Msg(); - } - - public static build.buf.validate.conformance.cases.MapRecursive.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.MapRecursive.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, build.buf.validate.conformance.cases.MapRecursive.Msg> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT32, - 0, - com.google.protobuf.WireFormat.FieldType.MESSAGE, - build.buf.validate.conformance.cases.MapRecursive.Msg.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, build.buf.validate.conformance.cases.MapRecursive.Msg> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.cases.MapRecursive.Msg getValOrDefault( - int key, - /* nullable */ -build.buf.validate.conformance.cases.MapRecursive.Msg defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive.Msg getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapRecursive)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapRecursive other = (build.buf.validate.conformance.cases.MapRecursive) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapRecursive parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapRecursive 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.MapRecursive parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapRecursive 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.MapRecursive parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapRecursive 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.MapRecursive parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapRecursive 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.MapRecursive parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapRecursive 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.MapRecursive 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.MapRecursive 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.MapRecursive 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.MapRecursive} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapRecursive) - build.buf.validate.conformance.cases.MapRecursiveOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapRecursive.class, build.buf.validate.conformance.cases.MapRecursive.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapRecursive.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapRecursive_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapRecursive.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive build() { - build.buf.validate.conformance.cases.MapRecursive result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive buildPartial() { - build.buf.validate.conformance.cases.MapRecursive result = new build.buf.validate.conformance.cases.MapRecursive(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapRecursive result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal().build(ValDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapRecursive) { - return mergeFrom((build.buf.validate.conformance.cases.MapRecursive)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapRecursive other) { - if (other == build.buf.validate.conformance.cases.MapRecursive.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().ensureBuilderMap().put( - val__.getKey(), val__.getValue()); - 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 static final class ValConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive.Msg build(build.buf.validate.conformance.cases.MapRecursive.MsgOrBuilder val) { - if (val instanceof build.buf.validate.conformance.cases.MapRecursive.Msg) { return (build.buf.validate.conformance.cases.MapRecursive.Msg) val; } - return ((build.buf.validate.conformance.cases.MapRecursive.Msg.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ValDefaultEntryHolder.defaultEntry; - } - }; - private static final ValConverter valConverter = new ValConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.Integer, build.buf.validate.conformance.cases.MapRecursive.MsgOrBuilder, build.buf.validate.conformance.cases.MapRecursive.Msg, build.buf.validate.conformance.cases.MapRecursive.Msg.Builder> val_; - private com.google.protobuf.MapFieldBuilder - internalGetVal() { - if (val_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(valConverter); - } - return val_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableVal() { - if (val_ == null) { - val_ = new com.google.protobuf.MapFieldBuilder<>(valConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().ensureBuilderMap().size(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getImmutableMap(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.cases.MapRecursive.Msg getValOrDefault( - int key, - /* nullable */ -build.buf.validate.conformance.cases.MapRecursive.Msg defaultValue) { - - java.util.Map map = internalGetMutableVal().ensureBuilderMap(); - return map.containsKey(key) ? valConverter.build(map.get(key)) : defaultValue; - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.MapRecursive.Msg getValOrThrow( - int key) { - - java.util.Map map = internalGetMutableVal().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return valConverter.build(map.get(key)); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().clear(); - return this; - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().ensureMessageMap(); - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - public Builder putVal( - int key, - build.buf.validate.conformance.cases.MapRecursive.Msg value) { - - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - public Builder putAllVal( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableVal().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.MapRecursive.Msg.Builder putValBuilderIfAbsent( - int key) { - java.util.Map builderMap = internalGetMutableVal().ensureBuilderMap(); - build.buf.validate.conformance.cases.MapRecursive.MsgOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = build.buf.validate.conformance.cases.MapRecursive.Msg.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof build.buf.validate.conformance.cases.MapRecursive.Msg) { - entry = ((build.buf.validate.conformance.cases.MapRecursive.Msg) entry).toBuilder(); - builderMap.put(key, entry); - } - return (build.buf.validate.conformance.cases.MapRecursive.Msg.Builder) entry; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapRecursive) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapRecursive) - private static final build.buf.validate.conformance.cases.MapRecursive DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapRecursive(); - } - - public static build.buf.validate.conformance.cases.MapRecursive getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapRecursive 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.MapRecursive getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursiveOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursiveOrBuilder.java deleted file mode 100644 index b7232ab0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapRecursiveOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapRecursiveOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapRecursive) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - int getValCount(); - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - java.util.Map - getValMap(); - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - /* nullable */ -build.buf.validate.conformance.cases.MapRecursive.Msg getValOrDefault( - int key, - /* nullable */ -build.buf.validate.conformance.cases.MapRecursive.Msg defaultValue); - /** - * map<uint32, .buf.validate.conformance.cases.MapRecursive.Msg> val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.MapRecursive.Msg getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValues.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapValues.java deleted file mode 100644 index ebf922c5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValues.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapValues} - */ -public final class MapValues extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapValues) - MapValuesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapValues.class.getName()); - } - // Use MapValues.newBuilder() to construct. - private MapValues(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapValues() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValues_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapValues.class, build.buf.validate.conformance.cases.MapValues.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValues_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapValues)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapValues other = (build.buf.validate.conformance.cases.MapValues) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapValues parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapValues 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.MapValues parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapValues 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.MapValues parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapValues 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.MapValues parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapValues 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.MapValues parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapValues 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.MapValues 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.MapValues 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.MapValues 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.MapValues} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapValues) - build.buf.validate.conformance.cases.MapValuesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValues_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapValues.class, build.buf.validate.conformance.cases.MapValues.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapValues.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValues_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapValues getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapValues.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapValues build() { - build.buf.validate.conformance.cases.MapValues result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapValues buildPartial() { - build.buf.validate.conformance.cases.MapValues result = new build.buf.validate.conformance.cases.MapValues(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapValues result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapValues) { - return mergeFrom((build.buf.validate.conformance.cases.MapValues)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapValues other) { - if (other == build.buf.validate.conformance.cases.MapValues.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapValues) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapValues) - private static final build.buf.validate.conformance.cases.MapValues DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapValues(); - } - - public static build.buf.validate.conformance.cases.MapValues getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapValues 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.MapValues getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesOrBuilder.java deleted file mode 100644 index 84547e02..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapValuesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapValues) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPattern.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPattern.java deleted file mode 100644 index 6deb6cdb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPattern.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MapValuesPattern} - */ -public final class MapValuesPattern extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MapValuesPattern) - MapValuesPatternOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapValuesPattern.class.getName()); - } - // Use MapValuesPattern.newBuilder() to construct. - private MapValuesPattern(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MapValuesPattern() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValuesPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapValuesPattern.class, build.buf.validate.conformance.cases.MapValuesPattern.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValuesPattern_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.MapValuesPattern)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MapValuesPattern other = (build.buf.validate.conformance.cases.MapValuesPattern) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MapValuesPattern parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapValuesPattern 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.MapValuesPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapValuesPattern 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.MapValuesPattern parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MapValuesPattern 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.MapValuesPattern parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MapValuesPattern 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.MapValuesPattern parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MapValuesPattern 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.MapValuesPattern 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.MapValuesPattern 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.MapValuesPattern 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.MapValuesPattern} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MapValuesPattern) - build.buf.validate.conformance.cases.MapValuesPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValuesPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MapValuesPattern.class, build.buf.validate.conformance.cases.MapValuesPattern.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MapValuesPattern.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapValuesPattern getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MapValuesPattern.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapValuesPattern build() { - build.buf.validate.conformance.cases.MapValuesPattern result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MapValuesPattern buildPartial() { - build.buf.validate.conformance.cases.MapValuesPattern result = new build.buf.validate.conformance.cases.MapValuesPattern(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MapValuesPattern result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MapValuesPattern) { - return mergeFrom((build.buf.validate.conformance.cases.MapValuesPattern)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MapValuesPattern other) { - if (other == build.buf.validate.conformance.cases.MapValuesPattern.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MapValuesPattern) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MapValuesPattern) - private static final build.buf.validate.conformance.cases.MapValuesPattern DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MapValuesPattern(); - } - - public static build.buf.validate.conformance.cases.MapValuesPattern getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapValuesPattern 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.MapValuesPattern getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPatternOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPatternOrBuilder.java deleted file mode 100644 index d17b0c72..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapValuesPatternOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MapValuesPatternOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MapValuesPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MapsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MapsProto.java deleted file mode 100644 index 7f6acd42..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MapsProto.java +++ /dev/null @@ -1,415 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class MapsProto { - private MapsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapNone_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapNone_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapMin_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapMin_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapMin_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapMin_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapMax_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapMax_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapMax_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapMax_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapMinMax_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapMinMax_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapMinMax_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapMinMax_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapExact_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapExact_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapExact_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapExact_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapKeys_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapKeys_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapKeys_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapKeys_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapValues_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapValues_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapValues_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapValues_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapKeysPattern_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapKeysPattern_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapKeysPattern_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapValuesPattern_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapValuesPattern_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapValuesPattern_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapRecursive_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapRecursive_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapRecursive_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapRecursive_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapRecursive_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapRecursive_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapExactIgnore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MapExactIgnore_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MapExactIgnore_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MultipleMaps_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MultipleMaps_FirstEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MultipleMaps_FirstEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MultipleMaps_SecondEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MultipleMaps_SecondEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MultipleMaps_ThirdEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MultipleMaps_ThirdEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)buf/validate/conformance/cases/maps.pr" + - "oto\022\036buf.validate.conformance.cases\032\033buf" + - "/validate/validate.proto\"\205\001\n\007MapNone\022B\n\003" + - "val\030\001 \003(\01320.buf.validate.conformance.cas" + - "es.MapNone.ValEntryR\003val\0326\n\010ValEntry\022\020\n\003" + - "key\030\001 \001(\rR\003key\022\024\n\005value\030\002 \001(\010R\005value:\0028\001" + - "\"\215\001\n\006MapMin\022K\n\003val\030\001 \003(\0132/.buf.validate." + - "conformance.cases.MapMin.ValEntryB\010\272H\005\232\001" + - "\002\010\002R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024" + - "\n\005value\030\002 \001(\002R\005value:\0028\001\"\215\001\n\006MapMax\022K\n\003v" + - "al\030\001 \003(\0132/.buf.validate.conformance.case" + - "s.MapMax.ValEntryB\010\272H\005\232\001\002\020\003R\003val\0326\n\010ValE" + - "ntry\022\020\n\003key\030\001 \001(\003R\003key\022\024\n\005value\030\002 \001(\001R\005v" + - "alue:\0028\001\"\225\001\n\tMapMinMax\022P\n\003val\030\001 \003(\01322.bu" + - "f.validate.conformance.cases.MapMinMax.V" + - "alEntryB\n\272H\007\232\001\004\010\002\020\004R\003val\0326\n\010ValEntry\022\020\n\003" + - "key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\010R\005value:\0028\001" + - "\"\223\001\n\010MapExact\022O\n\003val\030\001 \003(\01321.buf.validat" + - "e.conformance.cases.MapExact.ValEntryB\n\272" + - "H\007\232\001\004\010\003\020\003R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\004R" + - "\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\223\001\n\007MapKe" + - "ys\022P\n\003val\030\001 \003(\01320.buf.validate.conforman" + - "ce.cases.MapKeys.ValEntryB\014\272H\t\232\001\006\"\004B\002\020\000R" + - "\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\022R\003key\022\024\n\005va" + - "lue\030\002 \001(\tR\005value:\0028\001\"\227\001\n\tMapValues\022R\n\003va" + - "l\030\001 \003(\01322.buf.validate.conformance.cases" + - ".MapValues.ValEntryB\014\272H\t\232\001\006*\004r\002\020\003R\003val\0326" + - "\n\010ValEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 " + - "\001(\tR\005value:\0028\001\"\260\001\n\016MapKeysPattern\022f\n\003val" + - "\030\001 \003(\01327.buf.validate.conformance.cases." + - "MapKeysPattern.ValEntryB\033\272H\030\232\001\025\"\023r\0212\017(?i" + - ")^[a-z0-9]+$R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001" + - "(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\264\001\n\020Ma" + - "pValuesPattern\022h\n\003val\030\001 \003(\01329.buf.valida" + - "te.conformance.cases.MapValuesPattern.Va" + - "lEntryB\033\272H\030\232\001\025*\023r\0212\017(?i)^[a-z0-9]+$R\003val" + - "\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030" + - "\002 \001(\tR\005value:\0028\001\"\343\001\n\014MapRecursive\022G\n\003val" + - "\030\001 \003(\01325.buf.validate.conformance.cases." + - "MapRecursive.ValEntryR\003val\032h\n\010ValEntry\022\020" + - "\n\003key\030\001 \001(\rR\003key\022F\n\005value\030\002 \001(\01320.buf.va" + - "lidate.conformance.cases.MapRecursive.Ms" + - "gR\005value:\0028\001\032 \n\003Msg\022\031\n\003val\030\001 \001(\tB\007\272H\004r\002\020" + - "\003R\003val\"\242\001\n\016MapExactIgnore\022X\n\003val\030\001 \003(\01327" + - ".buf.validate.conformance.cases.MapExact" + - "Ignore.ValEntryB\r\272H\n\232\001\004\010\003\020\003\320\001\001R\003val\0326\n\010V" + - "alEntry\022\020\n\003key\030\001 \001(\004R\003key\022\024\n\005value\030\002 \001(\t" + - "R\005value:\0028\001\"\327\003\n\014MultipleMaps\022[\n\005first\030\001 " + - "\003(\01327.buf.validate.conformance.cases.Mul" + - "tipleMaps.FirstEntryB\014\272H\t\232\001\006\"\004*\002 \000R\005firs" + - "t\022^\n\006second\030\002 \003(\01328.buf.validate.conform" + - "ance.cases.MultipleMaps.SecondEntryB\014\272H\t" + - "\232\001\006\"\004\032\002\020\000R\006second\022[\n\005third\030\003 \003(\01327.buf.v" + - "alidate.conformance.cases.MultipleMaps.T" + - "hirdEntryB\014\272H\t\232\001\006\"\004\032\002 \000R\005third\0328\n\nFirstE" + - "ntry\022\020\n\003key\030\001 \001(\rR\003key\022\024\n\005value\030\002 \001(\tR\005v" + - "alue:\0028\001\0329\n\013SecondEntry\022\020\n\003key\030\001 \001(\005R\003ke" + - "y\022\024\n\005value\030\002 \001(\010R\005value:\0028\001\0328\n\nThirdEntr" + - "y\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\010R\005valu" + - "e:\0028\001B\315\001\n$build.buf.validate.conformance" + - ".casesB\tMapsProtoP\001\242\002\004BVCC\252\002\036Buf.Validat" + - "e.Conformance.Cases\312\002\036Buf\\Validate\\Confo" + - "rmance\\Cases\342\002*Buf\\Validate\\Conformance\\" + - "Cases\\GPBMetadata\352\002!Buf::Validate::Confo" + - "rmance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_MapNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_MapNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapNone_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapNone_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapNone_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapNone_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapMin_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_MapMin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapMin_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapMin_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapMin_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapMin_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapMin_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapMax_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_MapMax_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapMax_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapMax_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapMax_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapMax_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapMax_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapMinMax_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_MapMinMax_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapMinMax_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapMinMax_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapMinMax_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapMinMax_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapMinMax_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapExact_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_MapExact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapExact_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapExact_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapExact_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapExact_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapExact_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapKeys_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_MapKeys_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapKeys_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapKeys_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapKeys_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapKeys_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapKeys_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapValues_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_MapValues_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapValues_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapValues_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapValues_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapValues_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapValues_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_MapKeysPattern_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapKeysPattern_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapKeysPattern_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapKeysPattern_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapKeysPattern_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_MapValuesPattern_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapValuesPattern_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapValuesPattern_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapValuesPattern_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapValuesPattern_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapRecursive_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_MapRecursive_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapRecursive_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapRecursive_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapRecursive_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapRecursive_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapRecursive_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MapRecursive_Msg_descriptor = - internal_static_buf_validate_conformance_cases_MapRecursive_descriptor.getNestedTypes().get(1); - internal_static_buf_validate_conformance_cases_MapRecursive_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapRecursive_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_MapExactIgnore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MapExactIgnore_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_MapExactIgnore_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MapExactIgnore_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MapExactIgnore_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_MultipleMaps_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor, - new java.lang.String[] { "First", "Second", "Third", }); - internal_static_buf_validate_conformance_cases_MultipleMaps_FirstEntry_descriptor = - internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MultipleMaps_FirstEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MultipleMaps_FirstEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MultipleMaps_SecondEntry_descriptor = - internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor.getNestedTypes().get(1); - internal_static_buf_validate_conformance_cases_MultipleMaps_SecondEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MultipleMaps_SecondEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_MultipleMaps_ThirdEntry_descriptor = - internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor.getNestedTypes().get(2); - internal_static_buf_validate_conformance_cases_MultipleMaps_ThirdEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MultipleMaps_ThirdEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Message.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Message.java deleted file mode 100644 index 7cd1877d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Message.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Message} - */ -public final class Message extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Message) - MessageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Message.class.getName()); - } - // Use Message.newBuilder() to construct. - private Message(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Message() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Message.class, build.buf.validate.conformance.cases.Message.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.TestMsg val_; - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.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.Message)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Message other = (build.buf.validate.conformance.cases.Message) 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.Message parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Message 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.Message parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Message 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.Message parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Message 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.Message parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Message 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.Message parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Message 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.Message 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.Message 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.Message 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.Message} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Message) - build.buf.validate.conformance.cases.MessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Message.class, build.buf.validate.conformance.cases.Message.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Message.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.MessagesProto.internal_static_buf_validate_conformance_cases_Message_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Message getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Message.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Message build() { - build.buf.validate.conformance.cases.Message result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Message buildPartial() { - build.buf.validate.conformance.cases.Message result = new build.buf.validate.conformance.cases.Message(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Message 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.Message) { - return mergeFrom((build.buf.validate.conformance.cases.Message)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Message other) { - if (other == build.buf.validate.conformance.cases.Message.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 build.buf.validate.conformance.cases.TestMsg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - * @return The val. - */ - public build.buf.validate.conformance.cases.TestMsg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - public Builder setVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - public Builder setVal( - build.buf.validate.conformance.cases.TestMsg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - public Builder mergeVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.TestMsg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Message) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Message) - private static final build.buf.validate.conformance.cases.Message DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Message(); - } - - public static build.buf.validate.conformance.cases.Message getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Message 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.Message getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackage.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackage.java deleted file mode 100644 index 2ad5dadf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackage.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageCrossPackage} - */ -public final class MessageCrossPackage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageCrossPackage) - MessageCrossPackageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageCrossPackage.class.getName()); - } - // Use MessageCrossPackage.newBuilder() to construct. - private MessageCrossPackage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageCrossPackage() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageCrossPackage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageCrossPackage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageCrossPackage.class, build.buf.validate.conformance.cases.MessageCrossPackage.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.other_package.Embed val_; - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed getVal() { - return val_ == null ? build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.EmbedOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.other_package.Embed.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.MessageCrossPackage)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageCrossPackage other = (build.buf.validate.conformance.cases.MessageCrossPackage) 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.MessageCrossPackage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageCrossPackage 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.MessageCrossPackage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageCrossPackage 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.MessageCrossPackage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageCrossPackage 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.MessageCrossPackage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageCrossPackage 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.MessageCrossPackage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageCrossPackage 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.MessageCrossPackage 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.MessageCrossPackage 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.MessageCrossPackage 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.MessageCrossPackage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageCrossPackage) - build.buf.validate.conformance.cases.MessageCrossPackageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageCrossPackage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageCrossPackage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageCrossPackage.class, build.buf.validate.conformance.cases.MessageCrossPackage.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageCrossPackage.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.MessagesProto.internal_static_buf_validate_conformance_cases_MessageCrossPackage_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageCrossPackage getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageCrossPackage.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageCrossPackage build() { - build.buf.validate.conformance.cases.MessageCrossPackage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageCrossPackage buildPartial() { - build.buf.validate.conformance.cases.MessageCrossPackage result = new build.buf.validate.conformance.cases.MessageCrossPackage(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageCrossPackage 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.MessageCrossPackage) { - return mergeFrom((build.buf.validate.conformance.cases.MessageCrossPackage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageCrossPackage other) { - if (other == build.buf.validate.conformance.cases.MessageCrossPackage.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 build.buf.validate.conformance.cases.other_package.Embed val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.other_package.Embed, build.buf.validate.conformance.cases.other_package.Embed.Builder, build.buf.validate.conformance.cases.other_package.EmbedOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - * @return The val. - */ - public build.buf.validate.conformance.cases.other_package.Embed getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder setVal(build.buf.validate.conformance.cases.other_package.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder setVal( - build.buf.validate.conformance.cases.other_package.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder mergeVal(build.buf.validate.conformance.cases.other_package.Embed value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.Embed.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.EmbedOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.other_package.Embed, build.buf.validate.conformance.cases.other_package.Embed.Builder, build.buf.validate.conformance.cases.other_package.EmbedOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.other_package.Embed, build.buf.validate.conformance.cases.other_package.Embed.Builder, build.buf.validate.conformance.cases.other_package.EmbedOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageCrossPackage) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageCrossPackage) - private static final build.buf.validate.conformance.cases.MessageCrossPackage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageCrossPackage(); - } - - public static build.buf.validate.conformance.cases.MessageCrossPackage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageCrossPackage 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.MessageCrossPackage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackageOrBuilder.java deleted file mode 100644 index 8f39d747..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageCrossPackageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageCrossPackageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageCrossPackage) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - * @return The val. - */ - build.buf.validate.conformance.cases.other_package.Embed getVal(); - /** - * .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.other_package.EmbedOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabled.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabled.java deleted file mode 100644 index 10af787f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabled.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageDisabled} - */ -public final class MessageDisabled extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageDisabled) - MessageDisabledOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageDisabled.class.getName()); - } - // Use MessageDisabled.newBuilder() to construct. - private MessageDisabled(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageDisabled() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageDisabled_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageDisabled_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageDisabled.class, build.buf.validate.conformance.cases.MessageDisabled.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.MessageDisabled)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageDisabled other = (build.buf.validate.conformance.cases.MessageDisabled) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MessageDisabled parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageDisabled 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.MessageDisabled parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageDisabled 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.MessageDisabled parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageDisabled 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.MessageDisabled parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageDisabled 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.MessageDisabled parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageDisabled 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.MessageDisabled 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.MessageDisabled 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.MessageDisabled 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.MessageDisabled} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageDisabled) - build.buf.validate.conformance.cases.MessageDisabledOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageDisabled_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageDisabled_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageDisabled.class, build.buf.validate.conformance.cases.MessageDisabled.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageDisabled.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageDisabled_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageDisabled getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageDisabled.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageDisabled build() { - build.buf.validate.conformance.cases.MessageDisabled result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageDisabled buildPartial() { - build.buf.validate.conformance.cases.MessageDisabled result = new build.buf.validate.conformance.cases.MessageDisabled(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageDisabled result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MessageDisabled) { - return mergeFrom((build.buf.validate.conformance.cases.MessageDisabled)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageDisabled other) { - if (other == build.buf.validate.conformance.cases.MessageDisabled.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageDisabled) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageDisabled) - private static final build.buf.validate.conformance.cases.MessageDisabled DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageDisabled(); - } - - public static build.buf.validate.conformance.cases.MessageDisabled getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageDisabled 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.MessageDisabled getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabledOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabledOrBuilder.java deleted file mode 100644 index a6228dd9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageDisabledOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageDisabledOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageDisabled) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageNone.java deleted file mode 100644 index a4e53ccb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageNone.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageNone} - */ -public final class MessageNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageNone) - MessageNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageNone.class.getName()); - } - // Use MessageNone.newBuilder() to construct. - private MessageNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageNone.class, build.buf.validate.conformance.cases.MessageNone.Builder.class); - } - - public interface NoneMsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageNone.NoneMsg) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code buf.validate.conformance.cases.MessageNone.NoneMsg} - */ - public static final class NoneMsg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageNone.NoneMsg) - NoneMsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - NoneMsg.class.getName()); - } - // Use NoneMsg.newBuilder() to construct. - private NoneMsg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NoneMsg() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageNone.NoneMsg.class, build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder.class); - } - - 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 { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.MessageNone.NoneMsg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageNone.NoneMsg other = (build.buf.validate.conformance.cases.MessageNone.NoneMsg) obj; - - 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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg 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.MessageNone.NoneMsg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg 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.MessageNone.NoneMsg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg 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.MessageNone.NoneMsg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg 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.MessageNone.NoneMsg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg 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.MessageNone.NoneMsg 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.MessageNone.NoneMsg 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.MessageNone.NoneMsg 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.MessageNone.NoneMsg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageNone.NoneMsg) - build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageNone.NoneMsg.class, build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageNone.NoneMsg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone.NoneMsg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone.NoneMsg build() { - build.buf.validate.conformance.cases.MessageNone.NoneMsg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone.NoneMsg buildPartial() { - build.buf.validate.conformance.cases.MessageNone.NoneMsg result = new build.buf.validate.conformance.cases.MessageNone.NoneMsg(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MessageNone.NoneMsg) { - return mergeFrom((build.buf.validate.conformance.cases.MessageNone.NoneMsg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageNone.NoneMsg other) { - if (other == build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance()) return this; - 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; - 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; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageNone.NoneMsg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageNone.NoneMsg) - private static final build.buf.validate.conformance.cases.MessageNone.NoneMsg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageNone.NoneMsg(); - } - - public static build.buf.validate.conformance.cases.MessageNone.NoneMsg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NoneMsg 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.MessageNone.NoneMsg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.MessageNone.NoneMsg val_; - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone.NoneMsg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.MessageNone.NoneMsg.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.MessageNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageNone other = (build.buf.validate.conformance.cases.MessageNone) 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.MessageNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageNone 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.MessageNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageNone 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.MessageNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageNone 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.MessageNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageNone 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.MessageNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageNone 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.MessageNone 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.MessageNone 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.MessageNone 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.MessageNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageNone) - build.buf.validate.conformance.cases.MessageNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageNone.class, build.buf.validate.conformance.cases.MessageNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageNone.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.MessagesProto.internal_static_buf_validate_conformance_cases_MessageNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone build() { - build.buf.validate.conformance.cases.MessageNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageNone buildPartial() { - build.buf.validate.conformance.cases.MessageNone result = new build.buf.validate.conformance.cases.MessageNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageNone 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.MessageNone) { - return mergeFrom((build.buf.validate.conformance.cases.MessageNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageNone other) { - if (other == build.buf.validate.conformance.cases.MessageNone.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 build.buf.validate.conformance.cases.MessageNone.NoneMsg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.MessageNone.NoneMsg, build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder, build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - * @return The val. - */ - public build.buf.validate.conformance.cases.MessageNone.NoneMsg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - public Builder setVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - public Builder setVal( - build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - public Builder mergeVal(build.buf.validate.conformance.cases.MessageNone.NoneMsg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.MessageNone.NoneMsg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.MessageNone.NoneMsg, build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder, build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.MessageNone.NoneMsg, build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder, build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageNone) - private static final build.buf.validate.conformance.cases.MessageNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageNone(); - } - - public static build.buf.validate.conformance.cases.MessageNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageNone 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.MessageNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageNoneOrBuilder.java deleted file mode 100644 index 8933630a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageNoneOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageNone) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - * @return The val. - */ - build.buf.validate.conformance.cases.MessageNone.NoneMsg getVal(); - /** - * .buf.validate.conformance.cases.MessageNone.NoneMsg val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.MessageNone.NoneMsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageOrBuilder.java deleted file mode 100644 index 1fa6723b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Message) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - * @return The val. - */ - build.buf.validate.conformance.cases.TestMsg getVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequired.java deleted file mode 100644 index aeb1500f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequired.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageRequired} - */ -public final class MessageRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageRequired) - MessageRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageRequired.class.getName()); - } - // Use MessageRequired.newBuilder() to construct. - private MessageRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageRequired.class, build.buf.validate.conformance.cases.MessageRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.TestMsg val_; - /** - * .buf.validate.conformance.cases.TestMsg 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); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.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.MessageRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageRequired other = (build.buf.validate.conformance.cases.MessageRequired) 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.MessageRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequired 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.MessageRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequired 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.MessageRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequired 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.MessageRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageRequired 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.MessageRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageRequired 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.MessageRequired 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.MessageRequired 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.MessageRequired 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.MessageRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageRequired) - build.buf.validate.conformance.cases.MessageRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageRequired.class, build.buf.validate.conformance.cases.MessageRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageRequired.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.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequired build() { - build.buf.validate.conformance.cases.MessageRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequired buildPartial() { - build.buf.validate.conformance.cases.MessageRequired result = new build.buf.validate.conformance.cases.MessageRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageRequired 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.MessageRequired) { - return mergeFrom((build.buf.validate.conformance.cases.MessageRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageRequired other) { - if (other == build.buf.validate.conformance.cases.MessageRequired.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 build.buf.validate.conformance.cases.TestMsg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.TestMsg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.TestMsg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg 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; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageRequired) - private static final build.buf.validate.conformance.cases.MessageRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageRequired(); - } - - public static build.buf.validate.conformance.cases.MessageRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageRequired 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.MessageRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptional.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptional.java deleted file mode 100644 index d01ac803..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptional.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageRequiredButOptional} - */ -public final class MessageRequiredButOptional extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageRequiredButOptional) - MessageRequiredButOptionalOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageRequiredButOptional.class.getName()); - } - // Use MessageRequiredButOptional.newBuilder() to construct. - private MessageRequiredButOptional(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageRequiredButOptional() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageRequiredButOptional.class, build.buf.validate.conformance.cases.MessageRequiredButOptional.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.TestMsg val_; - /** - * optional .buf.validate.conformance.cases.TestMsg 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 .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.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.MessageRequiredButOptional)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageRequiredButOptional other = (build.buf.validate.conformance.cases.MessageRequiredButOptional) 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.MessageRequiredButOptional parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequiredButOptional 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.MessageRequiredButOptional parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequiredButOptional 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.MessageRequiredButOptional parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequiredButOptional 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.MessageRequiredButOptional parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageRequiredButOptional 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.MessageRequiredButOptional parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageRequiredButOptional 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.MessageRequiredButOptional 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.MessageRequiredButOptional 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.MessageRequiredButOptional 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.MessageRequiredButOptional} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageRequiredButOptional) - build.buf.validate.conformance.cases.MessageRequiredButOptionalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageRequiredButOptional.class, build.buf.validate.conformance.cases.MessageRequiredButOptional.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageRequiredButOptional.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.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequiredButOptional getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageRequiredButOptional.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequiredButOptional build() { - build.buf.validate.conformance.cases.MessageRequiredButOptional result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequiredButOptional buildPartial() { - build.buf.validate.conformance.cases.MessageRequiredButOptional result = new build.buf.validate.conformance.cases.MessageRequiredButOptional(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageRequiredButOptional 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.MessageRequiredButOptional) { - return mergeFrom((build.buf.validate.conformance.cases.MessageRequiredButOptional)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageRequiredButOptional other) { - if (other == build.buf.validate.conformance.cases.MessageRequiredButOptional.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 build.buf.validate.conformance.cases.TestMsg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.TestMsg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.TestMsg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.TestMsg 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 .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageRequiredButOptional) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageRequiredButOptional) - private static final build.buf.validate.conformance.cases.MessageRequiredButOptional DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageRequiredButOptional(); - } - - public static build.buf.validate.conformance.cases.MessageRequiredButOptional getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageRequiredButOptional 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.MessageRequiredButOptional getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptionalOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptionalOrBuilder.java deleted file mode 100644 index 4e356a54..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredButOptionalOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageRequiredButOptionalOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageRequiredButOptional) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestMsg getVal(); - /** - * optional .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneof.java deleted file mode 100644 index d003f780..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneof.java +++ /dev/null @@ -1,648 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageRequiredOneof} - */ -public final class MessageRequiredOneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageRequiredOneof) - MessageRequiredOneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageRequiredOneof.class.getName()); - } - // Use MessageRequiredOneof.newBuilder() to construct. - private MessageRequiredOneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageRequiredOneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageRequiredOneof.class, build.buf.validate.conformance.cases.MessageRequiredOneof.Builder.class); - } - - private int oneCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object one_; - public enum OneCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - ONE_NOT_SET(0); - private final int value; - private OneCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OneCase valueOf(int value) { - return forNumber(value); - } - - public static OneCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return ONE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OneCase - getOneCase() { - return OneCase.forNumber( - oneCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oneCase_ == 1; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getVal() { - if (oneCase_ == 1) { - return (build.buf.validate.conformance.cases.TestMsg) one_; - } - return build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - if (oneCase_ == 1) { - return (build.buf.validate.conformance.cases.TestMsg) one_; - } - return build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } - - 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 (oneCase_ == 1) { - output.writeMessage(1, (build.buf.validate.conformance.cases.TestMsg) one_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oneCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (build.buf.validate.conformance.cases.TestMsg) one_); - } - 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.MessageRequiredOneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageRequiredOneof other = (build.buf.validate.conformance.cases.MessageRequiredOneof) obj; - - if (!getOneCase().equals(other.getOneCase())) return false; - switch (oneCase_) { - case 1: - if (!getVal() - .equals(other.getVal())) return false; - break; - case 0: - default: - } - 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(); - switch (oneCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MessageRequiredOneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequiredOneof 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.MessageRequiredOneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequiredOneof 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.MessageRequiredOneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageRequiredOneof 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.MessageRequiredOneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageRequiredOneof 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.MessageRequiredOneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageRequiredOneof 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.MessageRequiredOneof 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.MessageRequiredOneof 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.MessageRequiredOneof 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.MessageRequiredOneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageRequiredOneof) - build.buf.validate.conformance.cases.MessageRequiredOneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageRequiredOneof.class, build.buf.validate.conformance.cases.MessageRequiredOneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageRequiredOneof.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) { - valBuilder_.clear(); - } - oneCase_ = 0; - one_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageRequiredOneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequiredOneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageRequiredOneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequiredOneof build() { - build.buf.validate.conformance.cases.MessageRequiredOneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageRequiredOneof buildPartial() { - build.buf.validate.conformance.cases.MessageRequiredOneof result = new build.buf.validate.conformance.cases.MessageRequiredOneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageRequiredOneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.MessageRequiredOneof result) { - result.oneCase_ = oneCase_; - result.one_ = this.one_; - if (oneCase_ == 1 && - valBuilder_ != null) { - result.one_ = valBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MessageRequiredOneof) { - return mergeFrom((build.buf.validate.conformance.cases.MessageRequiredOneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageRequiredOneof other) { - if (other == build.buf.validate.conformance.cases.MessageRequiredOneof.getDefaultInstance()) return this; - switch (other.getOneCase()) { - case VAL: { - mergeVal(other.getVal()); - break; - } - case ONE_NOT_SET: { - break; - } - } - 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); - oneCase_ = 1; - 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 oneCase_ = 0; - private java.lang.Object one_; - public OneCase - getOneCase() { - return OneCase.forNumber( - oneCase_); - } - - public Builder clearOne() { - oneCase_ = 0; - one_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oneCase_ == 1; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getVal() { - if (valBuilder_ == null) { - if (oneCase_ == 1) { - return (build.buf.validate.conformance.cases.TestMsg) one_; - } - return build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } else { - if (oneCase_ == 1) { - return valBuilder_.getMessage(); - } - return build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - one_ = value; - onChanged(); - } else { - valBuilder_.setMessage(value); - } - oneCase_ = 1; - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.TestMsg.Builder builderForValue) { - if (valBuilder_ == null) { - one_ = builderForValue.build(); - onChanged(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - oneCase_ = 1; - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (oneCase_ == 1 && - one_ != build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) { - one_ = build.buf.validate.conformance.cases.TestMsg.newBuilder((build.buf.validate.conformance.cases.TestMsg) one_) - .mergeFrom(value).buildPartial(); - } else { - one_ = value; - } - onChanged(); - } else { - if (oneCase_ == 1) { - valBuilder_.mergeFrom(value); - } else { - valBuilder_.setMessage(value); - } - } - oneCase_ = 1; - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder clearVal() { - if (valBuilder_ == null) { - if (oneCase_ == 1) { - oneCase_ = 0; - one_ = null; - onChanged(); - } - } else { - if (oneCase_ == 1) { - oneCase_ = 0; - one_ = null; - } - valBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsg.Builder getValBuilder() { - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - if ((oneCase_ == 1) && (valBuilder_ != null)) { - return valBuilder_.getMessageOrBuilder(); - } else { - if (oneCase_ == 1) { - return (build.buf.validate.conformance.cases.TestMsg) one_; - } - return build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - if (!(oneCase_ == 1)) { - one_ = build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder>( - (build.buf.validate.conformance.cases.TestMsg) one_, - getParentForChildren(), - isClean()); - one_ = null; - } - oneCase_ = 1; - onChanged(); - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageRequiredOneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageRequiredOneof) - private static final build.buf.validate.conformance.cases.MessageRequiredOneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageRequiredOneof(); - } - - public static build.buf.validate.conformance.cases.MessageRequiredOneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageRequiredOneof 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.MessageRequiredOneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneofOrBuilder.java deleted file mode 100644 index 4ee56601..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOneofOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageRequiredOneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageRequiredOneof) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestMsg getVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder(); - - build.buf.validate.conformance.cases.MessageRequiredOneof.OneCase getOneCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOrBuilder.java deleted file mode 100644 index 0345a1fb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageRequiredOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestMsg getVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkip.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkip.java deleted file mode 100644 index 88c2ac88..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkip.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageSkip} - */ -public final class MessageSkip extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageSkip) - MessageSkipOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageSkip.class.getName()); - } - // Use MessageSkip.newBuilder() to construct. - private MessageSkip(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageSkip() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageSkip_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageSkip_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageSkip.class, build.buf.validate.conformance.cases.MessageSkip.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.TestMsg val_; - /** - * .buf.validate.conformance.cases.TestMsg 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); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.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.MessageSkip)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageSkip other = (build.buf.validate.conformance.cases.MessageSkip) 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.MessageSkip parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageSkip 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.MessageSkip parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageSkip 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.MessageSkip parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageSkip 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.MessageSkip parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageSkip 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.MessageSkip parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageSkip 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.MessageSkip 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.MessageSkip 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.MessageSkip 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.MessageSkip} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageSkip) - build.buf.validate.conformance.cases.MessageSkipOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageSkip_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageSkip_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageSkip.class, build.buf.validate.conformance.cases.MessageSkip.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageSkip.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.MessagesProto.internal_static_buf_validate_conformance_cases_MessageSkip_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageSkip getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageSkip.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageSkip build() { - build.buf.validate.conformance.cases.MessageSkip result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageSkip buildPartial() { - build.buf.validate.conformance.cases.MessageSkip result = new build.buf.validate.conformance.cases.MessageSkip(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MessageSkip 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.MessageSkip) { - return mergeFrom((build.buf.validate.conformance.cases.MessageSkip)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageSkip other) { - if (other == build.buf.validate.conformance.cases.MessageSkip.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 build.buf.validate.conformance.cases.TestMsg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.TestMsg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.TestMsg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.TestMsg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg 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; - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageSkip) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageSkip) - private static final build.buf.validate.conformance.cases.MessageSkip DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageSkip(); - } - - public static build.buf.validate.conformance.cases.MessageSkip getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageSkip 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.MessageSkip getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkipOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkipOrBuilder.java deleted file mode 100644 index 7b276090..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageSkipOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageSkipOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageSkip) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.TestMsg getVal(); - /** - * .buf.validate.conformance.cases.TestMsg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.TestMsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInside.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInside.java deleted file mode 100644 index 3ed06033..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInside.java +++ /dev/null @@ -1,358 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MessageWith3dInside} - */ -public final class MessageWith3dInside extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MessageWith3dInside) - MessageWith3dInsideOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageWith3dInside.class.getName()); - } - // Use MessageWith3dInside.newBuilder() to construct. - private MessageWith3dInside(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageWith3dInside() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageWith3dInside_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageWith3dInside_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageWith3dInside.class, build.buf.validate.conformance.cases.MessageWith3dInside.Builder.class); - } - - 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 { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.MessageWith3dInside)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MessageWith3dInside other = (build.buf.validate.conformance.cases.MessageWith3dInside) obj; - - 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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MessageWith3dInside parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageWith3dInside 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.MessageWith3dInside parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageWith3dInside 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.MessageWith3dInside parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MessageWith3dInside 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.MessageWith3dInside parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MessageWith3dInside 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.MessageWith3dInside parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MessageWith3dInside 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.MessageWith3dInside 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.MessageWith3dInside 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.MessageWith3dInside 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.MessageWith3dInside} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MessageWith3dInside) - build.buf.validate.conformance.cases.MessageWith3dInsideOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageWith3dInside_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageWith3dInside_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MessageWith3dInside.class, build.buf.validate.conformance.cases.MessageWith3dInside.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MessageWith3dInside.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_MessageWith3dInside_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageWith3dInside getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MessageWith3dInside.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageWith3dInside build() { - build.buf.validate.conformance.cases.MessageWith3dInside result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MessageWith3dInside buildPartial() { - build.buf.validate.conformance.cases.MessageWith3dInside result = new build.buf.validate.conformance.cases.MessageWith3dInside(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MessageWith3dInside) { - return mergeFrom((build.buf.validate.conformance.cases.MessageWith3dInside)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MessageWith3dInside other) { - if (other == build.buf.validate.conformance.cases.MessageWith3dInside.getDefaultInstance()) return this; - 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; - 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; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MessageWith3dInside) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MessageWith3dInside) - private static final build.buf.validate.conformance.cases.MessageWith3dInside DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MessageWith3dInside(); - } - - public static build.buf.validate.conformance.cases.MessageWith3dInside getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageWith3dInside 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.MessageWith3dInside getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInsideOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInsideOrBuilder.java deleted file mode 100644 index c1c82ed5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessageWith3dInsideOrBuilder.java +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MessageWith3dInsideOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MessageWith3dInside) - com.google.protobuf.MessageOrBuilder { -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MessagesProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MessagesProto.java deleted file mode 100644 index ad4a238c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MessagesProto.java +++ /dev/null @@ -1,209 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class MessagesProto { - private MessagesProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessagesProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TestMsg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TestMsg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageDisabled_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageDisabled_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Message_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Message_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageCrossPackage_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageCrossPackage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageSkip_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageSkip_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageRequiredOneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageRequiredOneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_MessageWith3dInside_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_MessageWith3dInside_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n-buf/validate/conformance/cases/message" + - "s.proto\022\036buf.validate.conformance.cases\032" + - "8buf/validate/conformance/cases/other_pa" + - "ckage/embed.proto\032\033buf/validate/validate" + - ".proto\"l\n\007TestMsg\022 \n\005const\030\001 \001(\tB\n\272H\007r\005\n" + - "\003fooR\005const\022?\n\006nested\030\002 \001(\0132\'.buf.valida" + - "te.conformance.cases.TestMsgR\006nested\"_\n\013" + - "MessageNone\022E\n\003val\030\001 \001(\01323.buf.validate." + - "conformance.cases.MessageNone.NoneMsgR\003v" + - "al\032\t\n\007NoneMsg\"3\n\017MessageDisabled\022\031\n\003val\030" + - "\001 \001(\004B\007\272H\0042\002 {R\003val:\005\272H\002\010\001\"D\n\007Message\0229\n" + - "\003val\030\001 \001(\0132\'.buf.validate.conformance.ca" + - "ses.TestMsgR\003val\"\\\n\023MessageCrossPackage\022" + - "E\n\003val\030\001 \001(\01323.buf.validate.conformance." + - "cases.other_package.EmbedR\003val\"P\n\013Messag" + - "eSkip\022A\n\003val\030\001 \001(\0132\'.buf.validate.confor" + - "mance.cases.TestMsgB\006\272H\003\330\001\003R\003val\"T\n\017Mess" + - "ageRequired\022A\n\003val\030\001 \001(\0132\'.buf.validate." + - "conformance.cases.TestMsgB\006\272H\003\310\001\001R\003val\"l" + - "\n\032MessageRequiredButOptional\022F\n\003val\030\001 \001(" + - "\0132\'.buf.validate.conformance.cases.TestM" + - "sgB\006\272H\003\310\001\001H\000R\003val\210\001\001B\006\n\004_val\"i\n\024MessageR" + - "equiredOneof\022C\n\003val\030\001 \001(\0132\'.buf.validate" + - ".conformance.cases.TestMsgB\006\272H\003\310\001\001H\000R\003va" + - "lB\014\n\003one\022\005\272H\002\010\001\"\025\n\023MessageWith3dInsideB\321" + - "\001\n$build.buf.validate.conformance.casesB" + - "\rMessagesProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.C" + - "onformance.Cases\312\002\036Buf\\Validate\\Conforma" + - "nce\\Cases\342\002*Buf\\Validate\\Conformance\\Cas" + - "es\\GPBMetadata\352\002!Buf::Validate::Conforma" + - "nce::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.conformance.cases.other_package.EmbedProto.getDescriptor(), - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_TestMsg_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_TestMsg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_TestMsg_descriptor, - new java.lang.String[] { "Const", "Nested", }); - internal_static_buf_validate_conformance_cases_MessageNone_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_MessageNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_descriptor = - internal_static_buf_validate_conformance_cases_MessageNone_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageNone_NoneMsg_descriptor, - new java.lang.String[] { }); - internal_static_buf_validate_conformance_cases_MessageDisabled_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_MessageDisabled_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageDisabled_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Message_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_Message_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Message_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MessageCrossPackage_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_MessageCrossPackage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageCrossPackage_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MessageSkip_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_MessageSkip_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageSkip_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MessageRequired_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_MessageRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageRequiredButOptional_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_MessageRequiredOneof_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_MessageRequiredOneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageRequiredOneof_descriptor, - new java.lang.String[] { "Val", "One", }); - internal_static_buf_validate_conformance_cases_MessageWith3dInside_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_MessageWith3dInside_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_MessageWith3dInside_descriptor, - new java.lang.String[] { }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.conformance.cases.other_package.EmbedProto.getDescriptor(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(build.buf.validate.ValidateProto.message); - registry.add(build.buf.validate.ValidateProto.oneof); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMaps.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMaps.java deleted file mode 100644 index 77f3296d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMaps.java +++ /dev/null @@ -1,1138 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.MultipleMaps} - */ -public final class MultipleMaps extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.MultipleMaps) - MultipleMapsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MultipleMaps.class.getName()); - } - // Use MultipleMaps.newBuilder() to construct. - private MultipleMaps(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MultipleMaps() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetFirst(); - case 2: - return internalGetSecond(); - case 3: - return internalGetThird(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MultipleMaps.class, build.buf.validate.conformance.cases.MultipleMaps.Builder.class); - } - - public static final int FIRST_FIELD_NUMBER = 1; - private static final class FirstDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_FirstEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT32, - 0, - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.String> first_; - private com.google.protobuf.MapField - internalGetFirst() { - if (first_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FirstDefaultEntryHolder.defaultEntry); - } - return first_; - } - public int getFirstCount() { - return internalGetFirst().getMap().size(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsFirst( - int key) { - - return internalGetFirst().getMap().containsKey(key); - } - /** - * Use {@link #getFirstMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFirst() { - return getFirstMap(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getFirstMap() { - return internalGetFirst().getMap(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getFirstOrDefault( - int key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetFirst().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getFirstOrThrow( - int key) { - - java.util.Map map = - internalGetFirst().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SECOND_FIELD_NUMBER = 2; - private static final class SecondDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Boolean> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_SecondEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.BOOL, - false); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Boolean> second_; - private com.google.protobuf.MapField - internalGetSecond() { - if (second_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SecondDefaultEntryHolder.defaultEntry); - } - return second_; - } - public int getSecondCount() { - return internalGetSecond().getMap().size(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsSecond( - int key) { - - return internalGetSecond().getMap().containsKey(key); - } - /** - * Use {@link #getSecondMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSecond() { - return getSecondMap(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getSecondMap() { - return internalGetSecond().getMap(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getSecondOrDefault( - int key, - boolean defaultValue) { - - java.util.Map map = - internalGetSecond().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getSecondOrThrow( - int key) { - - java.util.Map map = - internalGetSecond().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int THIRD_FIELD_NUMBER = 3; - private static final class ThirdDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Boolean> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_ThirdEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.BOOL, - false); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Boolean> third_; - private com.google.protobuf.MapField - internalGetThird() { - if (third_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ThirdDefaultEntryHolder.defaultEntry); - } - return third_; - } - public int getThirdCount() { - return internalGetThird().getMap().size(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsThird( - int key) { - - return internalGetThird().getMap().containsKey(key); - } - /** - * Use {@link #getThirdMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getThird() { - return getThirdMap(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getThirdMap() { - return internalGetThird().getMap(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getThirdOrDefault( - int key, - boolean defaultValue) { - - java.util.Map map = - internalGetThird().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getThirdOrThrow( - int key) { - - java.util.Map map = - internalGetThird().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetFirst(), - FirstDefaultEntryHolder.defaultEntry, - 1); - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetSecond(), - SecondDefaultEntryHolder.defaultEntry, - 2); - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetThird(), - ThirdDefaultEntryHolder.defaultEntry, - 3); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetFirst().getMap().entrySet()) { - com.google.protobuf.MapEntry - first__ = FirstDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, first__); - } - for (java.util.Map.Entry entry - : internalGetSecond().getMap().entrySet()) { - com.google.protobuf.MapEntry - second__ = SecondDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, second__); - } - for (java.util.Map.Entry entry - : internalGetThird().getMap().entrySet()) { - com.google.protobuf.MapEntry - third__ = ThirdDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, third__); - } - 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.MultipleMaps)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.MultipleMaps other = (build.buf.validate.conformance.cases.MultipleMaps) obj; - - if (!internalGetFirst().equals( - other.internalGetFirst())) return false; - if (!internalGetSecond().equals( - other.internalGetSecond())) return false; - if (!internalGetThird().equals( - other.internalGetThird())) 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 (!internalGetFirst().getMap().isEmpty()) { - hash = (37 * hash) + FIRST_FIELD_NUMBER; - hash = (53 * hash) + internalGetFirst().hashCode(); - } - if (!internalGetSecond().getMap().isEmpty()) { - hash = (37 * hash) + SECOND_FIELD_NUMBER; - hash = (53 * hash) + internalGetSecond().hashCode(); - } - if (!internalGetThird().getMap().isEmpty()) { - hash = (37 * hash) + THIRD_FIELD_NUMBER; - hash = (53 * hash) + internalGetThird().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.MultipleMaps parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MultipleMaps 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.MultipleMaps parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MultipleMaps 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.MultipleMaps parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.MultipleMaps 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.MultipleMaps parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.MultipleMaps 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.MultipleMaps parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.MultipleMaps 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.MultipleMaps 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.MultipleMaps 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.MultipleMaps 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.MultipleMaps} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.MultipleMaps) - build.buf.validate.conformance.cases.MultipleMapsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetFirst(); - case 2: - return internalGetSecond(); - case 3: - return internalGetThird(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableFirst(); - case 2: - return internalGetMutableSecond(); - case 3: - return internalGetMutableThird(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.MultipleMaps.class, build.buf.validate.conformance.cases.MultipleMaps.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.MultipleMaps.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableFirst().clear(); - internalGetMutableSecond().clear(); - internalGetMutableThird().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MapsProto.internal_static_buf_validate_conformance_cases_MultipleMaps_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MultipleMaps getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.MultipleMaps.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MultipleMaps build() { - build.buf.validate.conformance.cases.MultipleMaps result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.MultipleMaps buildPartial() { - build.buf.validate.conformance.cases.MultipleMaps result = new build.buf.validate.conformance.cases.MultipleMaps(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.MultipleMaps result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.first_ = internalGetFirst(); - result.first_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.second_ = internalGetSecond(); - result.second_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.third_ = internalGetThird(); - result.third_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.MultipleMaps) { - return mergeFrom((build.buf.validate.conformance.cases.MultipleMaps)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.MultipleMaps other) { - if (other == build.buf.validate.conformance.cases.MultipleMaps.getDefaultInstance()) return this; - internalGetMutableFirst().mergeFrom( - other.internalGetFirst()); - bitField0_ |= 0x00000001; - internalGetMutableSecond().mergeFrom( - other.internalGetSecond()); - bitField0_ |= 0x00000002; - internalGetMutableThird().mergeFrom( - other.internalGetThird()); - bitField0_ |= 0x00000004; - 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.MapEntry - first__ = input.readMessage( - FirstDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableFirst().getMutableMap().put( - first__.getKey(), first__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - com.google.protobuf.MapEntry - second__ = input.readMessage( - SecondDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableSecond().getMutableMap().put( - second__.getKey(), second__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - com.google.protobuf.MapEntry - third__ = input.readMessage( - ThirdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableThird().getMutableMap().put( - third__.getKey(), third__.getValue()); - bitField0_ |= 0x00000004; - break; - } // case 26 - 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.MapField< - java.lang.Integer, java.lang.String> first_; - private com.google.protobuf.MapField - internalGetFirst() { - if (first_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FirstDefaultEntryHolder.defaultEntry); - } - return first_; - } - private com.google.protobuf.MapField - internalGetMutableFirst() { - if (first_ == null) { - first_ = com.google.protobuf.MapField.newMapField( - FirstDefaultEntryHolder.defaultEntry); - } - if (!first_.isMutable()) { - first_ = first_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return first_; - } - public int getFirstCount() { - return internalGetFirst().getMap().size(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsFirst( - int key) { - - return internalGetFirst().getMap().containsKey(key); - } - /** - * Use {@link #getFirstMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getFirst() { - return getFirstMap(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getFirstMap() { - return internalGetFirst().getMap(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getFirstOrDefault( - int key, - /* nullable */ -java.lang.String defaultValue) { - - java.util.Map map = - internalGetFirst().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getFirstOrThrow( - int key) { - - java.util.Map map = - internalGetFirst().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearFirst() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableFirst().getMutableMap() - .clear(); - return this; - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - public Builder removeFirst( - int key) { - - internalGetMutableFirst().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableFirst() { - bitField0_ |= 0x00000001; - return internalGetMutableFirst().getMutableMap(); - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - public Builder putFirst( - int key, - java.lang.String value) { - - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableFirst().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - public Builder putAllFirst( - java.util.Map values) { - internalGetMutableFirst().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Boolean> second_; - private com.google.protobuf.MapField - internalGetSecond() { - if (second_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SecondDefaultEntryHolder.defaultEntry); - } - return second_; - } - private com.google.protobuf.MapField - internalGetMutableSecond() { - if (second_ == null) { - second_ = com.google.protobuf.MapField.newMapField( - SecondDefaultEntryHolder.defaultEntry); - } - if (!second_.isMutable()) { - second_ = second_.copy(); - } - bitField0_ |= 0x00000002; - onChanged(); - return second_; - } - public int getSecondCount() { - return internalGetSecond().getMap().size(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsSecond( - int key) { - - return internalGetSecond().getMap().containsKey(key); - } - /** - * Use {@link #getSecondMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSecond() { - return getSecondMap(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getSecondMap() { - return internalGetSecond().getMap(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getSecondOrDefault( - int key, - boolean defaultValue) { - - java.util.Map map = - internalGetSecond().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getSecondOrThrow( - int key) { - - java.util.Map map = - internalGetSecond().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearSecond() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableSecond().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - public Builder removeSecond( - int key) { - - internalGetMutableSecond().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableSecond() { - bitField0_ |= 0x00000002; - return internalGetMutableSecond().getMutableMap(); - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - public Builder putSecond( - int key, - boolean value) { - - - internalGetMutableSecond().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - public Builder putAllSecond( - java.util.Map values) { - internalGetMutableSecond().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Boolean> third_; - private com.google.protobuf.MapField - internalGetThird() { - if (third_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ThirdDefaultEntryHolder.defaultEntry); - } - return third_; - } - private com.google.protobuf.MapField - internalGetMutableThird() { - if (third_ == null) { - third_ = com.google.protobuf.MapField.newMapField( - ThirdDefaultEntryHolder.defaultEntry); - } - if (!third_.isMutable()) { - third_ = third_.copy(); - } - bitField0_ |= 0x00000004; - onChanged(); - return third_; - } - public int getThirdCount() { - return internalGetThird().getMap().size(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsThird( - int key) { - - return internalGetThird().getMap().containsKey(key); - } - /** - * Use {@link #getThirdMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getThird() { - return getThirdMap(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getThirdMap() { - return internalGetThird().getMap(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getThirdOrDefault( - int key, - boolean defaultValue) { - - java.util.Map map = - internalGetThird().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean getThirdOrThrow( - int key) { - - java.util.Map map = - internalGetThird().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearThird() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableThird().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - public Builder removeThird( - int key) { - - internalGetMutableThird().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableThird() { - bitField0_ |= 0x00000004; - return internalGetMutableThird().getMutableMap(); - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - public Builder putThird( - int key, - boolean value) { - - - internalGetMutableThird().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000004; - return this; - } - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - public Builder putAllThird( - java.util.Map values) { - internalGetMutableThird().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000004; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.MultipleMaps) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.MultipleMaps) - private static final build.buf.validate.conformance.cases.MultipleMaps DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.MultipleMaps(); - } - - public static build.buf.validate.conformance.cases.MultipleMaps getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MultipleMaps 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.MultipleMaps getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMapsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMapsOrBuilder.java deleted file mode 100644 index e9306456..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/MultipleMapsOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/maps.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface MultipleMapsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.MultipleMaps) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - int getFirstCount(); - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - boolean containsFirst( - int key); - /** - * Use {@link #getFirstMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getFirst(); - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - java.util.Map - getFirstMap(); - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getFirstOrDefault( - int key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<uint32, string> first = 1 [json_name = "first", (.buf.validate.field) = { ... } - */ - java.lang.String getFirstOrThrow( - int key); - - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - int getSecondCount(); - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - boolean containsSecond( - int key); - /** - * Use {@link #getSecondMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getSecond(); - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - java.util.Map - getSecondMap(); - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - boolean getSecondOrDefault( - int key, - boolean defaultValue); - /** - * map<int32, bool> second = 2 [json_name = "second", (.buf.validate.field) = { ... } - */ - boolean getSecondOrThrow( - int key); - - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - int getThirdCount(); - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - boolean containsThird( - int key); - /** - * Use {@link #getThirdMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getThird(); - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - java.util.Map - getThirdMap(); - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - boolean getThirdOrDefault( - int key, - boolean defaultValue); - /** - * map<int32, bool> third = 3 [json_name = "third", (.buf.validate.field) = { ... } - */ - boolean getThirdOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/NumbersProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/NumbersProto.java deleted file mode 100644 index fcdef7c9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/NumbersProto.java +++ /dev/null @@ -1,2335 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class NumbersProto { - private NumbersProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - NumbersProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatLTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatLTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatGTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatGTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatGTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatGTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatFinite_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatFinite_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatNotFinite_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatNotFinite_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatIgnore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatIgnore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatIncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatIncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_FloatExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_FloatExample_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleLTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleLTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleGTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleGTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleGTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleGTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleFinite_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleFinite_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleNotFinite_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleNotFinite_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleIgnore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleIgnore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleIncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleIncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DoubleExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DoubleExample_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int32Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int32Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64BigConstraints_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64BigConstraints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt32Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt32Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_UInt64Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_UInt64Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt32Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt32Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SInt64Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SInt64Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed32Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed32Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Fixed64Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Fixed64Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed32Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed32Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64None_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64None_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64Const_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64Const_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64In_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64In_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64NotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64NotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64LT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64LT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64LTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64LTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64GT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64GT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64GTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64GTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64GTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64GTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64GTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64GTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64Ignore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64Ignore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_SFixed64Example_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_SFixed64Example_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Int64LTEOptional_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Int64LTEOptional_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,buf/validate/conformance/cases/numbers" + - ".proto\022\036buf.validate.conformance.cases\032\033" + - "buf/validate/validate.proto\"\035\n\tFloatNone" + - "\022\020\n\003val\030\001 \001(\002R\003val\"*\n\nFloatConst\022\034\n\003val\030" + - "\001 \001(\002B\n\272H\007\n\005\r\244p\235?R\003val\",\n\007FloatIn\022!\n\003val" + - "\030\001 \001(\002B\017\272H\014\n\n5\205\353\221@5\341z\374@R\003val\"*\n\nFloatNot" + - "In\022\034\n\003val\030\001 \001(\002B\n\272H\007\n\005=\000\000\000\000R\003val\"\'\n\007Floa" + - "tLT\022\034\n\003val\030\001 \001(\002B\n\272H\007\n\005\025\000\000\000\000R\003val\"(\n\010Flo" + - "atLTE\022\034\n\003val\030\001 \001(\002B\n\272H\007\n\005\035\000\000\200BR\003val\"\'\n\007F" + - "loatGT\022\034\n\003val\030\001 \001(\002B\n\272H\007\n\005%\000\000\200AR\003val\"(\n\010" + - "FloatGTE\022\034\n\003val\030\001 \001(\002B\n\272H\007\n\005-\000\000\000AR\003val\"." + - "\n\tFloatGTLT\022!\n\003val\030\001 \001(\002B\017\272H\014\n\n\025\000\000 A%\000\000\000" + - "\000R\003val\"0\n\013FloatExLTGT\022!\n\003val\030\001 \001(\002B\017\272H\014\n" + - "\n\025\000\000\000\000%\000\000 AR\003val\"0\n\013FloatGTELTE\022!\n\003val\030\001" + - " \001(\002B\017\272H\014\n\n\035\000\000\200C-\000\000\000CR\003val\"2\n\rFloatExGTE" + - "LTE\022!\n\003val\030\001 \001(\002B\017\272H\014\n\n\035\000\000\000C-\000\000\200CR\003val\"(" + - "\n\013FloatFinite\022\031\n\003val\030\001 \001(\002B\007\272H\004\n\002@\001R\003val" + - "\"+\n\016FloatNotFinite\022\031\n\003val\030\001 \001(\002B\007\272H\004\n\002@\000" + - "R\003val\"3\n\013FloatIgnore\022$\n\003val\030\001 \001(\002B\022\272H\017\n\n" + - "\035\000\000\200C-\000\000\000C\320\001\001R\003val\"6\n\022FloatIncorrectType" + - "\022 \n\003val\030\001 \001(\002B\016\272H\013\022\t!\000\000\000\000\000\000\000\000R\003val\",\n\014Fl" + - "oatExample\022\034\n\003val\030\001 \001(\002B\n\272H\007\n\005M\000\000\000AR\003val" + - "\"\036\n\nDoubleNone\022\020\n\003val\030\001 \001(\001R\003val\"/\n\013Doub" + - "leConst\022 \n\003val\030\001 \001(\001B\016\272H\013\022\t\t\256G\341z\024\256\363?R\003va" + - "l\"5\n\010DoubleIn\022)\n\003val\030\001 \001(\001B\027\272H\024\022\0221=\n\327\243p=" + - "\022@1\217\302\365(\\\217\037@R\003val\"/\n\013DoubleNotIn\022 \n\003val\030\001" + - " \001(\001B\016\272H\013\022\t9\000\000\000\000\000\000\000\000R\003val\",\n\010DoubleLT\022 \n" + - "\003val\030\001 \001(\001B\016\272H\013\022\t\021\000\000\000\000\000\000\000\000R\003val\"-\n\tDoubl" + - "eLTE\022 \n\003val\030\001 \001(\001B\016\272H\013\022\t\031\000\000\000\000\000\000P@R\003val\"," + - "\n\010DoubleGT\022 \n\003val\030\001 \001(\001B\016\272H\013\022\t!\000\000\000\000\000\0000@R" + - "\003val\"-\n\tDoubleGTE\022 \n\003val\030\001 \001(\001B\016\272H\013\022\t)\000\000" + - "\000\000\000\000 @R\003val\"7\n\nDoubleGTLT\022)\n\003val\030\001 \001(\001B\027" + - "\272H\024\022\022\021\000\000\000\000\000\000$@!\000\000\000\000\000\000\000\000R\003val\"9\n\014DoubleEx" + - "LTGT\022)\n\003val\030\001 \001(\001B\027\272H\024\022\022\021\000\000\000\000\000\000\000\000!\000\000\000\000\000\000" + - "$@R\003val\"9\n\014DoubleGTELTE\022)\n\003val\030\001 \001(\001B\027\272H" + - "\024\022\022\031\000\000\000\000\000\000p@)\000\000\000\000\000\000`@R\003val\";\n\016DoubleExGT" + - "ELTE\022)\n\003val\030\001 \001(\001B\027\272H\024\022\022\031\000\000\000\000\000\000`@)\000\000\000\000\000\000" + - "p@R\003val\")\n\014DoubleFinite\022\031\n\003val\030\001 \001(\001B\007\272H" + - "\004\022\002@\001R\003val\",\n\017DoubleNotFinite\022\031\n\003val\030\001 \001" + - "(\001B\007\272H\004\022\002@\000R\003val\"<\n\014DoubleIgnore\022,\n\003val\030" + - "\001 \001(\001B\032\272H\027\022\022\031\000\000\000\000\000\000p@)\000\000\000\000\000\000`@\320\001\001R\003val\"3" + - "\n\023DoubleIncorrectType\022\034\n\003val\030\001 \001(\001B\n\272H\007\n" + - "\005%\000\000\000\000R\003val\"1\n\rDoubleExample\022 \n\003val\030\001 \001(" + - "\001B\016\272H\013\022\tI\000\000\000\000\000\000\000\000R\003val\"\035\n\tInt32None\022\020\n\003v" + - "al\030\001 \001(\005R\003val\"\'\n\nInt32Const\022\031\n\003val\030\001 \001(\005" + - "B\007\272H\004\032\002\010\001R\003val\"&\n\007Int32In\022\033\n\003val\030\001 \001(\005B\t" + - "\272H\006\032\0040\0020\003R\003val\"\'\n\nInt32NotIn\022\031\n\003val\030\001 \001(" + - "\005B\007\272H\004\032\0028\000R\003val\"$\n\007Int32LT\022\031\n\003val\030\001 \001(\005B" + - "\007\272H\004\032\002\020\000R\003val\"%\n\010Int32LTE\022\031\n\003val\030\001 \001(\005B\007" + - "\272H\004\032\002\030@R\003val\"$\n\007Int32GT\022\031\n\003val\030\001 \001(\005B\007\272H" + - "\004\032\002 \020R\003val\"%\n\010Int32GTE\022\031\n\003val\030\001 \001(\005B\007\272H\004" + - "\032\002(\010R\003val\"(\n\tInt32GTLT\022\033\n\003val\030\001 \001(\005B\t\272H\006" + - "\032\004\020\n \000R\003val\"*\n\013Int32ExLTGT\022\033\n\003val\030\001 \001(\005B" + - "\t\272H\006\032\004\020\000 \nR\003val\",\n\013Int32GTELTE\022\035\n\003val\030\001 " + - "\001(\005B\013\272H\010\032\006\030\200\002(\200\001R\003val\".\n\rInt32ExGTELTE\022\035" + - "\n\003val\030\001 \001(\005B\013\272H\010\032\006\030\200\001(\200\002R\003val\"/\n\013Int32Ig" + - "nore\022 \n\003val\030\001 \001(\005B\016\272H\013\032\006\030\200\002(\200\001\320\001\001R\003val\"2" + - "\n\022Int32IncorrectType\022\034\n\003val\030\001 \001(\005B\n\272H\007\n\005" + - "%\000\000\000\000R\003val\")\n\014Int32Example\022\031\n\003val\030\001 \001(\005B" + - "\007\272H\004\032\002@\nR\003val\"\035\n\tInt64None\022\020\n\003val\030\001 \001(\003R" + - "\003val\"\'\n\nInt64Const\022\031\n\003val\030\001 \001(\003B\007\272H\004\"\002\010\001" + - "R\003val\"&\n\007Int64In\022\033\n\003val\030\001 \001(\003B\t\272H\006\"\0040\0020\003" + - "R\003val\"\'\n\nInt64NotIn\022\031\n\003val\030\001 \001(\003B\007\272H\004\"\0028" + - "\000R\003val\"$\n\007Int64LT\022\031\n\003val\030\001 \001(\003B\007\272H\004\"\002\020\000R" + - "\003val\"%\n\010Int64LTE\022\031\n\003val\030\001 \001(\003B\007\272H\004\"\002\030@R\003" + - "val\"$\n\007Int64GT\022\031\n\003val\030\001 \001(\003B\007\272H\004\"\002 \020R\003va" + - "l\"%\n\010Int64GTE\022\031\n\003val\030\001 \001(\003B\007\272H\004\"\002(\010R\003val" + - "\"(\n\tInt64GTLT\022\033\n\003val\030\001 \001(\003B\t\272H\006\"\004\020\n \000R\003v" + - "al\"*\n\013Int64ExLTGT\022\033\n\003val\030\001 \001(\003B\t\272H\006\"\004\020\000 " + - "\nR\003val\",\n\013Int64GTELTE\022\035\n\003val\030\001 \001(\003B\013\272H\010\"" + - "\006\030\200\002(\200\001R\003val\".\n\rInt64ExGTELTE\022\035\n\003val\030\001 \001" + - "(\003B\013\272H\010\"\006\030\200\001(\200\002R\003val\"/\n\013Int64Ignore\022 \n\003v" + - "al\030\001 \001(\003B\016\272H\013\"\006\030\200\002(\200\001\320\001\001R\003val\"\214\004\n\023Int64B" + - "igConstraints\022\"\n\006lt_pos\030\001 \001(\003B\013\272H\010\"\006\020\246\335\207" + - "\244\024R\005ltPos\022\'\n\006lt_neg\030\002 \001(\003B\020\272H\r\"\013\020\332\242\370\333\353\377\377" + - "\377\377\001R\005ltNeg\022\"\n\006gt_pos\030\003 \001(\003B\013\272H\010\"\006 \246\335\207\244\024R" + - "\005gtPos\022\'\n\006gt_neg\030\004 \001(\003B\020\272H\r\"\013 \332\242\370\333\353\377\377\377\377\001" + - "R\005gtNeg\022$\n\007lte_pos\030\005 \001(\003B\013\272H\010\"\006\030\246\335\207\244\024R\006l" + - "tePos\022)\n\007lte_neg\030\006 \001(\003B\020\272H\r\"\013\030\332\242\370\333\353\377\377\377\377\001" + - "R\006lteNeg\022$\n\007gte_pos\030\007 \001(\003B\013\272H\010\"\006(\246\335\207\244\024R\006" + - "gtePos\022)\n\007gte_neg\030\010 \001(\003B\020\272H\r\"\013(\332\242\370\333\353\377\377\377\377" + - "\001R\006gteNeg\022.\n\014constant_pos\030\t \001(\003B\013\272H\010\"\006\010\246" + - "\335\207\244\024R\013constantPos\0223\n\014constant_neg\030\n \001(\003B" + - "\020\272H\r\"\013\010\332\242\370\333\353\377\377\377\377\001R\013constantNeg\022&\n\002in\030\013 \001" + - "(\003B\026\272H\023\"\0210\246\335\207\244\0240\332\242\370\333\353\377\377\377\377\001R\002in\022,\n\005notin\030" + - "\014 \001(\003B\026\272H\023\"\0218\246\335\207\244\0248\332\242\370\333\353\377\377\377\377\001R\005notin\"2\n\022" + - "Int64IncorrectType\022\034\n\003val\030\001 \001(\003B\n\272H\007\n\005%\000" + - "\000\000\000R\003val\")\n\014Int64Example\022\031\n\003val\030\001 \001(\003B\007\272" + - "H\004\"\002H\nR\003val\"\036\n\nUInt32None\022\020\n\003val\030\001 \001(\rR\003" + - "val\"(\n\013UInt32Const\022\031\n\003val\030\001 \001(\rB\007\272H\004*\002\010\001" + - "R\003val\"\'\n\010UInt32In\022\033\n\003val\030\001 \001(\rB\t\272H\006*\0040\0020" + - "\003R\003val\"(\n\013UInt32NotIn\022\031\n\003val\030\001 \001(\rB\007\272H\004*" + - "\0028\000R\003val\"%\n\010UInt32LT\022\031\n\003val\030\001 \001(\rB\007\272H\004*\002" + - "\020\005R\003val\"&\n\tUInt32LTE\022\031\n\003val\030\001 \001(\rB\007\272H\004*\002" + - "\030@R\003val\"%\n\010UInt32GT\022\031\n\003val\030\001 \001(\rB\007\272H\004*\002 " + - "\020R\003val\"&\n\tUInt32GTE\022\031\n\003val\030\001 \001(\rB\007\272H\004*\002(" + - "\010R\003val\")\n\nUInt32GTLT\022\033\n\003val\030\001 \001(\rB\t\272H\006*\004" + - "\020\n \005R\003val\"+\n\014UInt32ExLTGT\022\033\n\003val\030\001 \001(\rB\t" + - "\272H\006*\004\020\005 \nR\003val\"-\n\014UInt32GTELTE\022\035\n\003val\030\001 " + - "\001(\rB\013\272H\010*\006\030\200\002(\200\001R\003val\"/\n\016UInt32ExGTELTE\022" + - "\035\n\003val\030\001 \001(\rB\013\272H\010*\006\030\200\001(\200\002R\003val\"0\n\014UInt32" + - "Ignore\022 \n\003val\030\001 \001(\rB\016\272H\013*\006\030\200\002(\200\001\320\001\001R\003val" + - "\"3\n\023UInt32IncorrectType\022\034\n\003val\030\001 \001(\rB\n\272H" + - "\007\n\005%\000\000\000\000R\003val\"*\n\rUInt32Example\022\031\n\003val\030\001 " + - "\001(\rB\007\272H\004*\002@\000R\003val\"\036\n\nUInt64None\022\020\n\003val\030\001" + - " \001(\004R\003val\"(\n\013UInt64Const\022\031\n\003val\030\001 \001(\004B\007\272" + - "H\0042\002\010\001R\003val\"\'\n\010UInt64In\022\033\n\003val\030\001 \001(\004B\t\272H" + - "\0062\0040\0020\003R\003val\"(\n\013UInt64NotIn\022\031\n\003val\030\001 \001(\004" + - "B\007\272H\0042\0028\000R\003val\"%\n\010UInt64LT\022\031\n\003val\030\001 \001(\004B" + - "\007\272H\0042\002\020\005R\003val\"&\n\tUInt64LTE\022\031\n\003val\030\001 \001(\004B" + - "\007\272H\0042\002\030@R\003val\"%\n\010UInt64GT\022\031\n\003val\030\001 \001(\004B\007" + - "\272H\0042\002 \020R\003val\"&\n\tUInt64GTE\022\031\n\003val\030\001 \001(\004B\007" + - "\272H\0042\002(\010R\003val\")\n\nUInt64GTLT\022\033\n\003val\030\001 \001(\004B" + - "\t\272H\0062\004\020\n \005R\003val\"+\n\014UInt64ExLTGT\022\033\n\003val\030\001" + - " \001(\004B\t\272H\0062\004\020\005 \nR\003val\"-\n\014UInt64GTELTE\022\035\n\003" + - "val\030\001 \001(\004B\013\272H\0102\006\030\200\002(\200\001R\003val\"/\n\016UInt64ExG" + - "TELTE\022\035\n\003val\030\001 \001(\004B\013\272H\0102\006\030\200\001(\200\002R\003val\"0\n\014" + - "UInt64Ignore\022 \n\003val\030\001 \001(\004B\016\272H\0132\006\030\200\002(\200\001\320\001" + - "\001R\003val\"3\n\023UInt64IncorrectType\022\034\n\003val\030\001 \001" + - "(\004B\n\272H\007\n\005%\000\000\000\000R\003val\"*\n\rUInt64Example\022\031\n\003" + - "val\030\001 \001(\004B\007\272H\0042\002@\000R\003val\"\036\n\nSInt32None\022\020\n" + - "\003val\030\001 \001(\021R\003val\"(\n\013SInt32Const\022\031\n\003val\030\001 " + - "\001(\021B\007\272H\004:\002\010\002R\003val\"\'\n\010SInt32In\022\033\n\003val\030\001 \001" + - "(\021B\t\272H\006:\0040\0040\006R\003val\"(\n\013SInt32NotIn\022\031\n\003val" + - "\030\001 \001(\021B\007\272H\004:\0028\000R\003val\"%\n\010SInt32LT\022\031\n\003val\030" + - "\001 \001(\021B\007\272H\004:\002\020\000R\003val\"\'\n\tSInt32LTE\022\032\n\003val\030" + - "\001 \001(\021B\010\272H\005:\003\030\200\001R\003val\"%\n\010SInt32GT\022\031\n\003val\030" + - "\001 \001(\021B\007\272H\004:\002 R\003val\"&\n\tSInt32GTE\022\031\n\003val\030" + - "\001 \001(\021B\007\272H\004:\002(\020R\003val\")\n\nSInt32GTLT\022\033\n\003val" + - "\030\001 \001(\021B\t\272H\006:\004\020\024 \000R\003val\"+\n\014SInt32ExLTGT\022\033" + - "\n\003val\030\001 \001(\021B\t\272H\006:\004\020\000 \024R\003val\"-\n\014SInt32GTE" + - "LTE\022\035\n\003val\030\001 \001(\021B\013\272H\010:\006\030\200\004(\200\002R\003val\"/\n\016SI" + - "nt32ExGTELTE\022\035\n\003val\030\001 \001(\021B\013\272H\010:\006\030\200\002(\200\004R\003" + - "val\"0\n\014SInt32Ignore\022 \n\003val\030\001 \001(\021B\016\272H\013:\006\030" + - "\200\004(\200\002\320\001\001R\003val\"3\n\023SInt32IncorrectType\022\034\n\003" + - "val\030\001 \001(\021B\n\272H\007\n\005%\000\000\000\000R\003val\"*\n\rSInt32Exam" + - "ple\022\031\n\003val\030\001 \001(\021B\007\272H\004:\002@\000R\003val\"\036\n\nSInt64" + - "None\022\020\n\003val\030\001 \001(\022R\003val\"(\n\013SInt64Const\022\031\n" + - "\003val\030\001 \001(\022B\007\272H\004B\002\010\002R\003val\"\'\n\010SInt64In\022\033\n\003" + - "val\030\001 \001(\022B\t\272H\006B\0040\0040\006R\003val\"(\n\013SInt64NotIn" + - "\022\031\n\003val\030\001 \001(\022B\007\272H\004B\0028\000R\003val\"%\n\010SInt64LT\022" + - "\031\n\003val\030\001 \001(\022B\007\272H\004B\002\020\000R\003val\"\'\n\tSInt64LTE\022" + - "\032\n\003val\030\001 \001(\022B\010\272H\005B\003\030\200\001R\003val\"%\n\010SInt64GT\022" + - "\031\n\003val\030\001 \001(\022B\007\272H\004B\002 R\003val\"&\n\tSInt64GTE\022" + - "\031\n\003val\030\001 \001(\022B\007\272H\004B\002(\020R\003val\")\n\nSInt64GTLT" + - "\022\033\n\003val\030\001 \001(\022B\t\272H\006B\004\020\024 \000R\003val\"+\n\014SInt64E" + - "xLTGT\022\033\n\003val\030\001 \001(\022B\t\272H\006B\004\020\000 \024R\003val\"-\n\014SI" + - "nt64GTELTE\022\035\n\003val\030\001 \001(\022B\013\272H\010B\006\030\200\004(\200\002R\003va" + - "l\"/\n\016SInt64ExGTELTE\022\035\n\003val\030\001 \001(\022B\013\272H\010B\006\030" + - "\200\002(\200\004R\003val\"0\n\014SInt64Ignore\022 \n\003val\030\001 \001(\022B" + - "\016\272H\013B\006\030\200\004(\200\002\320\001\001R\003val\"3\n\023SInt64IncorrectT" + - "ype\022\034\n\003val\030\001 \001(\022B\n\272H\007\n\005%\000\000\000\000R\003val\"*\n\rSIn" + - "t64Example\022\031\n\003val\030\001 \001(\022B\007\272H\004B\002@\000R\003val\"\037\n" + - "\013Fixed32None\022\020\n\003val\030\001 \001(\007R\003val\",\n\014Fixed3" + - "2Const\022\034\n\003val\030\001 \001(\007B\n\272H\007J\005\r\001\000\000\000R\003val\".\n\t" + - "Fixed32In\022!\n\003val\030\001 \001(\007B\017\272H\014J\n5\002\000\000\0005\003\000\000\000R" + - "\003val\",\n\014Fixed32NotIn\022\034\n\003val\030\001 \001(\007B\n\272H\007J\005" + - "=\000\000\000\000R\003val\")\n\tFixed32LT\022\034\n\003val\030\001 \001(\007B\n\272H" + - "\007J\005\025\005\000\000\000R\003val\"*\n\nFixed32LTE\022\034\n\003val\030\001 \001(\007" + - "B\n\272H\007J\005\035@\000\000\000R\003val\")\n\tFixed32GT\022\034\n\003val\030\001 " + - "\001(\007B\n\272H\007J\005%\020\000\000\000R\003val\"*\n\nFixed32GTE\022\034\n\003va" + - "l\030\001 \001(\007B\n\272H\007J\005-\010\000\000\000R\003val\"0\n\013Fixed32GTLT\022" + - "!\n\003val\030\001 \001(\007B\017\272H\014J\n\025\n\000\000\000%\005\000\000\000R\003val\"2\n\rFi" + - "xed32ExLTGT\022!\n\003val\030\001 \001(\007B\017\272H\014J\n\025\005\000\000\000%\n\000\000" + - "\000R\003val\"2\n\rFixed32GTELTE\022!\n\003val\030\001 \001(\007B\017\272H" + - "\014J\n\035\000\001\000\000-\200\000\000\000R\003val\"4\n\017Fixed32ExGTELTE\022!\n" + - "\003val\030\001 \001(\007B\017\272H\014J\n\035\200\000\000\000-\000\001\000\000R\003val\"5\n\rFixe" + - "d32Ignore\022$\n\003val\030\001 \001(\007B\022\272H\017J\n\035\000\001\000\000-\200\000\000\000\320" + - "\001\001R\003val\"4\n\024Fixed32IncorrectType\022\034\n\003val\030\001" + - " \001(\007B\n\272H\007\n\005%\000\000\000\000R\003val\".\n\016Fixed32Example\022" + - "\034\n\003val\030\001 \001(\007B\n\272H\007J\005E\000\000\000\000R\003val\"\037\n\013Fixed64" + - "None\022\020\n\003val\030\001 \001(\006R\003val\"0\n\014Fixed64Const\022 " + - "\n\003val\030\001 \001(\006B\016\272H\013R\t\t\001\000\000\000\000\000\000\000R\003val\"6\n\tFixe" + - "d64In\022)\n\003val\030\001 \001(\006B\027\272H\024R\0221\002\000\000\000\000\000\000\0001\003\000\000\000\000" + - "\000\000\000R\003val\"0\n\014Fixed64NotIn\022 \n\003val\030\001 \001(\006B\016\272" + - "H\013R\t9\000\000\000\000\000\000\000\000R\003val\"-\n\tFixed64LT\022 \n\003val\030\001" + - " \001(\006B\016\272H\013R\t\021\005\000\000\000\000\000\000\000R\003val\".\n\nFixed64LTE\022" + - " \n\003val\030\001 \001(\006B\016\272H\013R\t\031@\000\000\000\000\000\000\000R\003val\"-\n\tFix" + - "ed64GT\022 \n\003val\030\001 \001(\006B\016\272H\013R\t!\020\000\000\000\000\000\000\000R\003val" + - "\".\n\nFixed64GTE\022 \n\003val\030\001 \001(\006B\016\272H\013R\t)\010\000\000\000\000" + - "\000\000\000R\003val\"8\n\013Fixed64GTLT\022)\n\003val\030\001 \001(\006B\027\272H" + - "\024R\022\021\n\000\000\000\000\000\000\000!\005\000\000\000\000\000\000\000R\003val\":\n\rFixed64ExL" + - "TGT\022)\n\003val\030\001 \001(\006B\027\272H\024R\022\021\005\000\000\000\000\000\000\000!\n\000\000\000\000\000\000" + - "\000R\003val\":\n\rFixed64GTELTE\022)\n\003val\030\001 \001(\006B\027\272H" + - "\024R\022\031\000\001\000\000\000\000\000\000)\200\000\000\000\000\000\000\000R\003val\"<\n\017Fixed64ExG" + - "TELTE\022)\n\003val\030\001 \001(\006B\027\272H\024R\022\031\200\000\000\000\000\000\000\000)\000\001\000\000\000" + - "\000\000\000R\003val\"=\n\rFixed64Ignore\022,\n\003val\030\001 \001(\006B\032" + - "\272H\027R\022\031\000\001\000\000\000\000\000\000)\200\000\000\000\000\000\000\000\320\001\001R\003val\"4\n\024Fixed" + - "64IncorrectType\022\034\n\003val\030\001 \001(\006B\n\272H\007\n\005%\000\000\000\000" + - "R\003val\"2\n\016Fixed64Example\022 \n\003val\030\001 \001(\006B\016\272H" + - "\013R\tA\000\000\000\000\000\000\000\000R\003val\" \n\014SFixed32None\022\020\n\003val" + - "\030\001 \001(\017R\003val\"-\n\rSFixed32Const\022\034\n\003val\030\001 \001(" + - "\017B\n\272H\007Z\005\r\001\000\000\000R\003val\"/\n\nSFixed32In\022!\n\003val\030" + - "\001 \001(\017B\017\272H\014Z\n5\002\000\000\0005\003\000\000\000R\003val\"-\n\rSFixed32N" + - "otIn\022\034\n\003val\030\001 \001(\017B\n\272H\007Z\005=\000\000\000\000R\003val\"*\n\nSF" + - "ixed32LT\022\034\n\003val\030\001 \001(\017B\n\272H\007Z\005\025\000\000\000\000R\003val\"+" + - "\n\013SFixed32LTE\022\034\n\003val\030\001 \001(\017B\n\272H\007Z\005\035@\000\000\000R\003" + - "val\"*\n\nSFixed32GT\022\034\n\003val\030\001 \001(\017B\n\272H\007Z\005%\020\000" + - "\000\000R\003val\"+\n\013SFixed32GTE\022\034\n\003val\030\001 \001(\017B\n\272H\007" + - "Z\005-\010\000\000\000R\003val\"1\n\014SFixed32GTLT\022!\n\003val\030\001 \001(" + - "\017B\017\272H\014Z\n\025\n\000\000\000%\000\000\000\000R\003val\"3\n\016SFixed32ExLTG" + - "T\022!\n\003val\030\001 \001(\017B\017\272H\014Z\n\025\000\000\000\000%\n\000\000\000R\003val\"3\n\016" + - "SFixed32GTELTE\022!\n\003val\030\001 \001(\017B\017\272H\014Z\n\035\000\001\000\000-" + - "\200\000\000\000R\003val\"5\n\020SFixed32ExGTELTE\022!\n\003val\030\001 \001" + - "(\017B\017\272H\014Z\n\035\200\000\000\000-\000\001\000\000R\003val\"6\n\016SFixed32Igno" + - "re\022$\n\003val\030\001 \001(\017B\022\272H\017Z\n\035\000\001\000\000-\200\000\000\000\320\001\001R\003val" + - "\"5\n\025SFixed32IncorrectType\022\034\n\003val\030\001 \001(\017B\n" + - "\272H\007\n\005%\000\000\000\000R\003val\"/\n\017SFixed32Example\022\034\n\003va" + - "l\030\001 \001(\017B\n\272H\007Z\005E\000\000\000\000R\003val\" \n\014SFixed64None" + - "\022\020\n\003val\030\001 \001(\020R\003val\"1\n\rSFixed64Const\022 \n\003v" + - "al\030\001 \001(\020B\016\272H\013b\t\t\001\000\000\000\000\000\000\000R\003val\"7\n\nSFixed6" + - "4In\022)\n\003val\030\001 \001(\020B\027\272H\024b\0221\002\000\000\000\000\000\000\0001\003\000\000\000\000\000\000" + - "\000R\003val\"1\n\rSFixed64NotIn\022 \n\003val\030\001 \001(\020B\016\272H" + - "\013b\t9\000\000\000\000\000\000\000\000R\003val\".\n\nSFixed64LT\022 \n\003val\030\001" + - " \001(\020B\016\272H\013b\t\021\000\000\000\000\000\000\000\000R\003val\"/\n\013SFixed64LTE" + - "\022 \n\003val\030\001 \001(\020B\016\272H\013b\t\031@\000\000\000\000\000\000\000R\003val\".\n\nSF" + - "ixed64GT\022 \n\003val\030\001 \001(\020B\016\272H\013b\t!\020\000\000\000\000\000\000\000R\003v" + - "al\"/\n\013SFixed64GTE\022 \n\003val\030\001 \001(\020B\016\272H\013b\t)\010\000" + - "\000\000\000\000\000\000R\003val\"9\n\014SFixed64GTLT\022)\n\003val\030\001 \001(\020" + - "B\027\272H\024b\022\021\n\000\000\000\000\000\000\000!\000\000\000\000\000\000\000\000R\003val\";\n\016SFixed" + - "64ExLTGT\022)\n\003val\030\001 \001(\020B\027\272H\024b\022\021\000\000\000\000\000\000\000\000!\n\000" + - "\000\000\000\000\000\000R\003val\";\n\016SFixed64GTELTE\022)\n\003val\030\001 \001" + - "(\020B\027\272H\024b\022\031\000\001\000\000\000\000\000\000)\200\000\000\000\000\000\000\000R\003val\"=\n\020SFix" + - "ed64ExGTELTE\022)\n\003val\030\001 \001(\020B\027\272H\024b\022\031\200\000\000\000\000\000\000" + - "\000)\000\001\000\000\000\000\000\000R\003val\">\n\016SFixed64Ignore\022,\n\003val" + - "\030\001 \001(\020B\032\272H\027b\022\031\000\001\000\000\000\000\000\000)\200\000\000\000\000\000\000\000\320\001\001R\003val\"" + - "5\n\025SFixed64IncorrectType\022\034\n\003val\030\001 \001(\020B\n\272" + - "H\007\n\005%\000\000\000\000R\003val\"3\n\017SFixed64Example\022 \n\003val" + - "\030\001 \001(\020B\016\272H\013b\tA\000\000\000\000\000\000\000\000R\003val\":\n\020Int64LTEO" + - "ptional\022\036\n\003val\030\001 \001(\003B\007\272H\004\"\002\030@H\000R\003val\210\001\001B" + - "\006\n\004_valB\320\001\n$build.buf.validate.conforman" + - "ce.casesB\014NumbersProtoP\001\242\002\004BVCC\252\002\036Buf.Va" + - "lidate.Conformance.Cases\312\002\036Buf\\Validate\\" + - "Conformance\\Cases\342\002*Buf\\Validate\\Conform" + - "ance\\Cases\\GPBMetadata\352\002!Buf::Validate::" + - "Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_FloatNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_FloatNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatConst_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_FloatConst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatConst_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatIn_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_FloatIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatNotIn_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_FloatNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatLT_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_FloatLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatLTE_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_FloatLTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatLTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatGT_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_FloatGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatGTE_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_FloatGTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatGTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatGTLT_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_FloatGTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatGTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatExLTGT_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_FloatExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatGTELTE_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_FloatGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_FloatExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatFinite_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_FloatFinite_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatFinite_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatNotFinite_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_FloatNotFinite_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatNotFinite_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatIgnore_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_FloatIgnore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatIgnore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatIncorrectType_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_FloatIncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatIncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_FloatExample_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_FloatExample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_FloatExample_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleNone_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_DoubleNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleConst_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_DoubleConst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleConst_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleIn_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_DoubleIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleNotIn_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_DoubleNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleLT_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_conformance_cases_DoubleLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleLTE_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_conformance_cases_DoubleLTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleLTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleGT_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_conformance_cases_DoubleGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleGTE_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_conformance_cases_DoubleGTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleGTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleGTLT_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_conformance_cases_DoubleGTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleGTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleExLTGT_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_buf_validate_conformance_cases_DoubleExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleGTELTE_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_buf_validate_conformance_cases_DoubleGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_buf_validate_conformance_cases_DoubleExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleFinite_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_buf_validate_conformance_cases_DoubleFinite_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleFinite_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleNotFinite_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_buf_validate_conformance_cases_DoubleNotFinite_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleNotFinite_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleIgnore_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_buf_validate_conformance_cases_DoubleIgnore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleIgnore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleIncorrectType_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_buf_validate_conformance_cases_DoubleIncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleIncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_DoubleExample_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_buf_validate_conformance_cases_DoubleExample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_DoubleExample_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32None_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_buf_validate_conformance_cases_Int32None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32Const_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_buf_validate_conformance_cases_Int32Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32In_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_buf_validate_conformance_cases_Int32In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32NotIn_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_buf_validate_conformance_cases_Int32NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32LT_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_buf_validate_conformance_cases_Int32LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32LTE_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_buf_validate_conformance_cases_Int32LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32GT_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_buf_validate_conformance_cases_Int32GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32GTE_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_buf_validate_conformance_cases_Int32GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32GTLT_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_buf_validate_conformance_cases_Int32GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_buf_validate_conformance_cases_Int32ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32GTELTE_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_buf_validate_conformance_cases_Int32GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_buf_validate_conformance_cases_Int32ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32Ignore_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_buf_validate_conformance_cases_Int32Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_buf_validate_conformance_cases_Int32IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int32Example_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_buf_validate_conformance_cases_Int32Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int32Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64None_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_buf_validate_conformance_cases_Int64None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64Const_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_buf_validate_conformance_cases_Int64Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64In_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_buf_validate_conformance_cases_Int64In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64NotIn_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_buf_validate_conformance_cases_Int64NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64LT_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_buf_validate_conformance_cases_Int64LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64LTE_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_buf_validate_conformance_cases_Int64LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64GT_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_buf_validate_conformance_cases_Int64GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64GTE_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_buf_validate_conformance_cases_Int64GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64GTLT_descriptor = - getDescriptor().getMessageTypes().get(57); - internal_static_buf_validate_conformance_cases_Int64GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(58); - internal_static_buf_validate_conformance_cases_Int64ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64GTELTE_descriptor = - getDescriptor().getMessageTypes().get(59); - internal_static_buf_validate_conformance_cases_Int64GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(60); - internal_static_buf_validate_conformance_cases_Int64ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64Ignore_descriptor = - getDescriptor().getMessageTypes().get(61); - internal_static_buf_validate_conformance_cases_Int64Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64BigConstraints_descriptor = - getDescriptor().getMessageTypes().get(62); - internal_static_buf_validate_conformance_cases_Int64BigConstraints_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64BigConstraints_descriptor, - new java.lang.String[] { "LtPos", "LtNeg", "GtPos", "GtNeg", "LtePos", "LteNeg", "GtePos", "GteNeg", "ConstantPos", "ConstantNeg", "In", "Notin", }); - internal_static_buf_validate_conformance_cases_Int64IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(63); - internal_static_buf_validate_conformance_cases_Int64IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64Example_descriptor = - getDescriptor().getMessageTypes().get(64); - internal_static_buf_validate_conformance_cases_Int64Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32None_descriptor = - getDescriptor().getMessageTypes().get(65); - internal_static_buf_validate_conformance_cases_UInt32None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32Const_descriptor = - getDescriptor().getMessageTypes().get(66); - internal_static_buf_validate_conformance_cases_UInt32Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32In_descriptor = - getDescriptor().getMessageTypes().get(67); - internal_static_buf_validate_conformance_cases_UInt32In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32NotIn_descriptor = - getDescriptor().getMessageTypes().get(68); - internal_static_buf_validate_conformance_cases_UInt32NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32LT_descriptor = - getDescriptor().getMessageTypes().get(69); - internal_static_buf_validate_conformance_cases_UInt32LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32LTE_descriptor = - getDescriptor().getMessageTypes().get(70); - internal_static_buf_validate_conformance_cases_UInt32LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32GT_descriptor = - getDescriptor().getMessageTypes().get(71); - internal_static_buf_validate_conformance_cases_UInt32GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32GTE_descriptor = - getDescriptor().getMessageTypes().get(72); - internal_static_buf_validate_conformance_cases_UInt32GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32GTLT_descriptor = - getDescriptor().getMessageTypes().get(73); - internal_static_buf_validate_conformance_cases_UInt32GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(74); - internal_static_buf_validate_conformance_cases_UInt32ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32GTELTE_descriptor = - getDescriptor().getMessageTypes().get(75); - internal_static_buf_validate_conformance_cases_UInt32GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(76); - internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32Ignore_descriptor = - getDescriptor().getMessageTypes().get(77); - internal_static_buf_validate_conformance_cases_UInt32Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(78); - internal_static_buf_validate_conformance_cases_UInt32IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt32Example_descriptor = - getDescriptor().getMessageTypes().get(79); - internal_static_buf_validate_conformance_cases_UInt32Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt32Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64None_descriptor = - getDescriptor().getMessageTypes().get(80); - internal_static_buf_validate_conformance_cases_UInt64None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64Const_descriptor = - getDescriptor().getMessageTypes().get(81); - internal_static_buf_validate_conformance_cases_UInt64Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64In_descriptor = - getDescriptor().getMessageTypes().get(82); - internal_static_buf_validate_conformance_cases_UInt64In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64NotIn_descriptor = - getDescriptor().getMessageTypes().get(83); - internal_static_buf_validate_conformance_cases_UInt64NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64LT_descriptor = - getDescriptor().getMessageTypes().get(84); - internal_static_buf_validate_conformance_cases_UInt64LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64LTE_descriptor = - getDescriptor().getMessageTypes().get(85); - internal_static_buf_validate_conformance_cases_UInt64LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64GT_descriptor = - getDescriptor().getMessageTypes().get(86); - internal_static_buf_validate_conformance_cases_UInt64GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64GTE_descriptor = - getDescriptor().getMessageTypes().get(87); - internal_static_buf_validate_conformance_cases_UInt64GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64GTLT_descriptor = - getDescriptor().getMessageTypes().get(88); - internal_static_buf_validate_conformance_cases_UInt64GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(89); - internal_static_buf_validate_conformance_cases_UInt64ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64GTELTE_descriptor = - getDescriptor().getMessageTypes().get(90); - internal_static_buf_validate_conformance_cases_UInt64GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(91); - internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64Ignore_descriptor = - getDescriptor().getMessageTypes().get(92); - internal_static_buf_validate_conformance_cases_UInt64Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(93); - internal_static_buf_validate_conformance_cases_UInt64IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_UInt64Example_descriptor = - getDescriptor().getMessageTypes().get(94); - internal_static_buf_validate_conformance_cases_UInt64Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_UInt64Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32None_descriptor = - getDescriptor().getMessageTypes().get(95); - internal_static_buf_validate_conformance_cases_SInt32None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32Const_descriptor = - getDescriptor().getMessageTypes().get(96); - internal_static_buf_validate_conformance_cases_SInt32Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32In_descriptor = - getDescriptor().getMessageTypes().get(97); - internal_static_buf_validate_conformance_cases_SInt32In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32NotIn_descriptor = - getDescriptor().getMessageTypes().get(98); - internal_static_buf_validate_conformance_cases_SInt32NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32LT_descriptor = - getDescriptor().getMessageTypes().get(99); - internal_static_buf_validate_conformance_cases_SInt32LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32LTE_descriptor = - getDescriptor().getMessageTypes().get(100); - internal_static_buf_validate_conformance_cases_SInt32LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32GT_descriptor = - getDescriptor().getMessageTypes().get(101); - internal_static_buf_validate_conformance_cases_SInt32GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32GTE_descriptor = - getDescriptor().getMessageTypes().get(102); - internal_static_buf_validate_conformance_cases_SInt32GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32GTLT_descriptor = - getDescriptor().getMessageTypes().get(103); - internal_static_buf_validate_conformance_cases_SInt32GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(104); - internal_static_buf_validate_conformance_cases_SInt32ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32GTELTE_descriptor = - getDescriptor().getMessageTypes().get(105); - internal_static_buf_validate_conformance_cases_SInt32GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(106); - internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32Ignore_descriptor = - getDescriptor().getMessageTypes().get(107); - internal_static_buf_validate_conformance_cases_SInt32Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(108); - internal_static_buf_validate_conformance_cases_SInt32IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt32Example_descriptor = - getDescriptor().getMessageTypes().get(109); - internal_static_buf_validate_conformance_cases_SInt32Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt32Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64None_descriptor = - getDescriptor().getMessageTypes().get(110); - internal_static_buf_validate_conformance_cases_SInt64None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64Const_descriptor = - getDescriptor().getMessageTypes().get(111); - internal_static_buf_validate_conformance_cases_SInt64Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64In_descriptor = - getDescriptor().getMessageTypes().get(112); - internal_static_buf_validate_conformance_cases_SInt64In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64NotIn_descriptor = - getDescriptor().getMessageTypes().get(113); - internal_static_buf_validate_conformance_cases_SInt64NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64LT_descriptor = - getDescriptor().getMessageTypes().get(114); - internal_static_buf_validate_conformance_cases_SInt64LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64LTE_descriptor = - getDescriptor().getMessageTypes().get(115); - internal_static_buf_validate_conformance_cases_SInt64LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64GT_descriptor = - getDescriptor().getMessageTypes().get(116); - internal_static_buf_validate_conformance_cases_SInt64GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64GTE_descriptor = - getDescriptor().getMessageTypes().get(117); - internal_static_buf_validate_conformance_cases_SInt64GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64GTLT_descriptor = - getDescriptor().getMessageTypes().get(118); - internal_static_buf_validate_conformance_cases_SInt64GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(119); - internal_static_buf_validate_conformance_cases_SInt64ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64GTELTE_descriptor = - getDescriptor().getMessageTypes().get(120); - internal_static_buf_validate_conformance_cases_SInt64GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(121); - internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64Ignore_descriptor = - getDescriptor().getMessageTypes().get(122); - internal_static_buf_validate_conformance_cases_SInt64Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(123); - internal_static_buf_validate_conformance_cases_SInt64IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SInt64Example_descriptor = - getDescriptor().getMessageTypes().get(124); - internal_static_buf_validate_conformance_cases_SInt64Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SInt64Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32None_descriptor = - getDescriptor().getMessageTypes().get(125); - internal_static_buf_validate_conformance_cases_Fixed32None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32Const_descriptor = - getDescriptor().getMessageTypes().get(126); - internal_static_buf_validate_conformance_cases_Fixed32Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32In_descriptor = - getDescriptor().getMessageTypes().get(127); - internal_static_buf_validate_conformance_cases_Fixed32In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32NotIn_descriptor = - getDescriptor().getMessageTypes().get(128); - internal_static_buf_validate_conformance_cases_Fixed32NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32LT_descriptor = - getDescriptor().getMessageTypes().get(129); - internal_static_buf_validate_conformance_cases_Fixed32LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32LTE_descriptor = - getDescriptor().getMessageTypes().get(130); - internal_static_buf_validate_conformance_cases_Fixed32LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32GT_descriptor = - getDescriptor().getMessageTypes().get(131); - internal_static_buf_validate_conformance_cases_Fixed32GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32GTE_descriptor = - getDescriptor().getMessageTypes().get(132); - internal_static_buf_validate_conformance_cases_Fixed32GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32GTLT_descriptor = - getDescriptor().getMessageTypes().get(133); - internal_static_buf_validate_conformance_cases_Fixed32GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(134); - internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32GTELTE_descriptor = - getDescriptor().getMessageTypes().get(135); - internal_static_buf_validate_conformance_cases_Fixed32GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(136); - internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32Ignore_descriptor = - getDescriptor().getMessageTypes().get(137); - internal_static_buf_validate_conformance_cases_Fixed32Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(138); - internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed32Example_descriptor = - getDescriptor().getMessageTypes().get(139); - internal_static_buf_validate_conformance_cases_Fixed32Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed32Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64None_descriptor = - getDescriptor().getMessageTypes().get(140); - internal_static_buf_validate_conformance_cases_Fixed64None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64Const_descriptor = - getDescriptor().getMessageTypes().get(141); - internal_static_buf_validate_conformance_cases_Fixed64Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64In_descriptor = - getDescriptor().getMessageTypes().get(142); - internal_static_buf_validate_conformance_cases_Fixed64In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64NotIn_descriptor = - getDescriptor().getMessageTypes().get(143); - internal_static_buf_validate_conformance_cases_Fixed64NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64LT_descriptor = - getDescriptor().getMessageTypes().get(144); - internal_static_buf_validate_conformance_cases_Fixed64LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64LTE_descriptor = - getDescriptor().getMessageTypes().get(145); - internal_static_buf_validate_conformance_cases_Fixed64LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64GT_descriptor = - getDescriptor().getMessageTypes().get(146); - internal_static_buf_validate_conformance_cases_Fixed64GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64GTE_descriptor = - getDescriptor().getMessageTypes().get(147); - internal_static_buf_validate_conformance_cases_Fixed64GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64GTLT_descriptor = - getDescriptor().getMessageTypes().get(148); - internal_static_buf_validate_conformance_cases_Fixed64GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(149); - internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64GTELTE_descriptor = - getDescriptor().getMessageTypes().get(150); - internal_static_buf_validate_conformance_cases_Fixed64GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(151); - internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64Ignore_descriptor = - getDescriptor().getMessageTypes().get(152); - internal_static_buf_validate_conformance_cases_Fixed64Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(153); - internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Fixed64Example_descriptor = - getDescriptor().getMessageTypes().get(154); - internal_static_buf_validate_conformance_cases_Fixed64Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Fixed64Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32None_descriptor = - getDescriptor().getMessageTypes().get(155); - internal_static_buf_validate_conformance_cases_SFixed32None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32Const_descriptor = - getDescriptor().getMessageTypes().get(156); - internal_static_buf_validate_conformance_cases_SFixed32Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32In_descriptor = - getDescriptor().getMessageTypes().get(157); - internal_static_buf_validate_conformance_cases_SFixed32In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32NotIn_descriptor = - getDescriptor().getMessageTypes().get(158); - internal_static_buf_validate_conformance_cases_SFixed32NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32LT_descriptor = - getDescriptor().getMessageTypes().get(159); - internal_static_buf_validate_conformance_cases_SFixed32LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32LTE_descriptor = - getDescriptor().getMessageTypes().get(160); - internal_static_buf_validate_conformance_cases_SFixed32LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32GT_descriptor = - getDescriptor().getMessageTypes().get(161); - internal_static_buf_validate_conformance_cases_SFixed32GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32GTE_descriptor = - getDescriptor().getMessageTypes().get(162); - internal_static_buf_validate_conformance_cases_SFixed32GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32GTLT_descriptor = - getDescriptor().getMessageTypes().get(163); - internal_static_buf_validate_conformance_cases_SFixed32GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(164); - internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32GTELTE_descriptor = - getDescriptor().getMessageTypes().get(165); - internal_static_buf_validate_conformance_cases_SFixed32GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(166); - internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32Ignore_descriptor = - getDescriptor().getMessageTypes().get(167); - internal_static_buf_validate_conformance_cases_SFixed32Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(168); - internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed32Example_descriptor = - getDescriptor().getMessageTypes().get(169); - internal_static_buf_validate_conformance_cases_SFixed32Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed32Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64None_descriptor = - getDescriptor().getMessageTypes().get(170); - internal_static_buf_validate_conformance_cases_SFixed64None_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64None_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64Const_descriptor = - getDescriptor().getMessageTypes().get(171); - internal_static_buf_validate_conformance_cases_SFixed64Const_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64Const_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64In_descriptor = - getDescriptor().getMessageTypes().get(172); - internal_static_buf_validate_conformance_cases_SFixed64In_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64In_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64NotIn_descriptor = - getDescriptor().getMessageTypes().get(173); - internal_static_buf_validate_conformance_cases_SFixed64NotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64NotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64LT_descriptor = - getDescriptor().getMessageTypes().get(174); - internal_static_buf_validate_conformance_cases_SFixed64LT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64LT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64LTE_descriptor = - getDescriptor().getMessageTypes().get(175); - internal_static_buf_validate_conformance_cases_SFixed64LTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64LTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64GT_descriptor = - getDescriptor().getMessageTypes().get(176); - internal_static_buf_validate_conformance_cases_SFixed64GT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64GT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64GTE_descriptor = - getDescriptor().getMessageTypes().get(177); - internal_static_buf_validate_conformance_cases_SFixed64GTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64GTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64GTLT_descriptor = - getDescriptor().getMessageTypes().get(178); - internal_static_buf_validate_conformance_cases_SFixed64GTLT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64GTLT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_descriptor = - getDescriptor().getMessageTypes().get(179); - internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64GTELTE_descriptor = - getDescriptor().getMessageTypes().get(180); - internal_static_buf_validate_conformance_cases_SFixed64GTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64GTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_descriptor = - getDescriptor().getMessageTypes().get(181); - internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64Ignore_descriptor = - getDescriptor().getMessageTypes().get(182); - internal_static_buf_validate_conformance_cases_SFixed64Ignore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64Ignore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_descriptor = - getDescriptor().getMessageTypes().get(183); - internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_SFixed64Example_descriptor = - getDescriptor().getMessageTypes().get(184); - internal_static_buf_validate_conformance_cases_SFixed64Example_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_SFixed64Example_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_Int64LTEOptional_descriptor = - getDescriptor().getMessageTypes().get(185); - internal_static_buf_validate_conformance_cases_Int64LTEOptional_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Int64LTEOptional_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Oneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Oneof.java deleted file mode 100644 index cc69d408..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Oneof.java +++ /dev/null @@ -1,912 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Oneof} - */ -public final class Oneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Oneof) - OneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Oneof.class.getName()); - } - // Use Oneof.newBuilder() to construct. - private Oneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Oneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Oneof.class, build.buf.validate.conformance.cases.Oneof.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - X(1), - Y(2), - Z(3), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return X; - case 2: return Y; - case 3: return Z; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int X_FIELD_NUMBER = 1; - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return Whether the x field is set. - */ - public boolean hasX() { - return oCase_ == 1; - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return The x. - */ - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return The bytes for x. - */ - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int Y_FIELD_NUMBER = 2; - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return Whether the y field is set. - */ - @java.lang.Override - public boolean hasY() { - return oCase_ == 2; - } - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return The y. - */ - @java.lang.Override - public int getY() { - if (oCase_ == 2) { - return (java.lang.Integer) o_; - } - return 0; - } - - public static final int Z_FIELD_NUMBER = 3; - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - * @return Whether the z field is set. - */ - @java.lang.Override - public boolean hasZ() { - return oCase_ == 3; - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - * @return The z. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsg getZ() { - if (oCase_ == 3) { - return (build.buf.validate.conformance.cases.TestOneofMsg) o_; - } - return build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsgOrBuilder getZOrBuilder() { - if (oCase_ == 3) { - return (build.buf.validate.conformance.cases.TestOneofMsg) o_; - } - return build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } - - 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 (oCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, o_); - } - if (oCase_ == 2) { - output.writeInt32( - 2, (int)((java.lang.Integer) o_)); - } - if (oCase_ == 3) { - output.writeMessage(3, (build.buf.validate.conformance.cases.TestOneofMsg) o_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, o_); - } - if (oCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 2, (int)((java.lang.Integer) o_)); - } - if (oCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (build.buf.validate.conformance.cases.TestOneofMsg) o_); - } - 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.Oneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Oneof other = (build.buf.validate.conformance.cases.Oneof) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (!getX() - .equals(other.getX())) return false; - break; - case 2: - if (getY() - != other.getY()) return false; - break; - case 3: - if (!getZ() - .equals(other.getZ())) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX().hashCode(); - break; - case 2: - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - break; - case 3: - hash = (37 * hash) + Z_FIELD_NUMBER; - hash = (53 * hash) + getZ().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Oneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Oneof 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.Oneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Oneof 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.Oneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Oneof 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.Oneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Oneof 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.Oneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Oneof 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.Oneof 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.Oneof 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.Oneof 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.Oneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Oneof) - build.buf.validate.conformance.cases.OneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Oneof.class, build.buf.validate.conformance.cases.Oneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Oneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (zBuilder_ != null) { - zBuilder_.clear(); - } - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_Oneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Oneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Oneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Oneof build() { - build.buf.validate.conformance.cases.Oneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Oneof buildPartial() { - build.buf.validate.conformance.cases.Oneof result = new build.buf.validate.conformance.cases.Oneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Oneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Oneof result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - if (oCase_ == 3 && - zBuilder_ != null) { - result.o_ = zBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Oneof) { - return mergeFrom((build.buf.validate.conformance.cases.Oneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Oneof other) { - if (other == build.buf.validate.conformance.cases.Oneof.getDefaultInstance()) return this; - switch (other.getOCase()) { - case X: { - oCase_ = 1; - o_ = other.o_; - onChanged(); - break; - } - case Y: { - setY(other.getY()); - break; - } - case Z: { - mergeZ(other.getZ()); - break; - } - case O_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - oCase_ = 1; - o_ = s; - break; - } // case 10 - case 16: { - o_ = input.readInt32(); - oCase_ = 2; - break; - } // case 16 - case 26: { - input.readMessage( - getZFieldBuilder().getBuilder(), - extensionRegistry); - oCase_ = 3; - break; - } // case 26 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return Whether the x field is set. - */ - @java.lang.Override - public boolean hasX() { - return oCase_ == 1; - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return The x. - */ - @java.lang.Override - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return The bytes for x. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearX() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @param value The bytes for x to set. - * @return This builder for chaining. - */ - public Builder setXBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return Whether the y field is set. - */ - public boolean hasY() { - return oCase_ == 2; - } - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return The y. - */ - public int getY() { - if (oCase_ == 2) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - oCase_ = 2; - o_ = value; - onChanged(); - return this; - } - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearY() { - if (oCase_ == 2) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestOneofMsg, build.buf.validate.conformance.cases.TestOneofMsg.Builder, build.buf.validate.conformance.cases.TestOneofMsgOrBuilder> zBuilder_; - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - * @return Whether the z field is set. - */ - @java.lang.Override - public boolean hasZ() { - return oCase_ == 3; - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - * @return The z. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsg getZ() { - if (zBuilder_ == null) { - if (oCase_ == 3) { - return (build.buf.validate.conformance.cases.TestOneofMsg) o_; - } - return build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } else { - if (oCase_ == 3) { - return zBuilder_.getMessage(); - } - return build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - public Builder setZ(build.buf.validate.conformance.cases.TestOneofMsg value) { - if (zBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - o_ = value; - onChanged(); - } else { - zBuilder_.setMessage(value); - } - oCase_ = 3; - return this; - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - public Builder setZ( - build.buf.validate.conformance.cases.TestOneofMsg.Builder builderForValue) { - if (zBuilder_ == null) { - o_ = builderForValue.build(); - onChanged(); - } else { - zBuilder_.setMessage(builderForValue.build()); - } - oCase_ = 3; - return this; - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - public Builder mergeZ(build.buf.validate.conformance.cases.TestOneofMsg value) { - if (zBuilder_ == null) { - if (oCase_ == 3 && - o_ != build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance()) { - o_ = build.buf.validate.conformance.cases.TestOneofMsg.newBuilder((build.buf.validate.conformance.cases.TestOneofMsg) o_) - .mergeFrom(value).buildPartial(); - } else { - o_ = value; - } - onChanged(); - } else { - if (oCase_ == 3) { - zBuilder_.mergeFrom(value); - } else { - zBuilder_.setMessage(value); - } - } - oCase_ = 3; - return this; - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - public Builder clearZ() { - if (zBuilder_ == null) { - if (oCase_ == 3) { - oCase_ = 0; - o_ = null; - onChanged(); - } - } else { - if (oCase_ == 3) { - oCase_ = 0; - o_ = null; - } - zBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - public build.buf.validate.conformance.cases.TestOneofMsg.Builder getZBuilder() { - return getZFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsgOrBuilder getZOrBuilder() { - if ((oCase_ == 3) && (zBuilder_ != null)) { - return zBuilder_.getMessageOrBuilder(); - } else { - if (oCase_ == 3) { - return (build.buf.validate.conformance.cases.TestOneofMsg) o_; - } - return build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } - } - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestOneofMsg, build.buf.validate.conformance.cases.TestOneofMsg.Builder, build.buf.validate.conformance.cases.TestOneofMsgOrBuilder> - getZFieldBuilder() { - if (zBuilder_ == null) { - if (!(oCase_ == 3)) { - o_ = build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } - zBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestOneofMsg, build.buf.validate.conformance.cases.TestOneofMsg.Builder, build.buf.validate.conformance.cases.TestOneofMsgOrBuilder>( - (build.buf.validate.conformance.cases.TestOneofMsg) o_, - getParentForChildren(), - isClean()); - o_ = null; - } - oCase_ = 3; - onChanged(); - return zBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Oneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Oneof) - private static final build.buf.validate.conformance.cases.Oneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Oneof(); - } - - public static build.buf.validate.conformance.cases.Oneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Oneof 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.Oneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofNone.java deleted file mode 100644 index 1883656b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofNone.java +++ /dev/null @@ -1,704 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.OneofNone} - */ -public final class OneofNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.OneofNone) - OneofNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - OneofNone.class.getName()); - } - // Use OneofNone.newBuilder() to construct. - private OneofNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OneofNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.OneofNone.class, build.buf.validate.conformance.cases.OneofNone.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - X(1), - Y(2), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return X; - case 2: return Y; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int X_FIELD_NUMBER = 1; - /** - * string x = 1 [json_name = "x"]; - * @return Whether the x field is set. - */ - public boolean hasX() { - return oCase_ == 1; - } - /** - * string x = 1 [json_name = "x"]; - * @return The x. - */ - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } - } - /** - * string x = 1 [json_name = "x"]; - * @return The bytes for x. - */ - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int Y_FIELD_NUMBER = 2; - /** - * int32 y = 2 [json_name = "y"]; - * @return Whether the y field is set. - */ - @java.lang.Override - public boolean hasY() { - return oCase_ == 2; - } - /** - * int32 y = 2 [json_name = "y"]; - * @return The y. - */ - @java.lang.Override - public int getY() { - if (oCase_ == 2) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, o_); - } - if (oCase_ == 2) { - output.writeInt32( - 2, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, o_); - } - if (oCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 2, (int)((java.lang.Integer) o_)); - } - 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.OneofNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.OneofNone other = (build.buf.validate.conformance.cases.OneofNone) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (!getX() - .equals(other.getX())) return false; - break; - case 2: - if (getY() - != other.getY()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX().hashCode(); - break; - case 2: - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.OneofNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofNone 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.OneofNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofNone 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.OneofNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofNone 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.OneofNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.OneofNone 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.OneofNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.OneofNone 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.OneofNone 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.OneofNone 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.OneofNone 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.OneofNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.OneofNone) - build.buf.validate.conformance.cases.OneofNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.OneofNone.class, build.buf.validate.conformance.cases.OneofNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.OneofNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.OneofNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofNone build() { - build.buf.validate.conformance.cases.OneofNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofNone buildPartial() { - build.buf.validate.conformance.cases.OneofNone result = new build.buf.validate.conformance.cases.OneofNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.OneofNone result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.OneofNone result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.OneofNone) { - return mergeFrom((build.buf.validate.conformance.cases.OneofNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.OneofNone other) { - if (other == build.buf.validate.conformance.cases.OneofNone.getDefaultInstance()) return this; - switch (other.getOCase()) { - case X: { - oCase_ = 1; - o_ = other.o_; - onChanged(); - break; - } - case Y: { - setY(other.getY()); - break; - } - case O_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - oCase_ = 1; - o_ = s; - break; - } // case 10 - case 16: { - o_ = input.readInt32(); - oCase_ = 2; - break; - } // case 16 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string x = 1 [json_name = "x"]; - * @return Whether the x field is set. - */ - @java.lang.Override - public boolean hasX() { - return oCase_ == 1; - } - /** - * string x = 1 [json_name = "x"]; - * @return The x. - */ - @java.lang.Override - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string x = 1 [json_name = "x"]; - * @return The bytes for x. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string x = 1 [json_name = "x"]; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * string x = 1 [json_name = "x"]; - * @return This builder for chaining. - */ - public Builder clearX() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - /** - * string x = 1 [json_name = "x"]; - * @param value The bytes for x to set. - * @return This builder for chaining. - */ - public Builder setXBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - - /** - * int32 y = 2 [json_name = "y"]; - * @return Whether the y field is set. - */ - public boolean hasY() { - return oCase_ == 2; - } - /** - * int32 y = 2 [json_name = "y"]; - * @return The y. - */ - public int getY() { - if (oCase_ == 2) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 y = 2 [json_name = "y"]; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - oCase_ = 2; - o_ = value; - onChanged(); - return this; - } - /** - * int32 y = 2 [json_name = "y"]; - * @return This builder for chaining. - */ - public Builder clearY() { - if (oCase_ == 2) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.OneofNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.OneofNone) - private static final build.buf.validate.conformance.cases.OneofNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.OneofNone(); - } - - public static build.buf.validate.conformance.cases.OneofNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OneofNone 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.OneofNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofNoneOrBuilder.java deleted file mode 100644 index 401f0375..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofNoneOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface OneofNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.OneofNone) - com.google.protobuf.MessageOrBuilder { - - /** - * string x = 1 [json_name = "x"]; - * @return Whether the x field is set. - */ - boolean hasX(); - /** - * string x = 1 [json_name = "x"]; - * @return The x. - */ - java.lang.String getX(); - /** - * string x = 1 [json_name = "x"]; - * @return The bytes for x. - */ - com.google.protobuf.ByteString - getXBytes(); - - /** - * int32 y = 2 [json_name = "y"]; - * @return Whether the y field is set. - */ - boolean hasY(); - /** - * int32 y = 2 [json_name = "y"]; - * @return The y. - */ - int getY(); - - build.buf.validate.conformance.cases.OneofNone.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofOrBuilder.java deleted file mode 100644 index 6b876638..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface OneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Oneof) - com.google.protobuf.MessageOrBuilder { - - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return Whether the x field is set. - */ - boolean hasX(); - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return The x. - */ - java.lang.String getX(); - /** - * string x = 1 [json_name = "x", (.buf.validate.field) = { ... } - * @return The bytes for x. - */ - com.google.protobuf.ByteString - getXBytes(); - - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return Whether the y field is set. - */ - boolean hasY(); - /** - * int32 y = 2 [json_name = "y", (.buf.validate.field) = { ... } - * @return The y. - */ - int getY(); - - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - * @return Whether the z field is set. - */ - boolean hasZ(); - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - * @return The z. - */ - build.buf.validate.conformance.cases.TestOneofMsg getZ(); - /** - * .buf.validate.conformance.cases.TestOneofMsg z = 3 [json_name = "z"]; - */ - build.buf.validate.conformance.cases.TestOneofMsgOrBuilder getZOrBuilder(); - - build.buf.validate.conformance.cases.Oneof.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequired.java deleted file mode 100644 index f278932e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequired.java +++ /dev/null @@ -1,886 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.OneofRequired} - */ -public final class OneofRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.OneofRequired) - OneofRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - OneofRequired.class.getName()); - } - // Use OneofRequired.newBuilder() to construct. - private OneofRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OneofRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.OneofRequired.class, build.buf.validate.conformance.cases.OneofRequired.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - X(1), - Y(2), - NAME_WITH_UNDERSCORES(3), - UNDER_AND_1_NUMBER(4), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return X; - case 2: return Y; - case 3: return NAME_WITH_UNDERSCORES; - case 4: return UNDER_AND_1_NUMBER; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int X_FIELD_NUMBER = 1; - /** - * string x = 1 [json_name = "x"]; - * @return Whether the x field is set. - */ - public boolean hasX() { - return oCase_ == 1; - } - /** - * string x = 1 [json_name = "x"]; - * @return The x. - */ - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } - } - /** - * string x = 1 [json_name = "x"]; - * @return The bytes for x. - */ - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int Y_FIELD_NUMBER = 2; - /** - * int32 y = 2 [json_name = "y"]; - * @return Whether the y field is set. - */ - @java.lang.Override - public boolean hasY() { - return oCase_ == 2; - } - /** - * int32 y = 2 [json_name = "y"]; - * @return The y. - */ - @java.lang.Override - public int getY() { - if (oCase_ == 2) { - return (java.lang.Integer) o_; - } - return 0; - } - - public static final int NAME_WITH_UNDERSCORES_FIELD_NUMBER = 3; - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return Whether the nameWithUnderscores field is set. - */ - @java.lang.Override - public boolean hasNameWithUnderscores() { - return oCase_ == 3; - } - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return The nameWithUnderscores. - */ - @java.lang.Override - public int getNameWithUnderscores() { - if (oCase_ == 3) { - return (java.lang.Integer) o_; - } - return 0; - } - - public static final int UNDER_AND_1_NUMBER_FIELD_NUMBER = 4; - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return Whether the underAnd1Number field is set. - */ - @java.lang.Override - public boolean hasUnderAnd1Number() { - return oCase_ == 4; - } - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return The underAnd1Number. - */ - @java.lang.Override - public int getUnderAnd1Number() { - if (oCase_ == 4) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, o_); - } - if (oCase_ == 2) { - output.writeInt32( - 2, (int)((java.lang.Integer) o_)); - } - if (oCase_ == 3) { - output.writeInt32( - 3, (int)((java.lang.Integer) o_)); - } - if (oCase_ == 4) { - output.writeInt32( - 4, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, o_); - } - if (oCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 2, (int)((java.lang.Integer) o_)); - } - if (oCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 3, (int)((java.lang.Integer) o_)); - } - if (oCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 4, (int)((java.lang.Integer) o_)); - } - 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.OneofRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.OneofRequired other = (build.buf.validate.conformance.cases.OneofRequired) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (!getX() - .equals(other.getX())) return false; - break; - case 2: - if (getY() - != other.getY()) return false; - break; - case 3: - if (getNameWithUnderscores() - != other.getNameWithUnderscores()) return false; - break; - case 4: - if (getUnderAnd1Number() - != other.getUnderAnd1Number()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX().hashCode(); - break; - case 2: - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - break; - case 3: - hash = (37 * hash) + NAME_WITH_UNDERSCORES_FIELD_NUMBER; - hash = (53 * hash) + getNameWithUnderscores(); - break; - case 4: - hash = (37 * hash) + UNDER_AND_1_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getUnderAnd1Number(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.OneofRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofRequired 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.OneofRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofRequired 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.OneofRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofRequired 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.OneofRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.OneofRequired 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.OneofRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.OneofRequired 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.OneofRequired 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.OneofRequired 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.OneofRequired 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.OneofRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.OneofRequired) - build.buf.validate.conformance.cases.OneofRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.OneofRequired.class, build.buf.validate.conformance.cases.OneofRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.OneofRequired.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.OneofRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofRequired build() { - build.buf.validate.conformance.cases.OneofRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofRequired buildPartial() { - build.buf.validate.conformance.cases.OneofRequired result = new build.buf.validate.conformance.cases.OneofRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.OneofRequired result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.OneofRequired result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.OneofRequired) { - return mergeFrom((build.buf.validate.conformance.cases.OneofRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.OneofRequired other) { - if (other == build.buf.validate.conformance.cases.OneofRequired.getDefaultInstance()) return this; - switch (other.getOCase()) { - case X: { - oCase_ = 1; - o_ = other.o_; - onChanged(); - break; - } - case Y: { - setY(other.getY()); - break; - } - case NAME_WITH_UNDERSCORES: { - setNameWithUnderscores(other.getNameWithUnderscores()); - break; - } - case UNDER_AND_1_NUMBER: { - setUnderAnd1Number(other.getUnderAnd1Number()); - break; - } - case O_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - oCase_ = 1; - o_ = s; - break; - } // case 10 - case 16: { - o_ = input.readInt32(); - oCase_ = 2; - break; - } // case 16 - case 24: { - o_ = input.readInt32(); - oCase_ = 3; - break; - } // case 24 - case 32: { - o_ = input.readInt32(); - oCase_ = 4; - break; - } // case 32 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string x = 1 [json_name = "x"]; - * @return Whether the x field is set. - */ - @java.lang.Override - public boolean hasX() { - return oCase_ == 1; - } - /** - * string x = 1 [json_name = "x"]; - * @return The x. - */ - @java.lang.Override - public java.lang.String getX() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string x = 1 [json_name = "x"]; - * @return The bytes for x. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getXBytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string x = 1 [json_name = "x"]; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * string x = 1 [json_name = "x"]; - * @return This builder for chaining. - */ - public Builder clearX() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - /** - * string x = 1 [json_name = "x"]; - * @param value The bytes for x to set. - * @return This builder for chaining. - */ - public Builder setXBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - - /** - * int32 y = 2 [json_name = "y"]; - * @return Whether the y field is set. - */ - public boolean hasY() { - return oCase_ == 2; - } - /** - * int32 y = 2 [json_name = "y"]; - * @return The y. - */ - public int getY() { - if (oCase_ == 2) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 y = 2 [json_name = "y"]; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - oCase_ = 2; - o_ = value; - onChanged(); - return this; - } - /** - * int32 y = 2 [json_name = "y"]; - * @return This builder for chaining. - */ - public Builder clearY() { - if (oCase_ == 2) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return Whether the nameWithUnderscores field is set. - */ - public boolean hasNameWithUnderscores() { - return oCase_ == 3; - } - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return The nameWithUnderscores. - */ - public int getNameWithUnderscores() { - if (oCase_ == 3) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @param value The nameWithUnderscores to set. - * @return This builder for chaining. - */ - public Builder setNameWithUnderscores(int value) { - - oCase_ = 3; - o_ = value; - onChanged(); - return this; - } - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return This builder for chaining. - */ - public Builder clearNameWithUnderscores() { - if (oCase_ == 3) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return Whether the underAnd1Number field is set. - */ - public boolean hasUnderAnd1Number() { - return oCase_ == 4; - } - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return The underAnd1Number. - */ - public int getUnderAnd1Number() { - if (oCase_ == 4) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @param value The underAnd1Number to set. - * @return This builder for chaining. - */ - public Builder setUnderAnd1Number(int value) { - - oCase_ = 4; - o_ = value; - onChanged(); - return this; - } - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return This builder for chaining. - */ - public Builder clearUnderAnd1Number() { - if (oCase_ == 4) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.OneofRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.OneofRequired) - private static final build.buf.validate.conformance.cases.OneofRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.OneofRequired(); - } - - public static build.buf.validate.conformance.cases.OneofRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OneofRequired 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.OneofRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredOrBuilder.java deleted file mode 100644 index ab9dedee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface OneofRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.OneofRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * string x = 1 [json_name = "x"]; - * @return Whether the x field is set. - */ - boolean hasX(); - /** - * string x = 1 [json_name = "x"]; - * @return The x. - */ - java.lang.String getX(); - /** - * string x = 1 [json_name = "x"]; - * @return The bytes for x. - */ - com.google.protobuf.ByteString - getXBytes(); - - /** - * int32 y = 2 [json_name = "y"]; - * @return Whether the y field is set. - */ - boolean hasY(); - /** - * int32 y = 2 [json_name = "y"]; - * @return The y. - */ - int getY(); - - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return Whether the nameWithUnderscores field is set. - */ - boolean hasNameWithUnderscores(); - /** - * int32 name_with_underscores = 3 [json_name = "nameWithUnderscores"]; - * @return The nameWithUnderscores. - */ - int getNameWithUnderscores(); - - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return Whether the underAnd1Number field is set. - */ - boolean hasUnderAnd1Number(); - /** - * int32 under_and_1_number = 4 [json_name = "underAnd1Number"]; - * @return The underAnd1Number. - */ - int getUnderAnd1Number(); - - build.buf.validate.conformance.cases.OneofRequired.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredField.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredField.java deleted file mode 100644 index aacf9dee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredField.java +++ /dev/null @@ -1,786 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.OneofRequiredWithRequiredField} - */ -public final class OneofRequiredWithRequiredField extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.OneofRequiredWithRequiredField) - OneofRequiredWithRequiredFieldOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - OneofRequiredWithRequiredField.class.getName()); - } - // Use OneofRequiredWithRequiredField.newBuilder() to construct. - private OneofRequiredWithRequiredField(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OneofRequiredWithRequiredField() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.class, build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - A(1), - B(2), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return A; - case 2: return B; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int A_FIELD_NUMBER = 1; - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - public boolean hasA() { - return oCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - public java.lang.String getA() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int B_FIELD_NUMBER = 2; - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - public boolean hasB() { - return oCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - public java.lang.String getB() { - java.lang.Object ref = ""; - if (oCase_ == 2) { - ref = o_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 2) { - o_ = s; - } - return s; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (oCase_ == 2) { - ref = o_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 2) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (oCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, o_); - } - if (oCase_ == 2) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, o_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, o_); - } - if (oCase_ == 2) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, o_); - } - 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.OneofRequiredWithRequiredField)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.OneofRequiredWithRequiredField other = (build.buf.validate.conformance.cases.OneofRequiredWithRequiredField) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (!getA() - .equals(other.getA())) return false; - break; - case 2: - if (!getB() - .equals(other.getB())) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA().hashCode(); - break; - case 2: - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.OneofRequiredWithRequiredField) - build.buf.validate.conformance.cases.OneofRequiredWithRequiredFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.class, build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofRequiredWithRequiredField getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofRequiredWithRequiredField build() { - build.buf.validate.conformance.cases.OneofRequiredWithRequiredField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.OneofRequiredWithRequiredField buildPartial() { - build.buf.validate.conformance.cases.OneofRequiredWithRequiredField result = new build.buf.validate.conformance.cases.OneofRequiredWithRequiredField(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.OneofRequiredWithRequiredField result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.OneofRequiredWithRequiredField result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.OneofRequiredWithRequiredField) { - return mergeFrom((build.buf.validate.conformance.cases.OneofRequiredWithRequiredField)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.OneofRequiredWithRequiredField other) { - if (other == build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.getDefaultInstance()) return this; - switch (other.getOCase()) { - case A: { - oCase_ = 1; - o_ = other.o_; - onChanged(); - break; - } - case B: { - oCase_ = 2; - o_ = other.o_; - onChanged(); - break; - } - case O_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - oCase_ = 1; - o_ = s; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - oCase_ = 2; - o_ = s; - break; - } // case 18 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return oCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public java.lang.String getA() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 1) { - o_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (oCase_ == 1) { - ref = o_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 1) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The bytes for a to set. - * @return This builder for chaining. - */ - public Builder setABytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return oCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public java.lang.String getB() { - java.lang.Object ref = ""; - if (oCase_ == 2) { - ref = o_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oCase_ == 2) { - o_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (oCase_ == 2) { - ref = o_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oCase_ == 2) { - o_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - oCase_ = 2; - o_ = value; - onChanged(); - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - if (oCase_ == 2) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @param value The bytes for b to set. - * @return This builder for chaining. - */ - public Builder setBBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - oCase_ = 2; - o_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.OneofRequiredWithRequiredField) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.OneofRequiredWithRequiredField) - private static final build.buf.validate.conformance.cases.OneofRequiredWithRequiredField DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.OneofRequiredWithRequiredField(); - } - - public static build.buf.validate.conformance.cases.OneofRequiredWithRequiredField getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OneofRequiredWithRequiredField 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.OneofRequiredWithRequiredField getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredFieldOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredFieldOrBuilder.java deleted file mode 100644 index 23dcfacf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofRequiredWithRequiredFieldOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface OneofRequiredWithRequiredFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.OneofRequiredWithRequiredField) - com.google.protobuf.MessageOrBuilder { - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - boolean hasA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - java.lang.String getA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - com.google.protobuf.ByteString - getABytes(); - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - java.lang.String getB(); - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - com.google.protobuf.ByteString - getBBytes(); - - build.buf.validate.conformance.cases.OneofRequiredWithRequiredField.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/OneofsProto.java deleted file mode 100644 index d96e1a92..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/OneofsProto.java +++ /dev/null @@ -1,129 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class OneofsProto { - private OneofsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - OneofsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TestOneofMsg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TestOneofMsg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_OneofNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_OneofNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Oneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Oneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_OneofRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_OneofRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n+buf/validate/conformance/cases/oneofs." + - "proto\022\036buf.validate.conformance.cases\032\033b" + - "uf/validate/validate.proto\")\n\014TestOneofM" + - "sg\022\031\n\003val\030\001 \001(\010B\007\272H\004j\002\010\001R\003val\"0\n\tOneofNo" + - "ne\022\016\n\001x\030\001 \001(\tH\000R\001x\022\016\n\001y\030\002 \001(\005H\000R\001yB\003\n\001o\"" + - "\177\n\005Oneof\022\032\n\001x\030\001 \001(\tB\n\272H\007r\005:\003fooH\000R\001x\022\027\n\001" + - "y\030\002 \001(\005B\007\272H\004\032\002 \000H\000R\001y\022<\n\001z\030\003 \001(\0132,.buf.v" + - "alidate.conformance.cases.TestOneofMsgH\000" + - "R\001zB\003\n\001o\"\240\001\n\rOneofRequired\022\016\n\001x\030\001 \001(\tH\000R" + - "\001x\022\016\n\001y\030\002 \001(\005H\000R\001y\0224\n\025name_with_undersco" + - "res\030\003 \001(\005H\000R\023nameWithUnderscores\022-\n\022unde" + - "r_and_1_number\030\004 \001(\005H\000R\017underAnd1NumberB" + - "\n\n\001o\022\005\272H\002\010\001\"T\n\036OneofRequiredWithRequired" + - "Field\022\026\n\001a\030\001 \001(\tB\006\272H\003\310\001\001H\000R\001a\022\016\n\001b\030\002 \001(\t" + - "H\000R\001bB\n\n\001o\022\005\272H\002\010\001B\317\001\n$build.buf.validate" + - ".conformance.casesB\013OneofsProtoP\001\242\002\004BVCC" + - "\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\" + - "Validate\\Conformance\\Cases\342\002*Buf\\Validat" + - "e\\Conformance\\Cases\\GPBMetadata\352\002!Buf::V" + - "alidate::Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_TestOneofMsg_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_TestOneofMsg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_TestOneofMsg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_OneofNone_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_OneofNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_OneofNone_descriptor, - new java.lang.String[] { "X", "Y", "O", }); - internal_static_buf_validate_conformance_cases_Oneof_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_Oneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Oneof_descriptor, - new java.lang.String[] { "X", "Y", "Z", "O", }); - internal_static_buf_validate_conformance_cases_OneofRequired_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_OneofRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_OneofRequired_descriptor, - new java.lang.String[] { "X", "Y", "NameWithUnderscores", "UnderAnd1Number", "O", }); - internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_OneofRequiredWithRequiredField_descriptor, - new java.lang.String[] { "A", "B", "O", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(build.buf.validate.ValidateProto.oneof); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} 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 deleted file mode 100644 index 1815c4f5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023.java +++ /dev/null @@ -1,1110 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023} - */ -public final class PredefinedAndCustomRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) - PredefinedAndCustomRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedAndCustomRuleEdition2023.class.getName()); - } - // Use PredefinedAndCustomRuleEdition2023.newBuilder() to construct. - private PredefinedAndCustomRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedAndCustomRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Builder.class); - } - - public interface NestedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 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) = { ... } - * @return The c. - */ - int getC(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested} - */ - public static final class Nested extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested) - NestedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Nested.class.getName()); - } - // Use Nested.newBuilder() to construct. - private Nested(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Nested() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder.class); - } - - private int bitField0_; - public static final int C_FIELD_NUMBER = 1; - private int c_ = 0; - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - @java.lang.Override - public boolean hasC() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public int getC() { - return c_; - } - - 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.writeInt32(1, c_); - } - 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 - .computeInt32Size(1, c_); - } - 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.PredefinedAndCustomRuleEdition2023.Nested)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested other = (build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested) obj; - - if (hasC() != other.hasC()) return false; - if (hasC()) { - if (getC() - != other.getC()) 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 (hasC()) { - hash = (37 * hash) + C_FIELD_NUMBER; - hash = (53 * hash) + getC(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested 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.PredefinedAndCustomRuleEdition2023.Nested} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested) - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - c_ = 0; - 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_PredefinedAndCustomRuleEdition2023_Nested_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested build() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested buildPartial() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested result = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.c_ = c_; - 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.PredefinedAndCustomRuleEdition2023.Nested) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested other) { - if (other == build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance()) return this; - if (other.hasC()) { - setC(other.getC()); - } - 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 8: { - c_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int c_ ; - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - @java.lang.Override - public boolean hasC() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public int getC() { - return c_; - } - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @param value The c to set. - * @return This builder for chaining. - */ - public Builder setC(int value) { - - c_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearC() { - bitField0_ = (bitField0_ & ~0x00000001); - c_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested) - private static final build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested(); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Nested 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.PredefinedAndCustomRuleEdition2023.Nested getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b_; - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested getB() { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance() : b_; - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder getBOrBuilder() { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance() : b_; - } - - 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.writeInt32(1, a_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getB()); - } - 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 - .computeInt32Size(1, a_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getB()); - } - 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.PredefinedAndCustomRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) obj; - - if (hasA() != other.hasA()) return false; - if (hasA()) { - if (getA() - != other.getA()) return false; - } - if (hasB() != other.hasB()) return false; - if (hasB()) { - if (!getB() - .equals(other.getB())) 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 (hasA()) { - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - } - if (hasB()) { - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getBFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = null; - if (bBuilder_ != null) { - bBuilder_.dispose(); - bBuilder_ = 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_PredefinedAndCustomRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = bBuilder_ == null - ? b_ - : bBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.getDefaultInstance()) return this; - if (other.hasA()) { - setA(other.getA()); - } - if (other.hasB()) { - mergeB(other.getB()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - input.readMessage( - getBFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder> bBuilder_; - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - public boolean hasB() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested getB() { - if (bBuilder_ == null) { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance() : b_; - } else { - return bBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder setB(build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested value) { - if (bBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - b_ = value; - } else { - bBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder setB( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder builderForValue) { - if (bBuilder_ == null) { - b_ = builderForValue.build(); - } else { - bBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder mergeB(build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested value) { - if (bBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - b_ != null && - b_ != build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance()) { - getBBuilder().mergeFrom(value); - } else { - b_ = value; - } - } else { - bBuilder_.mergeFrom(value); - } - if (b_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = null; - if (bBuilder_ != null) { - bBuilder_.dispose(); - bBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder getBBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder getBOrBuilder() { - if (bBuilder_ != null) { - return bBuilder_.getMessageOrBuilder(); - } else { - return b_ == null ? - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.getDefaultInstance() : b_; - } - } - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder> - getBFieldBuilder() { - if (bBuilder_ == null) { - bBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder>( - getB(), - getParentForChildren(), - isClean()); - b_ = null; - } - return bBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedAndCustomRuleEdition2023 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.PredefinedAndCustomRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - 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 deleted file mode 100644 index 59f597fd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedAndCustomRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 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) = { ... } - * @return The a. - */ - int getA(); - - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested getB(); - /** - * .buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.NestedOrBuilder getBOrBuilder(); -} 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 deleted file mode 100644 index 8c24b266..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2.java +++ /dev/null @@ -1,1110 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedAndCustomRuleProto2} - */ -public final class PredefinedAndCustomRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) - PredefinedAndCustomRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedAndCustomRuleProto2.class.getName()); - } - // Use PredefinedAndCustomRuleProto2.newBuilder() to construct. - private PredefinedAndCustomRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedAndCustomRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Builder.class); - } - - public interface NestedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 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) = { ... } - * @return The c. - */ - int getC(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested} - */ - public static final class Nested extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested) - NestedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Nested.class.getName()); - } - // Use Nested.newBuilder() to construct. - private Nested(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Nested() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder.class); - } - - private int bitField0_; - public static final int C_FIELD_NUMBER = 1; - private int c_ = 0; - /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - @java.lang.Override - public boolean hasC() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public int getC() { - return c_; - } - - 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.writeInt32(1, c_); - } - 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 - .computeInt32Size(1, c_); - } - 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.PredefinedAndCustomRuleProto2.Nested)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested other = (build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested) obj; - - if (hasC() != other.hasC()) return false; - if (hasC()) { - if (getC() - != other.getC()) 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 (hasC()) { - hash = (37 * hash) + C_FIELD_NUMBER; - hash = (53 * hash) + getC(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested 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.PredefinedAndCustomRuleProto2.Nested} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested) - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - c_ = 0; - 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_PredefinedAndCustomRuleProto2_Nested_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested build() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested buildPartial() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested result = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.c_ = c_; - 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.PredefinedAndCustomRuleProto2.Nested) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested other) { - if (other == build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance()) return this; - if (other.hasC()) { - setC(other.getC()); - } - 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 8: { - c_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int c_ ; - /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - @java.lang.Override - public boolean hasC() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public int getC() { - return c_; - } - /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @param value The c to set. - * @return This builder for chaining. - */ - public Builder setC(int value) { - - c_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearC() { - bitField0_ = (bitField0_ & ~0x00000001); - c_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested) - private static final build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested(); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Nested 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.PredefinedAndCustomRuleProto2.Nested getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b_; - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested getB() { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance() : b_; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder getBOrBuilder() { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance() : b_; - } - - 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.writeInt32(1, a_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getB()); - } - 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 - .computeInt32Size(1, a_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getB()); - } - 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.PredefinedAndCustomRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) obj; - - if (hasA() != other.hasA()) return false; - if (hasA()) { - if (getA() - != other.getA()) return false; - } - if (hasB() != other.hasB()) return false; - if (hasB()) { - if (!getB() - .equals(other.getB())) 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 (hasA()) { - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - } - if (hasB()) { - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getBFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = null; - if (bBuilder_ != null) { - bBuilder_.dispose(); - bBuilder_ = 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_PredefinedAndCustomRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = bBuilder_ == null - ? b_ - : bBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.getDefaultInstance()) return this; - if (other.hasA()) { - setA(other.getA()); - } - if (other.hasB()) { - mergeB(other.getB()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - input.readMessage( - getBFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - 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 int a_ ; - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder> bBuilder_; - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - public boolean hasB() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested getB() { - if (bBuilder_ == null) { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance() : b_; - } else { - return bBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder setB(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested value) { - if (bBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - b_ = value; - } else { - bBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder setB( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder builderForValue) { - if (bBuilder_ == null) { - b_ = builderForValue.build(); - } else { - bBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder mergeB(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested value) { - if (bBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - b_ != null && - b_ != build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance()) { - getBBuilder().mergeFrom(value); - } else { - b_ = value; - } - } else { - bBuilder_.mergeFrom(value); - } - if (b_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = null; - if (bBuilder_ != null) { - bBuilder_.dispose(); - bBuilder_ = null; - } - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder getBBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder getBOrBuilder() { - if (bBuilder_ != null) { - return bBuilder_.getMessageOrBuilder(); - } else { - return b_ == null ? - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.getDefaultInstance() : b_; - } - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder> - getBFieldBuilder() { - if (bBuilder_ == null) { - bBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder>( - getB(), - getParentForChildren(), - isClean()); - b_ = null; - } - return bBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedAndCustomRuleProto2 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.PredefinedAndCustomRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - 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 deleted file mode 100644 index 4258010c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2OrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedAndCustomRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedAndCustomRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 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) = { ... } - * @return The a. - */ - int getA(); - - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested getB(); - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.NestedOrBuilder getBOrBuilder(); -} 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 deleted file mode 100644 index 8da44e29..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3.java +++ /dev/null @@ -1,1058 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedAndCustomRuleProto3} - */ -public final class PredefinedAndCustomRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3) - PredefinedAndCustomRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedAndCustomRuleProto3.class.getName()); - } - // Use PredefinedAndCustomRuleProto3.newBuilder() to construct. - private PredefinedAndCustomRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedAndCustomRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Builder.class); - } - - public interface NestedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - int getC(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested} - */ - public static final class Nested extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) - NestedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Nested.class.getName()); - } - // Use Nested.newBuilder() to construct. - private Nested(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Nested() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder.class); - } - - public static final int C_FIELD_NUMBER = 1; - private int c_ = 0; - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public int getC() { - return c_; - } - - 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 (c_ != 0) { - output.writeInt32(1, c_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (c_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, c_); - } - 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.PredefinedAndCustomRuleProto3.Nested)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested other = (build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) obj; - - if (getC() - != other.getC()) 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(); - hash = (37 * hash) + C_FIELD_NUMBER; - hash = (53 * hash) + getC(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested 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.PredefinedAndCustomRuleProto3.Nested} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - c_ = 0; - 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_PredefinedAndCustomRuleProto3_Nested_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested build() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested buildPartial() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested result = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.c_ = c_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested other) { - if (other == build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance()) return this; - if (other.getC() != 0) { - setC(other.getC()); - } - 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 8: { - c_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int c_ ; - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public int getC() { - return c_; - } - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @param value The c to set. - * @return This builder for chaining. - */ - public Builder setC(int value) { - - c_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearC() { - bitField0_ = (bitField0_ & ~0x00000001); - c_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested) - private static final build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested(); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Nested 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.PredefinedAndCustomRuleProto3.Nested getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b_; - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested getB() { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance() : b_; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder getBOrBuilder() { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance() : b_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getB()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getB()); - } - 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.PredefinedAndCustomRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3) obj; - - if (getA() - != other.getA()) return false; - if (hasB() != other.hasB()) return false; - if (hasB()) { - if (!getB() - .equals(other.getB())) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - if (hasB()) { - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3) - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.class, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getBFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = null; - if (bBuilder_ != null) { - bBuilder_.dispose(); - bBuilder_ = 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_PredefinedAndCustomRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = bBuilder_ == null - ? b_ - : bBuilder_.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.PredefinedAndCustomRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - if (other.hasB()) { - mergeB(other.getB()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: { - input.readMessage( - getBFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder> bBuilder_; - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - public boolean hasB() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested getB() { - if (bBuilder_ == null) { - return b_ == null ? build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance() : b_; - } else { - return bBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder setB(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested value) { - if (bBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - b_ = value; - } else { - bBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder setB( - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder builderForValue) { - if (bBuilder_ == null) { - b_ = builderForValue.build(); - } else { - bBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder mergeB(build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested value) { - if (bBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - b_ != null && - b_ != build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance()) { - getBBuilder().mergeFrom(value); - } else { - b_ = value; - } - } else { - bBuilder_.mergeFrom(value); - } - if (b_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = null; - if (bBuilder_ != null) { - bBuilder_.dispose(); - bBuilder_ = null; - } - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder getBBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder getBOrBuilder() { - if (bBuilder_ != null) { - return bBuilder_.getMessageOrBuilder(); - } else { - return b_ == null ? - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.getDefaultInstance() : b_; - } - } - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder> - getBFieldBuilder() { - if (bBuilder_ == null) { - bBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested.Builder, build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder>( - getB(), - getParentForChildren(), - isClean()); - b_ = null; - } - return bBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedAndCustomRuleProto3 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.PredefinedAndCustomRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - 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 deleted file mode 100644 index 3c1c2081..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3OrBuilder.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedAndCustomRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedAndCustomRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - int getA(); - - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested getB(); - /** - * optional .buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested b = 2 [json_name = "b", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.NestedOrBuilder getBOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023.java deleted file mode 100644 index f31323df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedBoolRuleEdition2023} - */ -public final class PredefinedBoolRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedBoolRuleEdition2023) - PredefinedBoolRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedBoolRuleEdition2023.class.getName()); - } - // Use PredefinedBoolRuleEdition2023.newBuilder() to construct. - private PredefinedBoolRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedBoolRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool 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); - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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.writeBool(1, val_); - } - 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 - .computeBoolSize(1, val_); - } - 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.PredefinedBoolRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashBoolean( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedBoolRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - 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_PredefinedBoolRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedBoolRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool 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); - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedBoolRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedBoolRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedBoolRuleEdition2023 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.PredefinedBoolRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023OrBuilder.java deleted file mode 100644 index dc636715..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedBoolRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedBoolRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2.java deleted file mode 100644 index 7624df0e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedBoolRuleProto2} - */ -public final class PredefinedBoolRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedBoolRuleProto2) - PredefinedBoolRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedBoolRuleProto2.class.getName()); - } - // Use PredefinedBoolRuleProto2.newBuilder() to construct. - private PredefinedBoolRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedBoolRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.class, build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * optional bool 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 bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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.writeBool(1, val_); - } - 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 - .computeBoolSize(1, val_); - } - 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.PredefinedBoolRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedBoolRuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashBoolean( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedBoolRuleProto2) - build.buf.validate.conformance.cases.PredefinedBoolRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.class, build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - 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_PredefinedBoolRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedBoolRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedBoolRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedBoolRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedBoolRuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * optional bool 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 bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * optional bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedBoolRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedBoolRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedBoolRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedBoolRuleProto2 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.PredefinedBoolRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2OrBuilder.java deleted file mode 100644 index 97b75bc5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedBoolRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedBoolRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3.java deleted file mode 100644 index fac71b7a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedBoolRuleProto3} - */ -public final class PredefinedBoolRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedBoolRuleProto3) - PredefinedBoolRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedBoolRuleProto3.class.getName()); - } - // Use PredefinedBoolRuleProto3.newBuilder() to construct. - private PredefinedBoolRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedBoolRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.class, build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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 (val_ != false) { - output.writeBool(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, val_); - } - 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.PredefinedBoolRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedBoolRuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedBoolRuleProto3) - build.buf.validate.conformance.cases.PredefinedBoolRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.class, build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - 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_PredefinedBoolRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedBoolRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedBoolRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedBoolRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedBoolRuleProto3.getDefaultInstance()) return this; - if (other.getVal() != false) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedBoolRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedBoolRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedBoolRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedBoolRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedBoolRuleProto3 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.PredefinedBoolRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3OrBuilder.java deleted file mode 100644 index fd7198de..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBoolRuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedBoolRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedBoolRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023.java deleted file mode 100644 index e8fc736a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedBytesRuleEdition2023} - */ -public final class PredefinedBytesRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedBytesRuleEdition2023) - PredefinedBytesRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedBytesRuleEdition2023.class.getName()); - } - // Use PredefinedBytesRuleEdition2023.newBuilder() to construct. - private PredefinedBytesRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedBytesRuleEdition2023() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes 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); - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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.writeBytes(1, val_); - } - 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 - .computeBytesSize(1, val_); - } - 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.PredefinedBytesRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023) 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.PredefinedBytesRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedBytesRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - 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_PredefinedBytesRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedBytesRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes 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); - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedBytesRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedBytesRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedBytesRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedBytesRuleEdition2023 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.PredefinedBytesRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023OrBuilder.java deleted file mode 100644 index 76d421f2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedBytesRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedBytesRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2.java deleted file mode 100644 index f2df50d6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedBytesRuleProto2} - */ -public final class PredefinedBytesRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedBytesRuleProto2) - PredefinedBytesRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedBytesRuleProto2.class.getName()); - } - // Use PredefinedBytesRuleProto2.newBuilder() to construct. - private PredefinedBytesRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedBytesRuleProto2() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.class, build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes 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 bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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.writeBytes(1, val_); - } - 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 - .computeBytesSize(1, val_); - } - 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.PredefinedBytesRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedBytesRuleProto2) 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.PredefinedBytesRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedBytesRuleProto2) - build.buf.validate.conformance.cases.PredefinedBytesRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.class, build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - 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_PredefinedBytesRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedBytesRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedBytesRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedBytesRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedBytesRuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes 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 bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * optional bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedBytesRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedBytesRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedBytesRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedBytesRuleProto2 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.PredefinedBytesRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2OrBuilder.java deleted file mode 100644 index 2a3051f9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedBytesRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedBytesRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3.java deleted file mode 100644 index aafc4f40..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedBytesRuleProto3} - */ -public final class PredefinedBytesRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedBytesRuleProto3) - PredefinedBytesRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedBytesRuleProto3.class.getName()); - } - // Use PredefinedBytesRuleProto3.newBuilder() to construct. - private PredefinedBytesRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedBytesRuleProto3() { - val_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.class, build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return 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 (!val_.isEmpty()) { - output.writeBytes(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!val_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, val_); - } - 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.PredefinedBytesRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedBytesRuleProto3) obj; - - 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(); - 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.PredefinedBytesRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedBytesRuleProto3) - build.buf.validate.conformance.cases.PredefinedBytesRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.class, build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = com.google.protobuf.ByteString.EMPTY; - 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_PredefinedBytesRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedBytesRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedBytesRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedBytesRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedBytesRuleProto3.getDefaultInstance()) return this; - if (other.getVal() != com.google.protobuf.ByteString.EMPTY) { - setVal(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: { - val_ = input.readBytes(); - 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.ByteString val_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVal() { - return val_; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = getDefaultInstance().getVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedBytesRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedBytesRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedBytesRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedBytesRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedBytesRuleProto3 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.PredefinedBytesRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3OrBuilder.java deleted file mode 100644 index 52a8b1b1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedBytesRuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedBytesRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedBytesRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * bytes val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.ByteString getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023.java deleted file mode 100644 index dd0fb2c4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023.java +++ /dev/null @@ -1,458 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023} - */ -public final class PredefinedDoubleRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023) - PredefinedDoubleRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedDoubleRuleEdition2023.class.getName()); - } - // Use PredefinedDoubleRuleEdition2023.newBuilder() to construct. - private PredefinedDoubleRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedDoubleRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double 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); - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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.writeDouble(1, val_); - } - 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 - .computeDoubleSize(1, val_); - } - 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.PredefinedDoubleRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - 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_PredefinedDoubleRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedDoubleRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double 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); - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedDoubleRuleEdition2023 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.PredefinedDoubleRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023OrBuilder.java deleted file mode 100644 index db7b3dc6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedDoubleRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedDoubleRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2.java deleted file mode 100644 index c12ba91b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2.java +++ /dev/null @@ -1,458 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedDoubleRuleProto2} - */ -public final class PredefinedDoubleRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedDoubleRuleProto2) - PredefinedDoubleRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedDoubleRuleProto2.class.getName()); - } - // Use PredefinedDoubleRuleProto2.newBuilder() to construct. - private PredefinedDoubleRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedDoubleRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.class, build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * optional double 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 double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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.writeDouble(1, val_); - } - 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 - .computeDoubleSize(1, val_); - } - 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.PredefinedDoubleRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedDoubleRuleProto2) - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.class, build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - 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_PredefinedDoubleRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedDoubleRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * optional double 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 double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * optional double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedDoubleRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedDoubleRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedDoubleRuleProto2 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.PredefinedDoubleRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2OrBuilder.java deleted file mode 100644 index 1697c229..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedDoubleRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedDoubleRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3.java deleted file mode 100644 index ae6493dc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3.java +++ /dev/null @@ -1,433 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedDoubleRuleProto3} - */ -public final class PredefinedDoubleRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedDoubleRuleProto3) - PredefinedDoubleRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedDoubleRuleProto3.class.getName()); - } - // Use PredefinedDoubleRuleProto3.newBuilder() to construct. - private PredefinedDoubleRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedDoubleRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.class, build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private double val_ = 0D; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return 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 (java.lang.Double.doubleToRawLongBits(val_) != 0) { - output.writeDouble(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, val_); - } - 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.PredefinedDoubleRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3) obj; - - if (java.lang.Double.doubleToLongBits(getVal()) - != java.lang.Double.doubleToLongBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVal())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedDoubleRuleProto3) - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.class, build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0D; - 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_PredefinedDoubleRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0D) { - setVal(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 9: { - val_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double val_ ; - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public double getVal() { - return val_; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(double value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedDoubleRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedDoubleRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedDoubleRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedDoubleRuleProto3 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.PredefinedDoubleRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3OrBuilder.java deleted file mode 100644 index 18551b65..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDoubleRuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedDoubleRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedDoubleRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - double getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023.java deleted file mode 100644 index fa2b6636..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023.java +++ /dev/null @@ -1,558 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedDurationRuleEdition2023} - */ -public final class PredefinedDurationRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedDurationRuleEdition2023) - PredefinedDurationRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedDurationRuleEdition2023.class.getName()); - } - // Use PredefinedDurationRuleEdition2023.newBuilder() to construct. - private PredefinedDurationRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedDurationRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.PredefinedDurationRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023) 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.PredefinedDurationRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedDurationRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.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_PredefinedDurationRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedDurationRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedDurationRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedDurationRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedDurationRuleEdition2023 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.PredefinedDurationRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023OrBuilder.java deleted file mode 100644 index 9e0b4c60..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedDurationRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedDurationRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2.java deleted file mode 100644 index 38fafe70..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2.java +++ /dev/null @@ -1,558 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedDurationRuleProto2} - */ -public final class PredefinedDurationRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedDurationRuleProto2) - PredefinedDurationRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedDurationRuleProto2.class.getName()); - } - // Use PredefinedDurationRuleProto2.newBuilder() to construct. - private PredefinedDurationRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedDurationRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.class, build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * optional .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.PredefinedDurationRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedDurationRuleProto2) 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.PredefinedDurationRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedDurationRuleProto2) - build.buf.validate.conformance.cases.PredefinedDurationRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.class, build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.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_PredefinedDurationRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedDurationRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedDurationRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedDurationRuleProto2.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * optional .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedDurationRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedDurationRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedDurationRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedDurationRuleProto2 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.PredefinedDurationRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2OrBuilder.java deleted file mode 100644 index 5c9185fa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto2OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedDurationRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedDurationRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * optional .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3.java deleted file mode 100644 index 324acbe6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3.java +++ /dev/null @@ -1,558 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedDurationRuleProto3} - */ -public final class PredefinedDurationRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedDurationRuleProto3) - PredefinedDurationRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedDurationRuleProto3.class.getName()); - } - // Use PredefinedDurationRuleProto3.newBuilder() to construct. - private PredefinedDurationRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedDurationRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.class, build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration val_; - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Duration getVal() { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Duration.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.PredefinedDurationRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedDurationRuleProto3) 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.PredefinedDurationRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedDurationRuleProto3) - build.buf.validate.conformance.cases.PredefinedDurationRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.class, build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.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_PredefinedDurationRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedDurationRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedDurationRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedDurationRuleProto3.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.Duration val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Duration getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Duration.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Duration.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedDurationRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedDurationRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedDurationRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedDurationRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedDurationRuleProto3 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.PredefinedDurationRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3OrBuilder.java deleted file mode 100644 index 2fe857c8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedDurationRuleProto3OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedDurationRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedDurationRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Duration getVal(); - /** - * .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023.java deleted file mode 100644 index 0b59429c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023.java +++ /dev/null @@ -1,599 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedEnumRuleEdition2023} - */ -public final class PredefinedEnumRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedEnumRuleEdition2023) - PredefinedEnumRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedEnumRuleEdition2023.class.getName()); - } - // Use PredefinedEnumRuleEdition2023.newBuilder() to construct. - private PredefinedEnumRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedEnumRuleEdition2023() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023} - */ - public enum EnumEdition2023 - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ENUM_EDITION2023_ZERO_UNSPECIFIED = 0; - */ - ENUM_EDITION2023_ZERO_UNSPECIFIED(0), - /** - * ENUM_EDITION2023_ONE = 1; - */ - ENUM_EDITION2023_ONE(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumEdition2023.class.getName()); - } - /** - * ENUM_EDITION2023_ZERO_UNSPECIFIED = 0; - */ - public static final int ENUM_EDITION2023_ZERO_UNSPECIFIED_VALUE = 0; - /** - * ENUM_EDITION2023_ONE = 1; - */ - public static final int ENUM_EDITION2023_ONE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EnumEdition2023 valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EnumEdition2023 forNumber(int value) { - switch (value) { - case 0: return ENUM_EDITION2023_ZERO_UNSPECIFIED; - case 1: return ENUM_EDITION2023_ONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EnumEdition2023> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EnumEdition2023 findValueByNumber(int number) { - return EnumEdition2023.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.getDescriptor().getEnumTypes().get(0); - } - - private static final EnumEdition2023[] VALUES = values(); - - public static EnumEdition2023 valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EnumEdition2023(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023) - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 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); - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 getVal() { - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 result = build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023.UNRECOGNIZED : result; - } - - 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.writeEnum(1, val_); - } - 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 - .computeEnumSize(1, val_); - } - 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.PredefinedEnumRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (val_ != other.val_) 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) + val_; - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedEnumRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedEnumRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedEnumRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 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); - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 getVal() { - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 result = build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedEnumRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedEnumRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedEnumRuleEdition2023 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.PredefinedEnumRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023OrBuilder.java deleted file mode 100644 index ddcc0929..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedEnumRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedEnumRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.PredefinedEnumRuleEdition2023.EnumEdition2023 getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2.java deleted file mode 100644 index 3b5bb198..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2.java +++ /dev/null @@ -1,569 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedEnumRuleProto2} - */ -public final class PredefinedEnumRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedEnumRuleProto2) - PredefinedEnumRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedEnumRuleProto2.class.getName()); - } - // Use PredefinedEnumRuleProto2.newBuilder() to construct. - private PredefinedEnumRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedEnumRuleProto2() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.class, build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2} - */ - public enum EnumProto2 - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ENUM_PROTO2_ZERO_UNSPECIFIED = 0; - */ - ENUM_PROTO2_ZERO_UNSPECIFIED(0), - /** - * ENUM_PROTO2_ONE = 1; - */ - ENUM_PROTO2_ONE(1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumProto2.class.getName()); - } - /** - * ENUM_PROTO2_ZERO_UNSPECIFIED = 0; - */ - public static final int ENUM_PROTO2_ZERO_UNSPECIFIED_VALUE = 0; - /** - * ENUM_PROTO2_ONE = 1; - */ - public static final int ENUM_PROTO2_ONE_VALUE = 1; - - - public final int getNumber() { - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EnumProto2 valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EnumProto2 forNumber(int value) { - switch (value) { - case 0: return ENUM_PROTO2_ZERO_UNSPECIFIED; - case 1: return ENUM_PROTO2_ONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EnumProto2> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EnumProto2 findValueByNumber(int number) { - return EnumProto2.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.getDescriptor().getEnumTypes().get(0); - } - - private static final EnumProto2[] VALUES = values(); - - public static EnumProto2 valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EnumProto2(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2) - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 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 .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 getVal() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 result = build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2.ENUM_PROTO2_ZERO_UNSPECIFIED : result; - } - - 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.writeEnum(1, val_); - } - 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 - .computeEnumSize(1, val_); - } - 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.PredefinedEnumRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedEnumRuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (val_ != other.val_) 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) + val_; - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedEnumRuleProto2) - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.class, build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedEnumRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedEnumRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedEnumRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedEnumRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - int tmpRaw = input.readEnum(); - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 tmpValue = - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2.forNumber(tmpRaw); - if (tmpValue == null) { - mergeUnknownVarintField(1, tmpRaw); - } else { - val_ = tmpRaw; - bitField0_ |= 0x00000001; - } - break; - } // case 8 - 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 int val_ = 0; - /** - * optional .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 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 .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 getVal() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 result = build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2.ENUM_PROTO2_ZERO_UNSPECIFIED : result; - } - /** - * optional .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedEnumRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedEnumRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedEnumRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedEnumRuleProto2 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.PredefinedEnumRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2OrBuilder.java deleted file mode 100644 index c9108580..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedEnumRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedEnumRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.PredefinedEnumRuleProto2.EnumProto2 getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3.java deleted file mode 100644 index b17d2991..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3.java +++ /dev/null @@ -1,576 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedEnumRuleProto3} - */ -public final class PredefinedEnumRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedEnumRuleProto3) - PredefinedEnumRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedEnumRuleProto3.class.getName()); - } - // Use PredefinedEnumRuleProto3.newBuilder() to construct. - private PredefinedEnumRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedEnumRuleProto3() { - val_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.class, build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3} - */ - public enum EnumProto3 - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ENUM_PROTO3_ZERO_UNSPECIFIED = 0; - */ - ENUM_PROTO3_ZERO_UNSPECIFIED(0), - /** - * ENUM_PROTO3_ONE = 1; - */ - ENUM_PROTO3_ONE(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumProto3.class.getName()); - } - /** - * ENUM_PROTO3_ZERO_UNSPECIFIED = 0; - */ - public static final int ENUM_PROTO3_ZERO_UNSPECIFIED_VALUE = 0; - /** - * ENUM_PROTO3_ONE = 1; - */ - public static final int ENUM_PROTO3_ONE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EnumProto3 valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EnumProto3 forNumber(int value) { - switch (value) { - case 0: return ENUM_PROTO3_ZERO_UNSPECIFIED; - case 1: return ENUM_PROTO3_ONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EnumProto3> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EnumProto3 findValueByNumber(int number) { - return EnumProto3.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.getDescriptor().getEnumTypes().get(0); - } - - private static final EnumProto3[] VALUES = values(); - - public static EnumProto3 valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EnumProto3(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3) - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override public build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 getVal() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 result = build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3.UNRECOGNIZED : result; - } - - 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 (val_ != build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3.ENUM_PROTO3_ZERO_UNSPECIFIED.getNumber()) { - output.writeEnum(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3.ENUM_PROTO3_ZERO_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, val_); - } - 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.PredefinedEnumRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedEnumRuleProto3) obj; - - if (val_ != other.val_) 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + val_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedEnumRuleProto3) - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.class, build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedEnumRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedEnumRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedEnumRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedEnumRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.getDefaultInstance()) return this; - if (other.val_ != 0) { - setValValue(other.getValValue()); - } - 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 8: { - val_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = 0; - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - @java.lang.Override public int getValValue() { - return val_; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue(int value) { - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 getVal() { - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 result = build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3.forNumber(val_); - return result == null ? build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - val_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedEnumRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedEnumRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedEnumRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedEnumRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedEnumRuleProto3 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.PredefinedEnumRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3OrBuilder.java deleted file mode 100644 index 46fd826b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedEnumRuleProto3OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedEnumRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedEnumRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for val. - */ - int getValValue(); - /** - * .buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.PredefinedEnumRuleProto3.EnumProto3 getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023.java deleted file mode 100644 index f92dc079..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023} - */ -public final class PredefinedFixed32RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023) - PredefinedFixed32RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFixed32RuleEdition2023.class.getName()); - } - // Use PredefinedFixed32RuleEdition2023.newBuilder() to construct. - private PredefinedFixed32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFixed32RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 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); - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeFixed32(1, val_); - } - 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 - .computeFixed32Size(1, val_); - } - 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.PredefinedFixed32RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedFixed32RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedFixed32RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 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); - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFixed32RuleEdition2023 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.PredefinedFixed32RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023OrBuilder.java deleted file mode 100644 index 5d09f446..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFixed32RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFixed32RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2.java deleted file mode 100644 index bea893d6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFixed32RuleProto2} - */ -public final class PredefinedFixed32RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFixed32RuleProto2) - PredefinedFixed32RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFixed32RuleProto2.class.getName()); - } - // Use PredefinedFixed32RuleProto2.newBuilder() to construct. - private PredefinedFixed32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFixed32RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional fixed32 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 fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeFixed32(1, val_); - } - 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 - .computeFixed32Size(1, val_); - } - 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.PredefinedFixed32RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFixed32RuleProto2) - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedFixed32RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedFixed32RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * optional fixed32 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 fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFixed32RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFixed32RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFixed32RuleProto2 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.PredefinedFixed32RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2OrBuilder.java deleted file mode 100644 index 65bf1dd1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFixed32RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFixed32RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3.java deleted file mode 100644 index 7374d07f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFixed32RuleProto3} - */ -public final class PredefinedFixed32RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFixed32RuleProto3) - PredefinedFixed32RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFixed32RuleProto3.class.getName()); - } - // Use PredefinedFixed32RuleProto3.newBuilder() to construct. - private PredefinedFixed32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFixed32RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(1, val_); - } - 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.PredefinedFixed32RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFixed32RuleProto3) - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedFixed32RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFixed32RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFixed32RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed32RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFixed32RuleProto3 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.PredefinedFixed32RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3OrBuilder.java deleted file mode 100644 index d9789214..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed32RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFixed32RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFixed32RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023.java deleted file mode 100644 index 337b415f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023} - */ -public final class PredefinedFixed64RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023) - PredefinedFixed64RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFixed64RuleEdition2023.class.getName()); - } - // Use PredefinedFixed64RuleEdition2023.newBuilder() to construct. - private PredefinedFixed64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFixed64RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 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); - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeFixed64(1, val_); - } - 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 - .computeFixed64Size(1, val_); - } - 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.PredefinedFixed64RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedFixed64RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedFixed64RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 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); - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFixed64RuleEdition2023 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.PredefinedFixed64RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023OrBuilder.java deleted file mode 100644 index bdd05b1a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFixed64RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFixed64RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2.java deleted file mode 100644 index b1feb190..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFixed64RuleProto2} - */ -public final class PredefinedFixed64RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFixed64RuleProto2) - PredefinedFixed64RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFixed64RuleProto2.class.getName()); - } - // Use PredefinedFixed64RuleProto2.newBuilder() to construct. - private PredefinedFixed64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFixed64RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * optional fixed64 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 fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeFixed64(1, val_); - } - 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 - .computeFixed64Size(1, val_); - } - 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.PredefinedFixed64RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFixed64RuleProto2) - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedFixed64RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedFixed64RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * optional fixed64 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 fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * optional fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFixed64RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFixed64RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFixed64RuleProto2 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.PredefinedFixed64RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2OrBuilder.java deleted file mode 100644 index 7a0f5de5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFixed64RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFixed64RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3.java deleted file mode 100644 index 7fa9119f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFixed64RuleProto3} - */ -public final class PredefinedFixed64RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFixed64RuleProto3) - PredefinedFixed64RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFixed64RuleProto3.class.getName()); - } - // Use PredefinedFixed64RuleProto3.newBuilder() to construct. - private PredefinedFixed64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFixed64RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(1, val_); - } - 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.PredefinedFixed64RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFixed64RuleProto3) - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedFixed64RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFixed64RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFixed64RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedFixed64RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFixed64RuleProto3 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.PredefinedFixed64RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3OrBuilder.java deleted file mode 100644 index c57694ed..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFixed64RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFixed64RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFixed64RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * fixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023.java deleted file mode 100644 index b363ff78..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023.java +++ /dev/null @@ -1,458 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFloatRuleEdition2023} - */ -public final class PredefinedFloatRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFloatRuleEdition2023) - PredefinedFloatRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFloatRuleEdition2023.class.getName()); - } - // Use PredefinedFloatRuleEdition2023.newBuilder() to construct. - private PredefinedFloatRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFloatRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float 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); - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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.writeFloat(1, val_); - } - 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 - .computeFloatSize(1, val_); - } - 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.PredefinedFloatRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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) + java.lang.Float.floatToIntBits( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFloatRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - 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_PredefinedFloatRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedFloatRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float 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); - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFloatRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFloatRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFloatRuleEdition2023 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.PredefinedFloatRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023OrBuilder.java deleted file mode 100644 index 10b0703b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFloatRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFloatRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2.java deleted file mode 100644 index ca7f2a90..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2.java +++ /dev/null @@ -1,458 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFloatRuleProto2} - */ -public final class PredefinedFloatRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFloatRuleProto2) - PredefinedFloatRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFloatRuleProto2.class.getName()); - } - // Use PredefinedFloatRuleProto2.newBuilder() to construct. - private PredefinedFloatRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFloatRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.class, build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * optional float 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 float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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.writeFloat(1, val_); - } - 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 - .computeFloatSize(1, val_); - } - 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.PredefinedFloatRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedFloatRuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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) + java.lang.Float.floatToIntBits( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFloatRuleProto2) - build.buf.validate.conformance.cases.PredefinedFloatRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.class, build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - 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_PredefinedFloatRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedFloatRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedFloatRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFloatRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFloatRuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * optional float 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 float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * optional float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFloatRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFloatRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFloatRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFloatRuleProto2 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.PredefinedFloatRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2OrBuilder.java deleted file mode 100644 index eff1258c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFloatRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFloatRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3.java deleted file mode 100644 index e9b672df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3.java +++ /dev/null @@ -1,433 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedFloatRuleProto3} - */ -public final class PredefinedFloatRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedFloatRuleProto3) - PredefinedFloatRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedFloatRuleProto3.class.getName()); - } - // Use PredefinedFloatRuleProto3.newBuilder() to construct. - private PredefinedFloatRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedFloatRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.class, build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private float val_ = 0F; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return 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 (java.lang.Float.floatToRawIntBits(val_) != 0) { - output.writeFloat(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(val_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, val_); - } - 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.PredefinedFloatRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedFloatRuleProto3) obj; - - if (java.lang.Float.floatToIntBits(getVal()) - != java.lang.Float.floatToIntBits( - 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedFloatRuleProto3) - build.buf.validate.conformance.cases.PredefinedFloatRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.class, build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0F; - 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_PredefinedFloatRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedFloatRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedFloatRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedFloatRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedFloatRuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0F) { - setVal(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 13: { - val_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 float val_ ; - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public float getVal() { - return val_; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(float value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedFloatRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedFloatRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedFloatRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedFloatRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedFloatRuleProto3 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.PredefinedFloatRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3OrBuilder.java deleted file mode 100644 index 24b3c2b3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedFloatRuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedFloatRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedFloatRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - float getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023.java deleted file mode 100644 index 49af0f95..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedInt32RuleEdition2023} - */ -public final class PredefinedInt32RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedInt32RuleEdition2023) - PredefinedInt32RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedInt32RuleEdition2023.class.getName()); - } - // Use PredefinedInt32RuleEdition2023.newBuilder() to construct. - private PredefinedInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedInt32RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.PredefinedInt32RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedInt32RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedInt32RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 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); - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedInt32RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedInt32RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedInt32RuleEdition2023 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.PredefinedInt32RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023OrBuilder.java deleted file mode 100644 index 936f0d12..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedInt32RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedInt32RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2.java deleted file mode 100644 index c6726f54..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedInt32RuleProto2} - */ -public final class PredefinedInt32RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedInt32RuleProto2) - PredefinedInt32RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedInt32RuleProto2.class.getName()); - } - // Use PredefinedInt32RuleProto2.newBuilder() to construct. - private PredefinedInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedInt32RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.PredefinedInt32RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedInt32RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedInt32RuleProto2) - build.buf.validate.conformance.cases.PredefinedInt32RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedInt32RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedInt32RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedInt32RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedInt32RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedInt32RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedInt32RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedInt32RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedInt32RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedInt32RuleProto2 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.PredefinedInt32RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2OrBuilder.java deleted file mode 100644 index 82a7d4b7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedInt32RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedInt32RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3.java deleted file mode 100644 index 1db364a6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedInt32RuleProto3} - */ -public final class PredefinedInt32RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedInt32RuleProto3) - PredefinedInt32RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedInt32RuleProto3.class.getName()); - } - // Use PredefinedInt32RuleProto3.newBuilder() to construct. - private PredefinedInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedInt32RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.PredefinedInt32RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedInt32RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedInt32RuleProto3) - build.buf.validate.conformance.cases.PredefinedInt32RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedInt32RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedInt32RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedInt32RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedInt32RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedInt32RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedInt32RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedInt32RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedInt32RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedInt32RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedInt32RuleProto3 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.PredefinedInt32RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3OrBuilder.java deleted file mode 100644 index b3e739b6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt32RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedInt32RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedInt32RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023.java deleted file mode 100644 index 27c9e2b8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedInt64RuleEdition2023} - */ -public final class PredefinedInt64RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedInt64RuleEdition2023) - PredefinedInt64RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedInt64RuleEdition2023.class.getName()); - } - // Use PredefinedInt64RuleEdition2023.newBuilder() to construct. - private PredefinedInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedInt64RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 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); - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeInt64(1, val_); - } - 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 - .computeInt64Size(1, val_); - } - 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.PredefinedInt64RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedInt64RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedInt64RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 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); - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedInt64RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedInt64RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedInt64RuleEdition2023 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.PredefinedInt64RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023OrBuilder.java deleted file mode 100644 index d8489f75..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedInt64RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedInt64RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2.java deleted file mode 100644 index 75cd2ebc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedInt64RuleProto2} - */ -public final class PredefinedInt64RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedInt64RuleProto2) - PredefinedInt64RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedInt64RuleProto2.class.getName()); - } - // Use PredefinedInt64RuleProto2.newBuilder() to construct. - private PredefinedInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedInt64RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * optional int64 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 int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeInt64(1, val_); - } - 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 - .computeInt64Size(1, val_); - } - 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.PredefinedInt64RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedInt64RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedInt64RuleProto2) - build.buf.validate.conformance.cases.PredefinedInt64RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedInt64RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedInt64RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedInt64RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedInt64RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedInt64RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * optional int64 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 int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedInt64RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedInt64RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedInt64RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedInt64RuleProto2 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.PredefinedInt64RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2OrBuilder.java deleted file mode 100644 index e34406ce..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedInt64RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedInt64RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3.java deleted file mode 100644 index aadbb2cc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedInt64RuleProto3} - */ -public final class PredefinedInt64RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedInt64RuleProto3) - PredefinedInt64RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedInt64RuleProto3.class.getName()); - } - // Use PredefinedInt64RuleProto3.newBuilder() to construct. - private PredefinedInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedInt64RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.PredefinedInt64RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedInt64RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedInt64RuleProto3) - build.buf.validate.conformance.cases.PredefinedInt64RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedInt64RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedInt64RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedInt64RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedInt64RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedInt64RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedInt64RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedInt64RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedInt64RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedInt64RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedInt64RuleProto3 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.PredefinedInt64RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3OrBuilder.java deleted file mode 100644 index ccc0b24c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedInt64RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedInt64RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedInt64RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023.java deleted file mode 100644 index 9c72ca74..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023.java +++ /dev/null @@ -1,640 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedMapRuleEdition2023} - */ -public final class PredefinedMapRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedMapRuleEdition2023) - PredefinedMapRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedMapRuleEdition2023.class.getName()); - } - // Use PredefinedMapRuleEdition2023.newBuilder() to construct. - private PredefinedMapRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedMapRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Long, java.lang.Long> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT64, - 0L, - com.google.protobuf.WireFormat.FieldType.UINT64, - 0L); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Long, java.lang.Long> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrDefault( - long key, - long defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeLongMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.PredefinedMapRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedMapRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - 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_PredefinedMapRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Long, java.lang.Long> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrDefault( - long key, - long defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - long key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - long key, - long value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedMapRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedMapRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedMapRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedMapRuleEdition2023 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.PredefinedMapRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023OrBuilder.java deleted file mode 100644 index f60b6efb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedMapRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedMapRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - long key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - long getValOrDefault( - long key, - long defaultValue); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - long getValOrThrow( - long key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3.java deleted file mode 100644 index 8f9a43bd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3.java +++ /dev/null @@ -1,640 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedMapRuleProto3} - */ -public final class PredefinedMapRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedMapRuleProto3) - PredefinedMapRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedMapRuleProto3.class.getName()); - } - // Use PredefinedMapRuleProto3.newBuilder() to construct. - private PredefinedMapRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedMapRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedMapRuleProto3.class, build.buf.validate.conformance.cases.PredefinedMapRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Long, java.lang.Long> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.UINT64, - 0L, - com.google.protobuf.WireFormat.FieldType.UINT64, - 0L); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Long, java.lang.Long> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrDefault( - long key, - long defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeLongMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.PredefinedMapRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedMapRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedMapRuleProto3) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 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.PredefinedMapRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedMapRuleProto3) - build.buf.validate.conformance.cases.PredefinedMapRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedMapRuleProto3.class, build.buf.validate.conformance.cases.PredefinedMapRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedMapRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - 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_PredefinedMapRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedMapRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedMapRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedMapRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedMapRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedMapRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedMapRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedMapRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedMapRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedMapRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedMapRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedMapRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedMapRuleProto3.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Long, java.lang.Long> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - long key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrDefault( - long key, - long defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public long getValOrThrow( - long key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - long key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - long key, - long value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedMapRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedMapRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedMapRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedMapRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedMapRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedMapRuleProto3 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.PredefinedMapRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3OrBuilder.java deleted file mode 100644 index 61ae9d36..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedMapRuleProto3OrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedMapRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedMapRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - long key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - long getValOrDefault( - long key, - long defaultValue); - /** - * map<uint64, uint64> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - long getValOrThrow( - long key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023.java deleted file mode 100644 index f271072f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023.java +++ /dev/null @@ -1,540 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023} - */ -public final class PredefinedRepeatedRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) - PredefinedRepeatedRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRepeatedRuleEdition2023.class.getName()); - } - // Use PredefinedRepeatedRuleEdition2023.newBuilder() to construct. - private PredefinedRepeatedRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedRepeatedRuleEdition2023() { - val_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList val_ = - emptyLongList(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeUInt64NoTag(val_.getLong(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt64SizeNoTag(val_.getLong(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.PredefinedRepeatedRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) 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.PredefinedRepeatedRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyLongList(); - 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_PredefinedRepeatedRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - long v = input.readUInt64(); - ensureValIsMutable(); - val_.addLong(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addLong(input.readUInt64()); - } - input.popLimit(limit); - 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.Internal.LongList val_ = emptyLongList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, long value) { - - ensureValIsMutable(); - val_.setLong(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(long value) { - - ensureValIsMutable(); - val_.addLong(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedRepeatedRuleEdition2023 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.PredefinedRepeatedRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023OrBuilder.java deleted file mode 100644 index 7741df95..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedRepeatedRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - long getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2.java deleted file mode 100644 index c3077bee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2.java +++ /dev/null @@ -1,529 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedRuleProto2} - */ -public final class PredefinedRepeatedRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) - PredefinedRepeatedRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRepeatedRuleProto2.class.getName()); - } - // Use PredefinedRepeatedRuleProto2.newBuilder() to construct. - private PredefinedRepeatedRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedRepeatedRuleProto2() { - val_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList val_ = - emptyLongList(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(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.writeUInt64(1, val_.getLong(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt64SizeNoTag(val_.getLong(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.PredefinedRepeatedRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) 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.PredefinedRepeatedRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyLongList(); - 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_PredefinedRepeatedRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - long v = input.readUInt64(); - ensureValIsMutable(); - val_.addLong(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addLong(input.readUInt64()); - } - input.popLimit(limit); - 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.Internal.LongList val_ = emptyLongList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, long value) { - - ensureValIsMutable(); - val_.setLong(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(long value) { - - ensureValIsMutable(); - val_.addLong(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedRepeatedRuleProto2 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.PredefinedRepeatedRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2OrBuilder.java deleted file mode 100644 index 67a77c70..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto2OrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedRepeatedRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - long getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3.java deleted file mode 100644 index 12b6e064..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3.java +++ /dev/null @@ -1,540 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedRuleProto3} - */ -public final class PredefinedRepeatedRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) - PredefinedRepeatedRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRepeatedRuleProto3.class.getName()); - } - // Use PredefinedRepeatedRuleProto3.newBuilder() to construct. - private PredefinedRepeatedRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedRepeatedRuleProto3() { - val_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList val_ = - emptyLongList(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeUInt64NoTag(val_.getLong(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt64SizeNoTag(val_.getLong(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.PredefinedRepeatedRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) 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.PredefinedRepeatedRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyLongList(); - 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_PredefinedRepeatedRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - long v = input.readUInt64(); - ensureValIsMutable(); - val_.addLong(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addLong(input.readUInt64()); - } - input.popLimit(limit); - 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.Internal.LongList val_ = emptyLongList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, long value) { - - ensureValIsMutable(); - val_.setLong(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(long value) { - - ensureValIsMutable(); - val_.addLong(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedRepeatedRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedRepeatedRuleProto3 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.PredefinedRepeatedRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3OrBuilder.java deleted file mode 100644 index 60710659..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedRuleProto3OrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedRepeatedRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - long getVal(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 deleted file mode 100644 index 6bc13998..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto2Proto.java +++ /dev/null @@ -1,705 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public final class PredefinedRulesProto2Proto { - private PredefinedRulesProto2Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRulesProto2Proto.class.getName()); - } - 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.uint32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint64EvenProto2); - 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.fixed32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.fixed64EvenProto2); - 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.PredefinedRulesProto2Proto.boolFalseProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.stringValidPathProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.bytesValidPathProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.enumNonZeroProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.repeatedAtLeastFiveProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.durationTooLongProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.timestampInRangeProto2); - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public static final int FLOAT_ABS_RANGE_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.FloatRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.FloatRules, - java.lang.Float> floatAbsRangeProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Float.class, - null); - public static final int DOUBLE_ABS_RANGE_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.DoubleRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.DoubleRules, - java.lang.Double> doubleAbsRangeProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Double.class, - null); - public static final int INT32_EVEN_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 - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int INT64_EVEN_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 - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int UINT32_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.UInt32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.UInt32Rules, - java.lang.Boolean> uint32EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int UINT64_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.UInt64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.UInt64Rules, - java.lang.Boolean> uint64EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SINT32_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.SInt32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SInt32Rules, - java.lang.Boolean> sint32EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SINT64_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.SInt64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SInt64Rules, - java.lang.Boolean> sint64EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int FIXED32_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.Fixed32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.Fixed32Rules, - java.lang.Boolean> fixed32EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int FIXED64_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.Fixed64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.Fixed64Rules, - java.lang.Boolean> fixed64EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SFIXED32_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.SFixed32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SFixed32Rules, - java.lang.Boolean> sfixed32EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SFIXED64_EVEN_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.SFixed64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SFixed64Rules, - java.lang.Boolean> sfixed64EvenProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int BOOL_FALSE_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.BoolRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.BoolRules, - java.lang.Boolean> boolFalseProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int STRING_VALID_PATH_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.StringRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.StringRules, - java.lang.Boolean> stringValidPathProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int BYTES_VALID_PATH_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.BytesRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.BytesRules, - java.lang.Boolean> bytesValidPathProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int ENUM_NON_ZERO_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.EnumRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.EnumRules, - java.lang.Boolean> enumNonZeroProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int REPEATED_AT_LEAST_FIVE_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.RepeatedRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.RepeatedRules, - java.lang.Boolean> repeatedAtLeastFiveProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int DURATION_TOO_LONG_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.DurationRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.DurationRules, - java.lang.Boolean> durationTooLongProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int TIMESTAMP_IN_RANGE_PROTO2_FIELD_NUMBER = 1161; - /** - * extend .buf.validate.TimestampRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.TimestampRules, - java.lang.Boolean> timestampInRangeProto2 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_descriptor; - 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_PredefinedAndCustomRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n 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" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto2_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_fieldAccessorTable = new - 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 = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor, - new java.lang.String[] { "A", "B", }); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_descriptor = - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - 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); - 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)); - uint32EvenProto2.internalInit(descriptor.getExtensions().get(4)); - uint64EvenProto2.internalInit(descriptor.getExtensions().get(5)); - sint32EvenProto2.internalInit(descriptor.getExtensions().get(6)); - sint64EvenProto2.internalInit(descriptor.getExtensions().get(7)); - fixed32EvenProto2.internalInit(descriptor.getExtensions().get(8)); - fixed64EvenProto2.internalInit(descriptor.getExtensions().get(9)); - sfixed32EvenProto2.internalInit(descriptor.getExtensions().get(10)); - sfixed64EvenProto2.internalInit(descriptor.getExtensions().get(11)); - boolFalseProto2.internalInit(descriptor.getExtensions().get(12)); - stringValidPathProto2.internalInit(descriptor.getExtensions().get(13)); - bytesValidPathProto2.internalInit(descriptor.getExtensions().get(14)); - enumNonZeroProto2.internalInit(descriptor.getExtensions().get(15)); - repeatedAtLeastFiveProto2.internalInit(descriptor.getExtensions().get(16)); - durationTooLongProto2.internalInit(descriptor.getExtensions().get(17)); - timestampInRangeProto2.internalInit(descriptor.getExtensions().get(18)); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.boolFalseProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.bytesValidPathProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.doubleAbsRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.durationTooLongProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.enumNonZeroProto2); - 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.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.PredefinedRulesProto2Proto.sint32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sint64EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.stringValidPathProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.timestampInRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint64EvenProto2); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(build.buf.validate.ValidateProto.predefined); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} 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 deleted file mode 100644 index b4bc47a9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3Proto.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public final class PredefinedRulesProto3Proto { - private PredefinedRulesProto3Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRulesProto3Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_descriptor; - 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_PredefinedAndCustomRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n 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" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.getDescriptor(), - build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.getDescriptor(), - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedMapRuleProto3_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleProto3_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_fieldAccessorTable = new - 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 = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor, - new java.lang.String[] { "A", "B", }); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_descriptor = - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - 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); - 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); - internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor, - new java.lang.String[] { "Dummy1", "Dummy2", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.getDescriptor(); - build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.getDescriptor(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.boolFalseProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.bytesValidPathProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.doubleAbsRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.durationTooLongProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.enumNonZeroProto2); - 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.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.PredefinedRulesProto2Proto.sint32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sint64EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.stringValidPathProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.timestampInRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint64EvenProto2); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaround.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaround.java deleted file mode 100644 index bb12701d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaround.java +++ /dev/null @@ -1,753 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - *
- * This is a workaround for https://github.com/bufbuild/buf/issues/3306.
- * TODO(jchadwick-buf): Remove this when bufbuild/buf#3306 is fixed.
- * 
- * - * Protobuf type {@code buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround} - */ -public final class PredefinedRulesProto3UnusedImportBugWorkaround extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) - PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRulesProto3UnusedImportBugWorkaround.class.getName()); - } - // Use PredefinedRulesProto3UnusedImportBugWorkaround.newBuilder() to construct. - private PredefinedRulesProto3UnusedImportBugWorkaround(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedRulesProto3UnusedImportBugWorkaround() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.class, build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.Builder.class); - } - - private int bitField0_; - public static final int DUMMY_1_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy1_; - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - * @return Whether the dummy1 field is set. - */ - @java.lang.Override - public boolean hasDummy1() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - * @return The dummy1. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 getDummy1() { - return dummy1_ == null ? build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance() : dummy1_; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder getDummy1OrBuilder() { - return dummy1_ == null ? build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance() : dummy1_; - } - - public static final int DUMMY_2_FIELD_NUMBER = 2; - private build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy2_; - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - * @return Whether the dummy2 field is set. - */ - @java.lang.Override - public boolean hasDummy2() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - * @return The dummy2. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 getDummy2() { - return dummy2_ == null ? build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance() : dummy2_; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder getDummy2OrBuilder() { - return dummy2_ == null ? build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance() : dummy2_; - } - - 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, getDummy1()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getDummy2()); - } - 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, getDummy1()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDummy2()); - } - 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.PredefinedRulesProto3UnusedImportBugWorkaround)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround other = (build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) obj; - - if (hasDummy1() != other.hasDummy1()) return false; - if (hasDummy1()) { - if (!getDummy1() - .equals(other.getDummy1())) return false; - } - if (hasDummy2() != other.hasDummy2()) return false; - if (hasDummy2()) { - if (!getDummy2() - .equals(other.getDummy2())) 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 (hasDummy1()) { - hash = (37 * hash) + DUMMY_1_FIELD_NUMBER; - hash = (53 * hash) + getDummy1().hashCode(); - } - if (hasDummy2()) { - hash = (37 * hash) + DUMMY_2_FIELD_NUMBER; - hash = (53 * hash) + getDummy2().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround 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; - } - /** - *
-   * This is a workaround for https://github.com/bufbuild/buf/issues/3306.
-   * TODO(jchadwick-buf): Remove this when bufbuild/buf#3306 is fixed.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) - build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.class, build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getDummy1FieldBuilder(); - getDummy2FieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dummy1_ = null; - if (dummy1Builder_ != null) { - dummy1Builder_.dispose(); - dummy1Builder_ = null; - } - dummy2_ = null; - if (dummy2Builder_ != null) { - dummy2Builder_.dispose(); - dummy2Builder_ = 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_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround build() { - build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround buildPartial() { - build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround result = new build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dummy1_ = dummy1Builder_ == null - ? dummy1_ - : dummy1Builder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dummy2_ = dummy2Builder_ == null - ? dummy2_ - : dummy2Builder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround other) { - if (other == build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround.getDefaultInstance()) return this; - if (other.hasDummy1()) { - mergeDummy1(other.getDummy1()); - } - if (other.hasDummy2()) { - mergeDummy2(other.getDummy2()); - } - 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( - getDummy1FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getDummy2FieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - 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 build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy1_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder> dummy1Builder_; - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - * @return Whether the dummy1 field is set. - */ - public boolean hasDummy1() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - * @return The dummy1. - */ - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 getDummy1() { - if (dummy1Builder_ == null) { - return dummy1_ == null ? build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance() : dummy1_; - } else { - return dummy1Builder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - public Builder setDummy1(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 value) { - if (dummy1Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dummy1_ = value; - } else { - dummy1Builder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - public Builder setDummy1( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder builderForValue) { - if (dummy1Builder_ == null) { - dummy1_ = builderForValue.build(); - } else { - dummy1Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - public Builder mergeDummy1(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 value) { - if (dummy1Builder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - dummy1_ != null && - dummy1_ != build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance()) { - getDummy1Builder().mergeFrom(value); - } else { - dummy1_ = value; - } - } else { - dummy1Builder_.mergeFrom(value); - } - if (dummy1_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - public Builder clearDummy1() { - bitField0_ = (bitField0_ & ~0x00000001); - dummy1_ = null; - if (dummy1Builder_ != null) { - dummy1Builder_.dispose(); - dummy1Builder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder getDummy1Builder() { - bitField0_ |= 0x00000001; - onChanged(); - return getDummy1FieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder getDummy1OrBuilder() { - if (dummy1Builder_ != null) { - return dummy1Builder_.getMessageOrBuilder(); - } else { - return dummy1_ == null ? - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance() : dummy1_; - } - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder> - getDummy1FieldBuilder() { - if (dummy1Builder_ == null) { - dummy1Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder>( - getDummy1(), - getParentForChildren(), - isClean()); - dummy1_ = null; - } - return dummy1Builder_; - } - - private build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy2_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder> dummy2Builder_; - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - * @return Whether the dummy2 field is set. - */ - public boolean hasDummy2() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - * @return The dummy2. - */ - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 getDummy2() { - if (dummy2Builder_ == null) { - return dummy2_ == null ? build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance() : dummy2_; - } else { - return dummy2Builder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - public Builder setDummy2(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 value) { - if (dummy2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dummy2_ = value; - } else { - dummy2Builder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - public Builder setDummy2( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder builderForValue) { - if (dummy2Builder_ == null) { - dummy2_ = builderForValue.build(); - } else { - dummy2Builder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - public Builder mergeDummy2(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 value) { - if (dummy2Builder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - dummy2_ != null && - dummy2_ != build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance()) { - getDummy2Builder().mergeFrom(value); - } else { - dummy2_ = value; - } - } else { - dummy2Builder_.mergeFrom(value); - } - if (dummy2_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - public Builder clearDummy2() { - bitField0_ = (bitField0_ & ~0x00000002); - dummy2_ = null; - if (dummy2Builder_ != null) { - dummy2Builder_.dispose(); - dummy2Builder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder getDummy2Builder() { - bitField0_ |= 0x00000002; - onChanged(); - return getDummy2FieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder getDummy2OrBuilder() { - if (dummy2Builder_ != null) { - return dummy2Builder_.getMessageOrBuilder(); - } else { - return dummy2_ == null ? - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance() : dummy2_; - } - } - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder> - getDummy2FieldBuilder() { - if (dummy2Builder_ == null) { - dummy2Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder>( - getDummy2(), - getParentForChildren(), - isClean()); - dummy2_ = null; - } - return dummy2Builder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) - private static final build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround(); - } - - public static build.buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedRulesProto3UnusedImportBugWorkaround 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.PredefinedRulesProto3UnusedImportBugWorkaround getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder.java deleted file mode 100644 index bf1d8e87..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedRulesProto3UnusedImportBugWorkaroundOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRulesProto3UnusedImportBugWorkaround) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - * @return Whether the dummy1 field is set. - */ - boolean hasDummy1(); - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - * @return The dummy1. - */ - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 getDummy1(); - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 dummy_1 = 1 [json_name = "dummy1"]; - */ - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder getDummy1OrBuilder(); - - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - * @return Whether the dummy2 field is set. - */ - boolean hasDummy2(); - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - * @return The dummy2. - */ - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 getDummy2(); - /** - * .buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 dummy_2 = 2 [json_name = "dummy2"]; - */ - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder getDummy2OrBuilder(); -} 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 deleted file mode 100644 index 75ec0889..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProtoEditionsProto.java +++ /dev/null @@ -1,764 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public final class PredefinedRulesProtoEditionsProto { - private PredefinedRulesProtoEditionsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedRulesProtoEditionsProto.class.getName()); - } - 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.uint32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.uint64EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sint32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sint64EvenEdition2023); - 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.sfixed32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sfixed64EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.boolFalseEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.stringValidPathEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.bytesValidPathEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.enumNonZeroEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.repeatedAtLeastFiveEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.mapAtLeastFiveEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.durationTooLongEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.timestampInRangeEdition2023); - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public static final int FLOAT_ABS_RANGE_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.FloatRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.FloatRules, - java.lang.Float> floatAbsRangeEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Float.class, - null); - public static final int DOUBLE_ABS_RANGE_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.DoubleRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.DoubleRules, - java.lang.Double> doubleAbsRangeEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Double.class, - null); - public static final int INT32_EVEN_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 - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int INT64_EVEN_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 - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int UINT32_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.UInt32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.UInt32Rules, - java.lang.Boolean> uint32EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int UINT64_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.UInt64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.UInt64Rules, - java.lang.Boolean> uint64EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SINT32_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.SInt32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SInt32Rules, - java.lang.Boolean> sint32EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SINT64_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.SInt64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SInt64Rules, - java.lang.Boolean> sint64EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int FIXED32_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.Fixed32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.Fixed32Rules, - java.lang.Boolean> fixed32EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int FIXED64_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.Fixed64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.Fixed64Rules, - java.lang.Boolean> fixed64EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SFIXED32_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.SFixed32Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SFixed32Rules, - java.lang.Boolean> sfixed32EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int SFIXED64_EVEN_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.SFixed64Rules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.SFixed64Rules, - java.lang.Boolean> sfixed64EvenEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int BOOL_FALSE_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.BoolRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.BoolRules, - java.lang.Boolean> boolFalseEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int STRING_VALID_PATH_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.StringRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.StringRules, - java.lang.Boolean> stringValidPathEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int BYTES_VALID_PATH_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.BytesRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.BytesRules, - java.lang.Boolean> bytesValidPathEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int ENUM_NON_ZERO_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.EnumRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.EnumRules, - java.lang.Boolean> enumNonZeroEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int REPEATED_AT_LEAST_FIVE_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.RepeatedRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.RepeatedRules, - java.lang.Boolean> repeatedAtLeastFiveEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int MAP_AT_LEAST_FIVE_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.MapRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.MapRules, - java.lang.Boolean> mapAtLeastFiveEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int DURATION_TOO_LONG_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.DurationRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.DurationRules, - java.lang.Boolean> durationTooLongEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - public static final int TIMESTAMP_IN_RANGE_EDITION_2023_FIELD_NUMBER = 1162; - /** - * extend .buf.validate.TimestampRules { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - build.buf.validate.TimestampRules, - java.lang.Boolean> timestampInRangeEdition2023 = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_ValEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_descriptor; - 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_PredefinedAndCustomRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\nDbuf/validate/conformance/cases/predefi" + - "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" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedDoubleRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedInt32RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedInt64RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFixed32RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedFixed64RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedBoolRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedBytesRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedEnumRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedRepeatedRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedMapRuleEdition2023_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedDurationRuleEdition2023_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_fieldAccessorTable = new - 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 = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor, - new java.lang.String[] { "A", "B", }); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_descriptor = - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - 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); - 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)); - uint32EvenEdition2023.internalInit(descriptor.getExtensions().get(4)); - uint64EvenEdition2023.internalInit(descriptor.getExtensions().get(5)); - sint32EvenEdition2023.internalInit(descriptor.getExtensions().get(6)); - sint64EvenEdition2023.internalInit(descriptor.getExtensions().get(7)); - fixed32EvenEdition2023.internalInit(descriptor.getExtensions().get(8)); - fixed64EvenEdition2023.internalInit(descriptor.getExtensions().get(9)); - sfixed32EvenEdition2023.internalInit(descriptor.getExtensions().get(10)); - sfixed64EvenEdition2023.internalInit(descriptor.getExtensions().get(11)); - boolFalseEdition2023.internalInit(descriptor.getExtensions().get(12)); - stringValidPathEdition2023.internalInit(descriptor.getExtensions().get(13)); - bytesValidPathEdition2023.internalInit(descriptor.getExtensions().get(14)); - enumNonZeroEdition2023.internalInit(descriptor.getExtensions().get(15)); - repeatedAtLeastFiveEdition2023.internalInit(descriptor.getExtensions().get(16)); - mapAtLeastFiveEdition2023.internalInit(descriptor.getExtensions().get(17)); - durationTooLongEdition2023.internalInit(descriptor.getExtensions().get(18)); - timestampInRangeEdition2023.internalInit(descriptor.getExtensions().get(19)); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.boolFalseEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.bytesValidPathEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.doubleAbsRangeEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.durationTooLongEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.enumNonZeroEdition2023); - 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.mapAtLeastFiveEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.repeatedAtLeastFiveEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sfixed32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sfixed64EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sint32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sint64EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.stringValidPathEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.timestampInRangeEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.uint32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.uint64EvenEdition2023); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(build.buf.validate.ValidateProto.predefined); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023.java deleted file mode 100644 index 83714d98..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023} - */ -public final class PredefinedSFixed32RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023) - PredefinedSFixed32RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSFixed32RuleEdition2023.class.getName()); - } - // Use PredefinedSFixed32RuleEdition2023.newBuilder() to construct. - private PredefinedSFixed32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSFixed32RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 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); - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeSFixed32(1, val_); - } - 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 - .computeSFixed32Size(1, val_); - } - 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.PredefinedSFixed32RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedSFixed32RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSFixed32RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 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); - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSFixed32RuleEdition2023 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.PredefinedSFixed32RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023OrBuilder.java deleted file mode 100644 index 12cbec99..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSFixed32RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSFixed32RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2.java deleted file mode 100644 index 26de73bb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSFixed32RuleProto2} - */ -public final class PredefinedSFixed32RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSFixed32RuleProto2) - PredefinedSFixed32RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSFixed32RuleProto2.class.getName()); - } - // Use PredefinedSFixed32RuleProto2.newBuilder() to construct. - private PredefinedSFixed32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSFixed32RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional sfixed32 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 sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeSFixed32(1, val_); - } - 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 - .computeSFixed32Size(1, val_); - } - 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.PredefinedSFixed32RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSFixed32RuleProto2) - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedSFixed32RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSFixed32RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * optional sfixed32 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 sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSFixed32RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSFixed32RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSFixed32RuleProto2 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.PredefinedSFixed32RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2OrBuilder.java deleted file mode 100644 index db6725a0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSFixed32RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSFixed32RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3.java deleted file mode 100644 index 6bd7ce28..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSFixed32RuleProto3} - */ -public final class PredefinedSFixed32RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) - PredefinedSFixed32RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSFixed32RuleProto3.class.getName()); - } - // Use PredefinedSFixed32RuleProto3.newBuilder() to construct. - private PredefinedSFixed32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSFixed32RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.PredefinedSFixed32RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedSFixed32RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed32RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSFixed32RuleProto3 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.PredefinedSFixed32RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3OrBuilder.java deleted file mode 100644 index 81f346a5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed32RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSFixed32RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSFixed32RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023.java deleted file mode 100644 index 549418bd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023} - */ -public final class PredefinedSFixed64RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023) - PredefinedSFixed64RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSFixed64RuleEdition2023.class.getName()); - } - // Use PredefinedSFixed64RuleEdition2023.newBuilder() to construct. - private PredefinedSFixed64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSFixed64RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 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); - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeSFixed64(1, val_); - } - 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 - .computeSFixed64Size(1, val_); - } - 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.PredefinedSFixed64RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedSFixed64RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSFixed64RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 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); - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSFixed64RuleEdition2023 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.PredefinedSFixed64RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023OrBuilder.java deleted file mode 100644 index 73a0e2e1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSFixed64RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSFixed64RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2.java deleted file mode 100644 index 7b6073cd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSFixed64RuleProto2} - */ -public final class PredefinedSFixed64RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSFixed64RuleProto2) - PredefinedSFixed64RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSFixed64RuleProto2.class.getName()); - } - // Use PredefinedSFixed64RuleProto2.newBuilder() to construct. - private PredefinedSFixed64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSFixed64RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * optional sfixed64 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 sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeSFixed64(1, val_); - } - 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 - .computeSFixed64Size(1, val_); - } - 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.PredefinedSFixed64RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSFixed64RuleProto2) - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedSFixed64RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSFixed64RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * optional sfixed64 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 sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * optional sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSFixed64RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSFixed64RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSFixed64RuleProto2 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.PredefinedSFixed64RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2OrBuilder.java deleted file mode 100644 index db4bc98a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSFixed64RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSFixed64RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3.java deleted file mode 100644 index 6b10047d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSFixed64RuleProto3} - */ -public final class PredefinedSFixed64RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) - PredefinedSFixed64RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSFixed64RuleProto3.class.getName()); - } - // Use PredefinedSFixed64RuleProto3.newBuilder() to construct. - private PredefinedSFixed64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSFixed64RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.PredefinedSFixed64RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSFixed64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedSFixed64RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedSFixed64RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSFixed64RuleProto3 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.PredefinedSFixed64RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3OrBuilder.java deleted file mode 100644 index 486938da..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSFixed64RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSFixed64RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSFixed64RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023.java deleted file mode 100644 index 1df18748..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023} - */ -public final class PredefinedSInt32RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023) - PredefinedSInt32RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSInt32RuleEdition2023.class.getName()); - } - // Use PredefinedSInt32RuleEdition2023.newBuilder() to construct. - private PredefinedSInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSInt32RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 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); - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeSInt32(1, val_); - } - 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 - .computeSInt32Size(1, val_); - } - 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.PredefinedSInt32RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedSInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSInt32RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 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); - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSInt32RuleEdition2023 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.PredefinedSInt32RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023OrBuilder.java deleted file mode 100644 index b8ddb861..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSInt32RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSInt32RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2.java deleted file mode 100644 index 5da68d15..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSInt32RuleProto2} - */ -public final class PredefinedSInt32RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSInt32RuleProto2) - PredefinedSInt32RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSInt32RuleProto2.class.getName()); - } - // Use PredefinedSInt32RuleProto2.newBuilder() to construct. - private PredefinedSInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSInt32RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional sint32 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 sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeSInt32(1, val_); - } - 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 - .computeSInt32Size(1, val_); - } - 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.PredefinedSInt32RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSInt32RuleProto2) - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedSInt32RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSInt32RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional sint32 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 sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSInt32RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSInt32RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSInt32RuleProto2 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.PredefinedSInt32RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2OrBuilder.java deleted file mode 100644 index 999689f4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSInt32RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSInt32RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3.java deleted file mode 100644 index 0891a13f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSInt32RuleProto3} - */ -public final class PredefinedSInt32RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSInt32RuleProto3) - PredefinedSInt32RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSInt32RuleProto3.class.getName()); - } - // Use PredefinedSInt32RuleProto3.newBuilder() to construct. - private PredefinedSInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSInt32RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.PredefinedSInt32RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSInt32RuleProto3) - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedSInt32RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSInt32RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSInt32RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt32RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSInt32RuleProto3 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.PredefinedSInt32RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3OrBuilder.java deleted file mode 100644 index 5b3671a9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt32RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSInt32RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSInt32RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023.java deleted file mode 100644 index 05451313..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023} - */ -public final class PredefinedSInt64RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023) - PredefinedSInt64RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSInt64RuleEdition2023.class.getName()); - } - // Use PredefinedSInt64RuleEdition2023.newBuilder() to construct. - private PredefinedSInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSInt64RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 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); - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeSInt64(1, val_); - } - 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 - .computeSInt64Size(1, val_); - } - 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.PredefinedSInt64RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedSInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSInt64RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 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); - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSInt64RuleEdition2023 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.PredefinedSInt64RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023OrBuilder.java deleted file mode 100644 index 521128b9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSInt64RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSInt64RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2.java deleted file mode 100644 index b4746a0f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSInt64RuleProto2} - */ -public final class PredefinedSInt64RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSInt64RuleProto2) - PredefinedSInt64RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSInt64RuleProto2.class.getName()); - } - // Use PredefinedSInt64RuleProto2.newBuilder() to construct. - private PredefinedSInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSInt64RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * optional sint64 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 sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeSInt64(1, val_); - } - 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 - .computeSInt64Size(1, val_); - } - 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.PredefinedSInt64RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSInt64RuleProto2) - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedSInt64RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedSInt64RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * optional sint64 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 sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * optional sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSInt64RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSInt64RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSInt64RuleProto2 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.PredefinedSInt64RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2OrBuilder.java deleted file mode 100644 index bb04c971..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSInt64RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSInt64RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3.java deleted file mode 100644 index 18d345d3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedSInt64RuleProto3} - */ -public final class PredefinedSInt64RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedSInt64RuleProto3) - PredefinedSInt64RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedSInt64RuleProto3.class.getName()); - } - // Use PredefinedSInt64RuleProto3.newBuilder() to construct. - private PredefinedSInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedSInt64RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.PredefinedSInt64RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedSInt64RuleProto3) - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedSInt64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedSInt64RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedSInt64RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedSInt64RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedSInt64RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedSInt64RuleProto3 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.PredefinedSInt64RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3OrBuilder.java deleted file mode 100644 index cc74917b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedSInt64RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedSInt64RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedSInt64RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023.java deleted file mode 100644 index 1cae8fe2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023.java +++ /dev/null @@ -1,525 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedStringRuleEdition2023} - */ -public final class PredefinedStringRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedStringRuleEdition2023) - PredefinedStringRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedStringRuleEdition2023.class.getName()); - } - // Use PredefinedStringRuleEdition2023.newBuilder() to construct. - private PredefinedStringRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedStringRuleEdition2023() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string 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); - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.PredefinedStringRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023) 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.PredefinedStringRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedStringRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - 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_PredefinedStringRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedStringRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedStringRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedStringRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedStringRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedStringRuleEdition2023 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.PredefinedStringRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023OrBuilder.java deleted file mode 100644 index 405011ba..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedStringRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedStringRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2.java deleted file mode 100644 index 39e62a1f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2.java +++ /dev/null @@ -1,528 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedStringRuleProto2} - */ -public final class PredefinedStringRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedStringRuleProto2) - PredefinedStringRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedStringRuleProto2.class.getName()); - } - // Use PredefinedStringRuleProto2.newBuilder() to construct. - private PredefinedStringRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedStringRuleProto2() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedStringRuleProto2.class, build.buf.validate.conformance.cases.PredefinedStringRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string 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 string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.PredefinedStringRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedStringRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedStringRuleProto2) 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.PredefinedStringRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 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.PredefinedStringRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedStringRuleProto2) - build.buf.validate.conformance.cases.PredefinedStringRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedStringRuleProto2.class, build.buf.validate.conformance.cases.PredefinedStringRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedStringRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - 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_PredefinedStringRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedStringRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedStringRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedStringRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedStringRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedStringRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedStringRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedStringRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedStringRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedStringRuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedStringRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedStringRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedStringRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedStringRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedStringRuleProto2 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.PredefinedStringRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2OrBuilder.java deleted file mode 100644 index a546f84a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto2OrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedStringRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedStringRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3.java deleted file mode 100644 index 0e1f1bdc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3.java +++ /dev/null @@ -1,501 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedStringRuleProto3} - */ -public final class PredefinedStringRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedStringRuleProto3) - PredefinedStringRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedStringRuleProto3.class.getName()); - } - // Use PredefinedStringRuleProto3.newBuilder() to construct. - private PredefinedStringRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedStringRuleProto3() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedStringRuleProto3.class, build.buf.validate.conformance.cases.PredefinedStringRuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.PredefinedStringRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedStringRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedStringRuleProto3) obj; - - 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(); - 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.PredefinedStringRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 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.PredefinedStringRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedStringRuleProto3) - build.buf.validate.conformance.cases.PredefinedStringRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedStringRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedStringRuleProto3.class, build.buf.validate.conformance.cases.PredefinedStringRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedStringRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - 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_PredefinedStringRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedStringRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedStringRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedStringRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedStringRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedStringRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedStringRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedStringRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedStringRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedStringRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedStringRuleProto3.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedStringRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedStringRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedStringRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedStringRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedStringRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedStringRuleProto3 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.PredefinedStringRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3OrBuilder.java deleted file mode 100644 index 39ba8cc3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedStringRuleProto3OrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedStringRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedStringRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023.java deleted file mode 100644 index ce08a59b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023.java +++ /dev/null @@ -1,558 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023} - */ -public final class PredefinedTimestampRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023) - PredefinedTimestampRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedTimestampRuleEdition2023.class.getName()); - } - // Use PredefinedTimestampRuleEdition2023.newBuilder() to construct. - private PredefinedTimestampRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedTimestampRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.PredefinedTimestampRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023) 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.PredefinedTimestampRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023) - build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.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_PredefinedTimestampRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedTimestampRuleEdition2023 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.PredefinedTimestampRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023OrBuilder.java deleted file mode 100644 index 7d306c61..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedTimestampRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedTimestampRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2.java deleted file mode 100644 index 6e2971de..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2.java +++ /dev/null @@ -1,558 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedTimestampRuleProto2} - */ -public final class PredefinedTimestampRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedTimestampRuleProto2) - PredefinedTimestampRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedTimestampRuleProto2.class.getName()); - } - // Use PredefinedTimestampRuleProto2.newBuilder() to construct. - private PredefinedTimestampRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedTimestampRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.class, build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * optional .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.PredefinedTimestampRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2) 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.PredefinedTimestampRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedTimestampRuleProto2) - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.class, build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.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_PredefinedTimestampRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * optional .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedTimestampRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedTimestampRuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedTimestampRuleProto2 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.PredefinedTimestampRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2OrBuilder.java deleted file mode 100644 index f9684e1d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto2OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedTimestampRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedTimestampRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * optional .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3.java deleted file mode 100644 index 3d064492..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3.java +++ /dev/null @@ -1,558 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedTimestampRuleProto3} - */ -public final class PredefinedTimestampRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedTimestampRuleProto3) - PredefinedTimestampRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedTimestampRuleProto3.class.getName()); - } - // Use PredefinedTimestampRuleProto3.newBuilder() to construct. - private PredefinedTimestampRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedTimestampRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.class, build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.PredefinedTimestampRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3) 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.PredefinedTimestampRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedTimestampRuleProto3) - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.class, build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.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_PredefinedTimestampRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedTimestampRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedTimestampRuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedTimestampRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedTimestampRuleProto3 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.PredefinedTimestampRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3OrBuilder.java deleted file mode 100644 index 46a5930d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedTimestampRuleProto3OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedTimestampRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedTimestampRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023.java deleted file mode 100644 index 98eb1395..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023} - */ -public final class PredefinedUInt32RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023) - PredefinedUInt32RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedUInt32RuleEdition2023.class.getName()); - } - // Use PredefinedUInt32RuleEdition2023.newBuilder() to construct. - private PredefinedUInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedUInt32RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 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); - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeUInt32(1, val_); - } - 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 - .computeUInt32Size(1, val_); - } - 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.PredefinedUInt32RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedUInt32RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedUInt32RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 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); - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedUInt32RuleEdition2023 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.PredefinedUInt32RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023OrBuilder.java deleted file mode 100644 index d81aaf83..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedUInt32RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedUInt32RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2.java deleted file mode 100644 index 7a0f333e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedUInt32RuleProto2} - */ -public final class PredefinedUInt32RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedUInt32RuleProto2) - PredefinedUInt32RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedUInt32RuleProto2.class.getName()); - } - // Use PredefinedUInt32RuleProto2.newBuilder() to construct. - private PredefinedUInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedUInt32RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional uint32 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 uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeUInt32(1, val_); - } - 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 - .computeUInt32Size(1, val_); - } - 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.PredefinedUInt32RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedUInt32RuleProto2) - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedUInt32RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedUInt32RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional uint32 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 uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedUInt32RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedUInt32RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedUInt32RuleProto2 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.PredefinedUInt32RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2OrBuilder.java deleted file mode 100644 index 436b0273..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedUInt32RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedUInt32RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3.java deleted file mode 100644 index c5dec91b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedUInt32RuleProto3} - */ -public final class PredefinedUInt32RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedUInt32RuleProto3) - PredefinedUInt32RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedUInt32RuleProto3.class.getName()); - } - // Use PredefinedUInt32RuleProto3.newBuilder() to construct. - private PredefinedUInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedUInt32RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.PredefinedUInt32RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedUInt32RuleProto3) - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt32RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - 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_PredefinedUInt32RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedUInt32RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedUInt32RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt32RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedUInt32RuleProto3 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.PredefinedUInt32RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3OrBuilder.java deleted file mode 100644 index 6bddd145..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt32RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedUInt32RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedUInt32RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023.java deleted file mode 100644 index 8d8d2f5e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023} - */ -public final class PredefinedUInt64RuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023) - PredefinedUInt64RuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedUInt64RuleEdition2023.class.getName()); - } - // Use PredefinedUInt64RuleEdition2023.newBuilder() to construct. - private PredefinedUInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedUInt64RuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 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); - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeUInt64(1, val_); - } - 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 - .computeUInt64Size(1, val_); - } - 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.PredefinedUInt64RuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023) - build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedUInt64RuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 build() { - build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedUInt64RuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 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); - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023) - private static final build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedUInt64RuleEdition2023 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.PredefinedUInt64RuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023OrBuilder.java deleted file mode 100644 index 013dad20..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedUInt64RuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedUInt64RuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2.java deleted file mode 100644 index a32aaf2b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2.java +++ /dev/null @@ -1,457 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedUInt64RuleProto2} - */ -public final class PredefinedUInt64RuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedUInt64RuleProto2) - PredefinedUInt64RuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedUInt64RuleProto2.class.getName()); - } - // Use PredefinedUInt64RuleProto2.newBuilder() to construct. - private PredefinedUInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedUInt64RuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * optional uint64 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 uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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.writeUInt64(1, val_); - } - 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 - .computeUInt64Size(1, val_); - } - 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.PredefinedUInt64RuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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) + com.google.protobuf.Internal.hashLong( - getVal()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedUInt64RuleProto2) - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedUInt64RuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 build() { - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 buildPartial() { - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.PredefinedUInt64RuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 other) { - if (other == build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * optional uint64 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 uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * optional uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedUInt64RuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedUInt64RuleProto2) - private static final build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2(); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedUInt64RuleProto2 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.PredefinedUInt64RuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2OrBuilder.java deleted file mode 100644 index 04e3711f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedUInt64RuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedUInt64RuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3.java deleted file mode 100644 index 89ac4476..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3.java +++ /dev/null @@ -1,432 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.PredefinedUInt64RuleProto3} - */ -public final class PredefinedUInt64RuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedUInt64RuleProto3) - PredefinedUInt64RuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedUInt64RuleProto3.class.getName()); - } - // Use PredefinedUInt64RuleProto3.newBuilder() to construct. - private PredefinedUInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedUInt64RuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.PredefinedUInt64RuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedUInt64RuleProto3) - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedUInt64RuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - 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_PredefinedUInt64RuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 build() { - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 buildPartial() { - build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 other) { - if (other == build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedUInt64RuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedUInt64RuleProto3) - private static final build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3(); - } - - public static build.buf.validate.conformance.cases.PredefinedUInt64RuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedUInt64RuleProto3 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.PredefinedUInt64RuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3OrBuilder.java deleted file mode 100644 index ece33b79..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedUInt64RuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface PredefinedUInt64RuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedUInt64RuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefault.java deleted file mode 100644 index 79ca1f75..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapIgnoreDefault} - */ -public final class Proto2MapIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapIgnoreDefault) - Proto2MapIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapIgnoreDefault.class.getName()); - } - // Use Proto2MapIgnoreDefault.newBuilder() to construct. - private Proto2MapIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2MapIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapIgnoreDefault) - build.buf.validate.conformance.cases.Proto2MapIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2MapIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2MapIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2MapIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2MapIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2MapIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapIgnoreDefault 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.Proto2MapIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefaultOrBuilder.java deleted file mode 100644 index 07a04115..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmpty.java deleted file mode 100644 index ba362be4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapIgnoreEmpty} - */ -public final class Proto2MapIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapIgnoreEmpty) - Proto2MapIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapIgnoreEmpty.class.getName()); - } - // Use Proto2MapIgnoreEmpty.newBuilder() to construct. - private Proto2MapIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2MapIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapIgnoreEmpty 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.Proto2MapIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmptyOrBuilder.java deleted file mode 100644 index fe672942..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecified.java deleted file mode 100644 index c92044a8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapIgnoreUnspecified} - */ -public final class Proto2MapIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) - Proto2MapIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapIgnoreUnspecified.class.getName()); - } - // Use Proto2MapIgnoreUnspecified.newBuilder() to construct. - private Proto2MapIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2MapIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapIgnoreUnspecified 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.Proto2MapIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 343110b9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefault.java deleted file mode 100644 index d94c7dfa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault} - */ -public final class Proto2MapKeyIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) - Proto2MapKeyIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapKeyIgnoreDefault.class.getName()); - } - // Use Proto2MapKeyIgnoreDefault.newBuilder() to construct. - private Proto2MapKeyIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapKeyIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapKeyIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapKeyIgnoreDefault 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.Proto2MapKeyIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefaultOrBuilder.java deleted file mode 100644 index a535d1ba..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapKeyIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapKeyIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmpty.java deleted file mode 100644 index 0e506005..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty} - */ -public final class Proto2MapKeyIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) - Proto2MapKeyIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapKeyIgnoreEmpty.class.getName()); - } - // Use Proto2MapKeyIgnoreEmpty.newBuilder() to construct. - private Proto2MapKeyIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapKeyIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapKeyIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapKeyIgnoreEmpty 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.Proto2MapKeyIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmptyOrBuilder.java deleted file mode 100644 index 37b6af78..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapKeyIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapKeyIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecified.java deleted file mode 100644 index 72fdf486..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified} - */ -public final class Proto2MapKeyIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) - Proto2MapKeyIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapKeyIgnoreUnspecified.class.getName()); - } - // Use Proto2MapKeyIgnoreUnspecified.newBuilder() to construct. - private Proto2MapKeyIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapKeyIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapKeyIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapKeyIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapKeyIgnoreUnspecified 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.Proto2MapKeyIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 05ecb586..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapKeyIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapKeyIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapKeyIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefault.java deleted file mode 100644 index e2ae8d70..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapValueIgnoreDefault} - */ -public final class Proto2MapValueIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) - Proto2MapValueIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapValueIgnoreDefault.class.getName()); - } - // Use Proto2MapValueIgnoreDefault.newBuilder() to construct. - private Proto2MapValueIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapValueIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapValueIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) - build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapValueIgnoreDefault 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.Proto2MapValueIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefaultOrBuilder.java deleted file mode 100644 index dc41c22d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapValueIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapValueIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmpty.java deleted file mode 100644 index 72100ba6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty} - */ -public final class Proto2MapValueIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) - Proto2MapValueIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapValueIgnoreEmpty.class.getName()); - } - // Use Proto2MapValueIgnoreEmpty.newBuilder() to construct. - private Proto2MapValueIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapValueIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapValueIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapValueIgnoreEmpty 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.Proto2MapValueIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmptyOrBuilder.java deleted file mode 100644 index 72fd502a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapValueIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapValueIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecified.java deleted file mode 100644 index 02db998f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified} - */ -public final class Proto2MapValueIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) - Proto2MapValueIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MapValueIgnoreUnspecified.class.getName()); - } - // Use Proto2MapValueIgnoreUnspecified.newBuilder() to construct. - private Proto2MapValueIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MapValueIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto2MapValueIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MapValueIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MapValueIgnoreUnspecified 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.Proto2MapValueIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index eae2b7c0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MapValueIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MapValueIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MapValueIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefault.java deleted file mode 100644 index 360d5d36..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefault.java +++ /dev/null @@ -1,1100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault} - */ -public final class Proto2MessageOptionalIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault) - Proto2MessageOptionalIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MessageOptionalIgnoreDefault.class.getName()); - } - // Use Proto2MessageOptionalIgnoreDefault.newBuilder() to construct. - private Proto2MessageOptionalIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MessageOptionalIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto2MessageOptionalIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg) 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.Proto2MessageOptionalIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg 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.Proto2MessageOptionalIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg) - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2MessageOptionalIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto2MessageOptionalIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val_; - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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 .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.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.Proto2MessageOptionalIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault) 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.Proto2MessageOptionalIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault) - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.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.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.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 build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg 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 .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MessageOptionalIgnoreDefault 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.Proto2MessageOptionalIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefaultOrBuilder.java deleted file mode 100644 index b2800f9e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MessageOptionalIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmpty.java deleted file mode 100644 index c89e563e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmpty.java +++ /dev/null @@ -1,1100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty} - */ -public final class Proto2MessageOptionalIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty) - Proto2MessageOptionalIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MessageOptionalIgnoreEmpty.class.getName()); - } - // Use Proto2MessageOptionalIgnoreEmpty.newBuilder() to construct. - private Proto2MessageOptionalIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MessageOptionalIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto2MessageOptionalIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg) 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.Proto2MessageOptionalIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2MessageOptionalIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto2MessageOptionalIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val_; - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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 .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.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.Proto2MessageOptionalIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty) 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.Proto2MessageOptionalIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.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.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.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 build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg 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 .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MessageOptionalIgnoreEmpty 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.Proto2MessageOptionalIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmptyOrBuilder.java deleted file mode 100644 index 1dd2bfcc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MessageOptionalIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecified.java deleted file mode 100644 index f5899cdf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecified.java +++ /dev/null @@ -1,1100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified} - */ -public final class Proto2MessageOptionalIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified) - Proto2MessageOptionalIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MessageOptionalIgnoreUnspecified.class.getName()); - } - // Use Proto2MessageOptionalIgnoreUnspecified.newBuilder() to construct. - private Proto2MessageOptionalIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MessageOptionalIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto2MessageOptionalIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg) 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.Proto2MessageOptionalIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2MessageOptionalIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto2MessageOptionalIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val_; - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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 .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.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.Proto2MessageOptionalIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified) 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.Proto2MessageOptionalIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.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.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.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 build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg 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 .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MessageOptionalIgnoreUnspecified 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.Proto2MessageOptionalIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index b2cb8023..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageOptionalIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MessageOptionalIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto2MessageOptionalIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefault.java deleted file mode 100644 index dcb72881..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefault.java +++ /dev/null @@ -1,1107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault} - */ -public final class Proto2MessageRequiredIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault) - Proto2MessageRequiredIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MessageRequiredIgnoreDefault.class.getName()); - } - // Use Proto2MessageRequiredIgnoreDefault.newBuilder() to construct. - private Proto2MessageRequiredIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MessageRequiredIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto2MessageRequiredIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg) 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.Proto2MessageRequiredIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg 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.Proto2MessageRequiredIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg) - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2MessageRequiredIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto2MessageRequiredIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val_; - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.Proto2MessageRequiredIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault) 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.Proto2MessageRequiredIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault) - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.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.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg 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; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MessageRequiredIgnoreDefault 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.Proto2MessageRequiredIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefaultOrBuilder.java deleted file mode 100644 index a625bee4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MessageRequiredIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg getVal(); - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmpty.java deleted file mode 100644 index aec1a37e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmpty.java +++ /dev/null @@ -1,1107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty} - */ -public final class Proto2MessageRequiredIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty) - Proto2MessageRequiredIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MessageRequiredIgnoreEmpty.class.getName()); - } - // Use Proto2MessageRequiredIgnoreEmpty.newBuilder() to construct. - private Proto2MessageRequiredIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MessageRequiredIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto2MessageRequiredIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg) 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.Proto2MessageRequiredIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2MessageRequiredIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto2MessageRequiredIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val_; - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.Proto2MessageRequiredIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty) 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.Proto2MessageRequiredIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.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.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg 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; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MessageRequiredIgnoreEmpty 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.Proto2MessageRequiredIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmptyOrBuilder.java deleted file mode 100644 index 36d02da6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MessageRequiredIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg getVal(); - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecified.java deleted file mode 100644 index be119f43..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecified.java +++ /dev/null @@ -1,1107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified} - */ -public final class Proto2MessageRequiredIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified) - Proto2MessageRequiredIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2MessageRequiredIgnoreUnspecified.class.getName()); - } - // Use Proto2MessageRequiredIgnoreUnspecified.newBuilder() to construct. - private Proto2MessageRequiredIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2MessageRequiredIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto2MessageRequiredIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg) 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.Proto2MessageRequiredIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2MessageRequiredIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto2MessageRequiredIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val_; - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.Proto2MessageRequiredIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified) 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.Proto2MessageRequiredIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.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.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2MessageRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg 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; - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2MessageRequiredIgnoreUnspecified 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.Proto2MessageRequiredIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 9f51ea22..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2MessageRequiredIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2MessageRequiredIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg getVal(); - /** - * required .buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto2MessageRequiredIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefault.java deleted file mode 100644 index a350c17b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2OneofIgnoreDefault} - */ -public final class Proto2OneofIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2OneofIgnoreDefault) - Proto2OneofIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2OneofIgnoreDefault.class.getName()); - } - // Use Proto2OneofIgnoreDefault.newBuilder() to construct. - private Proto2OneofIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2OneofIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto2OneofIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2OneofIgnoreDefault) - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2OneofIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2OneofIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2OneofIgnoreDefault 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.Proto2OneofIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultOrBuilder.java deleted file mode 100644 index 90d33052..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2OneofIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2OneofIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefault.java deleted file mode 100644 index 6cb61467..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault} - */ -public final class Proto2OneofIgnoreDefaultWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) - Proto2OneofIgnoreDefaultWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2OneofIgnoreDefaultWithDefault.class.getName()); - } - // Use Proto2OneofIgnoreDefaultWithDefault.newBuilder() to construct. - private Proto2OneofIgnoreDefaultWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2OneofIgnoreDefaultWithDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto2OneofIgnoreDefaultWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault other = (build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault build() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault result = new build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) - private static final build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2OneofIgnoreDefaultWithDefault 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.Proto2OneofIgnoreDefaultWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefaultOrBuilder.java deleted file mode 100644 index 7ab07921..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreDefaultWithDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2OneofIgnoreDefaultWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto2OneofIgnoreDefaultWithDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmpty.java deleted file mode 100644 index f867de83..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmpty.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2OneofIgnoreEmpty} - */ -public final class Proto2OneofIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) - Proto2OneofIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2OneofIgnoreEmpty.class.getName()); - } - // Use Proto2OneofIgnoreEmpty.newBuilder() to construct. - private Proto2OneofIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2OneofIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto2OneofIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2OneofIgnoreEmpty 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.Proto2OneofIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyOrBuilder.java deleted file mode 100644 index b80b515a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2OneofIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2OneofIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmpty.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefault.java deleted file mode 100644 index aa58ddb5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault} - */ -public final class Proto2OneofIgnoreEmptyWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) - Proto2OneofIgnoreEmptyWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2OneofIgnoreEmptyWithDefault.class.getName()); - } - // Use Proto2OneofIgnoreEmptyWithDefault.newBuilder() to construct. - private Proto2OneofIgnoreEmptyWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2OneofIgnoreEmptyWithDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto2OneofIgnoreEmptyWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault other = (build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault build() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault result = new build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) - private static final build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2OneofIgnoreEmptyWithDefault 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.Proto2OneofIgnoreEmptyWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefaultOrBuilder.java deleted file mode 100644 index 9a2d3ec7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreEmptyWithDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2OneofIgnoreEmptyWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto2OneofIgnoreEmptyWithDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecified.java deleted file mode 100644 index 702ab14f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecified.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified} - */ -public final class Proto2OneofIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) - Proto2OneofIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2OneofIgnoreUnspecified.class.getName()); - } - // Use Proto2OneofIgnoreUnspecified.newBuilder() to construct. - private Proto2OneofIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2OneofIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto2OneofIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2OneofIgnoreUnspecified 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.Proto2OneofIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 9be0afb5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2OneofIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecified.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefault.java deleted file mode 100644 index 1f383fa0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault} - */ -public final class Proto2OneofIgnoreUnspecifiedWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) - Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2OneofIgnoreUnspecifiedWithDefault.class.getName()); - } - // Use Proto2OneofIgnoreUnspecifiedWithDefault.newBuilder() to construct. - private Proto2OneofIgnoreUnspecifiedWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2OneofIgnoreUnspecifiedWithDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto2OneofIgnoreUnspecifiedWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault other = (build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2OneofIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault build() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault result = new build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return -42; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) - private static final build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2OneofIgnoreUnspecifiedWithDefault 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.Proto2OneofIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder.java deleted file mode 100644 index 6473c02c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2OneofIgnoreUnspecifiedWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto2OneofIgnoreUnspecifiedWithDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefault.java deleted file mode 100644 index 17c9e8b4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefault.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault} - */ -public final class Proto2RepeatedIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) - Proto2RepeatedIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2RepeatedIgnoreDefault.class.getName()); - } - // Use Proto2RepeatedIgnoreDefault.newBuilder() to construct. - private Proto2RepeatedIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2RepeatedIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.Proto2RepeatedIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) 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.Proto2RepeatedIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2RepeatedIgnoreDefault 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.Proto2RepeatedIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefaultOrBuilder.java deleted file mode 100644 index 593c9f02..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2RepeatedIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2RepeatedIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmpty.java deleted file mode 100644 index 830d9668..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmpty.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty} - */ -public final class Proto2RepeatedIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) - Proto2RepeatedIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2RepeatedIgnoreEmpty.class.getName()); - } - // Use Proto2RepeatedIgnoreEmpty.newBuilder() to construct. - private Proto2RepeatedIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2RepeatedIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.Proto2RepeatedIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) 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.Proto2RepeatedIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2RepeatedIgnoreEmpty 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.Proto2RepeatedIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmptyOrBuilder.java deleted file mode 100644 index cce512a0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2RepeatedIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2RepeatedIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecified.java deleted file mode 100644 index a8b4461d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecified.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified} - */ -public final class Proto2RepeatedIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) - Proto2RepeatedIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2RepeatedIgnoreUnspecified.class.getName()); - } - // Use Proto2RepeatedIgnoreUnspecified.newBuilder() to construct. - private Proto2RepeatedIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2RepeatedIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.Proto2RepeatedIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) 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.Proto2RepeatedIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2RepeatedIgnoreUnspecified 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.Proto2RepeatedIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 0c318f2c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2RepeatedIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2RepeatedIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefault.java deleted file mode 100644 index e0417556..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefault.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault} - */ -public final class Proto2RepeatedItemIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) - Proto2RepeatedItemIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2RepeatedItemIgnoreDefault.class.getName()); - } - // Use Proto2RepeatedItemIgnoreDefault.newBuilder() to construct. - private Proto2RepeatedItemIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2RepeatedItemIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.Proto2RepeatedItemIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) 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.Proto2RepeatedItemIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2RepeatedItemIgnoreDefault 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.Proto2RepeatedItemIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefaultOrBuilder.java deleted file mode 100644 index 3fef69ad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2RepeatedItemIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmpty.java deleted file mode 100644 index f53dc16f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmpty.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty} - */ -public final class Proto2RepeatedItemIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) - Proto2RepeatedItemIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2RepeatedItemIgnoreEmpty.class.getName()); - } - // Use Proto2RepeatedItemIgnoreEmpty.newBuilder() to construct. - private Proto2RepeatedItemIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2RepeatedItemIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.Proto2RepeatedItemIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) 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.Proto2RepeatedItemIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2RepeatedItemIgnoreEmpty 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.Proto2RepeatedItemIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmptyOrBuilder.java deleted file mode 100644 index cd9ff54a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2RepeatedItemIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecified.java deleted file mode 100644 index 277049ab..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecified.java +++ /dev/null @@ -1,529 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified} - */ -public final class Proto2RepeatedItemIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) - Proto2RepeatedItemIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2RepeatedItemIgnoreUnspecified.class.getName()); - } - // Use Proto2RepeatedItemIgnoreUnspecified.newBuilder() to construct. - private Proto2RepeatedItemIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2RepeatedItemIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(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.writeInt32(1, val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.Proto2RepeatedItemIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) 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.Proto2RepeatedItemIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2RepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2RepeatedItemIgnoreUnspecified 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.Proto2RepeatedItemIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 75070eb0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2RepeatedItemIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2RepeatedItemIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2RepeatedItemIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefault.java deleted file mode 100644 index 07f9ef46..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefault.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault} - */ -public final class Proto2ScalarOptionalIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault) - Proto2ScalarOptionalIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarOptionalIgnoreDefault.class.getName()); - } - // Use Proto2ScalarOptionalIgnoreDefault.newBuilder() to construct. - private Proto2ScalarOptionalIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarOptionalIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarOptionalIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault) - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarOptionalIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarOptionalIgnoreDefault 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.Proto2ScalarOptionalIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultOrBuilder.java deleted file mode 100644 index 464d40df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarOptionalIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefault.java deleted file mode 100644 index c56ec96b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault} - */ -public final class Proto2ScalarOptionalIgnoreDefaultWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault) - Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarOptionalIgnoreDefaultWithDefault.class.getName()); - } - // Use Proto2ScalarOptionalIgnoreDefaultWithDefault.newBuilder() to construct. - private Proto2ScalarOptionalIgnoreDefaultWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarOptionalIgnoreDefaultWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarOptionalIgnoreDefaultWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault other = (build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault) - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault result = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarOptionalIgnoreDefaultWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarOptionalIgnoreDefaultWithDefault 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.Proto2ScalarOptionalIgnoreDefaultWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder.java deleted file mode 100644 index 32972ea2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarOptionalIgnoreDefaultWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreDefaultWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmpty.java deleted file mode 100644 index d0e4c788..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmpty.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty} - */ -public final class Proto2ScalarOptionalIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty) - Proto2ScalarOptionalIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarOptionalIgnoreEmpty.class.getName()); - } - // Use Proto2ScalarOptionalIgnoreEmpty.newBuilder() to construct. - private Proto2ScalarOptionalIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarOptionalIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarOptionalIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarOptionalIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarOptionalIgnoreEmpty 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.Proto2ScalarOptionalIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyOrBuilder.java deleted file mode 100644 index 4650f08a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarOptionalIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefault.java deleted file mode 100644 index 54a18e03..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault} - */ -public final class Proto2ScalarOptionalIgnoreEmptyWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault) - Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarOptionalIgnoreEmptyWithDefault.class.getName()); - } - // Use Proto2ScalarOptionalIgnoreEmptyWithDefault.newBuilder() to construct. - private Proto2ScalarOptionalIgnoreEmptyWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarOptionalIgnoreEmptyWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarOptionalIgnoreEmptyWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault other = (build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault) - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault result = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarOptionalIgnoreEmptyWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarOptionalIgnoreEmptyWithDefault 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.Proto2ScalarOptionalIgnoreEmptyWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder.java deleted file mode 100644 index b0f7fdd1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarOptionalIgnoreEmptyWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreEmptyWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecified.java deleted file mode 100644 index f86e14fb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecified.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified} - */ -public final class Proto2ScalarOptionalIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified) - Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarOptionalIgnoreUnspecified.class.getName()); - } - // Use Proto2ScalarOptionalIgnoreUnspecified.newBuilder() to construct. - private Proto2ScalarOptionalIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarOptionalIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarOptionalIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarOptionalIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarOptionalIgnoreUnspecified 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.Proto2ScalarOptionalIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index cb2fe8f0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarOptionalIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.java deleted file mode 100644 index 51d711d5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.java +++ /dev/null @@ -1,457 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault} - */ -public final class Proto2ScalarOptionalIgnoreUnspecifiedWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) - Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.class.getName()); - } - // Use Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.newBuilder() to construct. - private Proto2ScalarOptionalIgnoreUnspecifiedWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarOptionalIgnoreUnspecifiedWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault other = (build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarOptionalIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault result = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarOptionalIgnoreUnspecifiedWithDefault 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.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder.java deleted file mode 100644 index 4562cc69..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarOptionalIgnoreUnspecifiedWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarOptionalIgnoreUnspecifiedWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefault.java deleted file mode 100644 index a36e28c0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefault.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault} - */ -public final class Proto2ScalarRequiredIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault) - Proto2ScalarRequiredIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarRequiredIgnoreDefault.class.getName()); - } - // Use Proto2ScalarRequiredIgnoreDefault.newBuilder() to construct. - private Proto2ScalarRequiredIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarRequiredIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarRequiredIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault other = (build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault) - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault result = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarRequiredIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarRequiredIgnoreDefault 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.Proto2ScalarRequiredIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultOrBuilder.java deleted file mode 100644 index 4d10caf6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarRequiredIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefault.java deleted file mode 100644 index 9cd14a4c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault} - */ -public final class Proto2ScalarRequiredIgnoreDefaultWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault) - Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarRequiredIgnoreDefaultWithDefault.class.getName()); - } - // Use Proto2ScalarRequiredIgnoreDefaultWithDefault.newBuilder() to construct. - private Proto2ScalarRequiredIgnoreDefaultWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarRequiredIgnoreDefaultWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarRequiredIgnoreDefaultWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault other = (build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault) - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreDefaultWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault result = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarRequiredIgnoreDefaultWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarRequiredIgnoreDefaultWithDefault 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.Proto2ScalarRequiredIgnoreDefaultWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder.java deleted file mode 100644 index d170482a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarRequiredIgnoreDefaultWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreDefaultWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmpty.java deleted file mode 100644 index ac460cf0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmpty.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty} - */ -public final class Proto2ScalarRequiredIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty) - Proto2ScalarRequiredIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarRequiredIgnoreEmpty.class.getName()); - } - // Use Proto2ScalarRequiredIgnoreEmpty.newBuilder() to construct. - private Proto2ScalarRequiredIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarRequiredIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarRequiredIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty) - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarRequiredIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarRequiredIgnoreEmpty 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.Proto2ScalarRequiredIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyOrBuilder.java deleted file mode 100644 index 60be6760..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarRequiredIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefault.java deleted file mode 100644 index 4d541581..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault} - */ -public final class Proto2ScalarRequiredIgnoreEmptyWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault) - Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarRequiredIgnoreEmptyWithDefault.class.getName()); - } - // Use Proto2ScalarRequiredIgnoreEmptyWithDefault.newBuilder() to construct. - private Proto2ScalarRequiredIgnoreEmptyWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarRequiredIgnoreEmptyWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarRequiredIgnoreEmptyWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault other = (build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault) - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreEmptyWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault result = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarRequiredIgnoreEmptyWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarRequiredIgnoreEmptyWithDefault 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.Proto2ScalarRequiredIgnoreEmptyWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder.java deleted file mode 100644 index 437469eb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarRequiredIgnoreEmptyWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreEmptyWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecified.java deleted file mode 100644 index 54137100..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecified.java +++ /dev/null @@ -1,463 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified} - */ -public final class Proto2ScalarRequiredIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified) - Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarRequiredIgnoreUnspecified.class.getName()); - } - // Use Proto2ScalarRequiredIgnoreUnspecified.newBuilder() to construct. - private Proto2ScalarRequiredIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarRequiredIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarRequiredIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarRequiredIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * required int32 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); - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarRequiredIgnoreUnspecified 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.Proto2ScalarRequiredIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 5af20cc0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarRequiredIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.java deleted file mode 100644 index bb1bd85f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.java +++ /dev/null @@ -1,464 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault} - */ -public final class Proto2ScalarRequiredIgnoreUnspecifiedWithDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) - Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.class.getName()); - } - // Use Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.newBuilder() to construct. - private Proto2ScalarRequiredIgnoreUnspecifiedWithDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto2ScalarRequiredIgnoreUnspecifiedWithDefault() { - val_ = -42; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = -42; - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault other = (build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.class, build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = -42; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto2Proto.internal_static_buf_validate_conformance_cases_Proto2ScalarRequiredIgnoreUnspecifiedWithDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault build() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault buildPartial() { - build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault result = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault other) { - if (other == build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ = -42; - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = -42; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) - private static final build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault(); - } - - public static build.buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto2ScalarRequiredIgnoreUnspecifiedWithDefault 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.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java deleted file mode 100644 index dad9ef81..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto2ScalarRequiredIgnoreUnspecifiedWithDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto2ScalarRequiredIgnoreUnspecifiedWithDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required int32 val = 1 [default = -42, json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefault.java deleted file mode 100644 index 924113e4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapIgnoreDefault} - */ -public final class Proto3MapIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapIgnoreDefault) - Proto3MapIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapIgnoreDefault.class.getName()); - } - // Use Proto3MapIgnoreDefault.newBuilder() to construct. - private Proto3MapIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3MapIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapIgnoreDefault) - build.buf.validate.conformance.cases.Proto3MapIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3MapIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3MapIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3MapIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3MapIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3MapIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapIgnoreDefault 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.Proto3MapIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefaultOrBuilder.java deleted file mode 100644 index 6ced6f27..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmpty.java deleted file mode 100644 index 69695756..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapIgnoreEmpty} - */ -public final class Proto3MapIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapIgnoreEmpty) - Proto3MapIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapIgnoreEmpty.class.getName()); - } - // Use Proto3MapIgnoreEmpty.newBuilder() to construct. - private Proto3MapIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3MapIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapIgnoreEmpty 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.Proto3MapIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmptyOrBuilder.java deleted file mode 100644 index 08c5e665..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecified.java deleted file mode 100644 index 006f2eb5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapIgnoreUnspecified} - */ -public final class Proto3MapIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) - Proto3MapIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapIgnoreUnspecified.class.getName()); - } - // Use Proto3MapIgnoreUnspecified.newBuilder() to construct. - private Proto3MapIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3MapIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapIgnoreUnspecified 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.Proto3MapIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 49bdb630..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefault.java deleted file mode 100644 index ccb3a136..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault} - */ -public final class Proto3MapKeyIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) - Proto3MapKeyIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapKeyIgnoreDefault.class.getName()); - } - // Use Proto3MapKeyIgnoreDefault.newBuilder() to construct. - private Proto3MapKeyIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapKeyIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapKeyIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapKeyIgnoreDefault 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.Proto3MapKeyIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefaultOrBuilder.java deleted file mode 100644 index fb669ed7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapKeyIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapKeyIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmpty.java deleted file mode 100644 index 508f39a1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty} - */ -public final class Proto3MapKeyIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) - Proto3MapKeyIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapKeyIgnoreEmpty.class.getName()); - } - // Use Proto3MapKeyIgnoreEmpty.newBuilder() to construct. - private Proto3MapKeyIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapKeyIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapKeyIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapKeyIgnoreEmpty 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.Proto3MapKeyIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmptyOrBuilder.java deleted file mode 100644 index d9936eeb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapKeyIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapKeyIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecified.java deleted file mode 100644 index c282504d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified} - */ -public final class Proto3MapKeyIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) - Proto3MapKeyIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapKeyIgnoreUnspecified.class.getName()); - } - // Use Proto3MapKeyIgnoreUnspecified.newBuilder() to construct. - private Proto3MapKeyIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapKeyIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapKeyIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapKeyIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapKeyIgnoreUnspecified 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.Proto3MapKeyIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 902ebaff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapKeyIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapKeyIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapKeyIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefault.java deleted file mode 100644 index f82eefca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefault.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapValueIgnoreDefault} - */ -public final class Proto3MapValueIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) - Proto3MapValueIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapValueIgnoreDefault.class.getName()); - } - // Use Proto3MapValueIgnoreDefault.newBuilder() to construct. - private Proto3MapValueIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapValueIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapValueIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) - build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapValueIgnoreDefault 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.Proto3MapValueIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefaultOrBuilder.java deleted file mode 100644 index a4a24231..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapValueIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapValueIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmpty.java deleted file mode 100644 index 554125af..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmpty.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty} - */ -public final class Proto3MapValueIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) - Proto3MapValueIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapValueIgnoreEmpty.class.getName()); - } - // Use Proto3MapValueIgnoreEmpty.newBuilder() to construct. - private Proto3MapValueIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapValueIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapValueIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapValueIgnoreEmpty 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.Proto3MapValueIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmptyOrBuilder.java deleted file mode 100644 index 613fc2a4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapValueIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapValueIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecified.java deleted file mode 100644 index 0a3124ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecified.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified} - */ -public final class Proto3MapValueIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) - Proto3MapValueIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MapValueIgnoreUnspecified.class.getName()); - } - // Use Proto3MapValueIgnoreUnspecified.newBuilder() to construct. - private Proto3MapValueIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MapValueIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeIntegerMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.Proto3MapValueIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MapValueIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.Integer, java.lang.Integer> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - int key) { - - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrDefault( - int key, - int defaultValue) { - - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValOrThrow( - int key) { - - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - int key) { - - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - int key, - int value) { - - - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MapValueIgnoreUnspecified 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.Proto3MapValueIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 3d90859d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MapValueIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MapValueIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MapValueIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - int key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrDefault( - int key, - int defaultValue); - /** - * map<int32, int32> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValOrThrow( - int key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefault.java deleted file mode 100644 index 60554af4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefault.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageIgnoreDefault} - */ -public final class Proto3MessageIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageIgnoreDefault) - Proto3MessageIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MessageIgnoreDefault.class.getName()); - } - // Use Proto3MessageIgnoreDefault.newBuilder() to construct. - private Proto3MessageIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MessageIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto3MessageIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg) 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.Proto3MessageIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg 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.Proto3MessageIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg) - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3MessageIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto3MessageIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val_; - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.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.Proto3MessageIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault) 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.Proto3MessageIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageIgnoreDefault) - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.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.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.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 build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg 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; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MessageIgnoreDefault 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.Proto3MessageIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefaultOrBuilder.java deleted file mode 100644 index 37121514..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MessageIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg getVal(); - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto3MessageIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmpty.java deleted file mode 100644 index 958ce00c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmpty.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageIgnoreEmpty} - */ -public final class Proto3MessageIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty) - Proto3MessageIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MessageIgnoreEmpty.class.getName()); - } - // Use Proto3MessageIgnoreEmpty.newBuilder() to construct. - private Proto3MessageIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MessageIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto3MessageIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg) 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.Proto3MessageIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg 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.Proto3MessageIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3MessageIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto3MessageIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val_; - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.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.Proto3MessageIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty) 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.Proto3MessageIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.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.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.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 build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg 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; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MessageIgnoreEmpty 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.Proto3MessageIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmptyOrBuilder.java deleted file mode 100644 index 3cb413ca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MessageIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg getVal(); - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto3MessageIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecified.java deleted file mode 100644 index c2acb4a6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecified.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified} - */ -public final class Proto3MessageIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified) - Proto3MessageIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MessageIgnoreUnspecified.class.getName()); - } - // Use Proto3MessageIgnoreUnspecified.newBuilder() to construct. - private Proto3MessageIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MessageIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto3MessageIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg) 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.Proto3MessageIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg 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.Proto3MessageIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3MessageIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto3MessageIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val_; - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.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.Proto3MessageIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified) 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.Proto3MessageIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.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.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.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 build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg 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; - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MessageIgnoreUnspecified 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.Proto3MessageIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index b325fe51..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MessageIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg getVal(); - /** - * .buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto3MessageIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefault.java deleted file mode 100644 index 503e3832..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefault.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault} - */ -public final class Proto3MessageOptionalIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault) - Proto3MessageOptionalIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MessageOptionalIgnoreDefault.class.getName()); - } - // Use Proto3MessageOptionalIgnoreDefault.newBuilder() to construct. - private Proto3MessageOptionalIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MessageOptionalIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto3MessageOptionalIgnoreDefault.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg other = (build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg) 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.Proto3MessageOptionalIgnoreDefault.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg 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.Proto3MessageOptionalIgnoreDefault.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg) - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg build() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg result = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3MessageOptionalIgnoreDefault.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg) - private static final build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto3MessageOptionalIgnoreDefault.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val_; - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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 .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.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.Proto3MessageOptionalIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault) 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.Proto3MessageOptionalIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault) - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.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.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.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 build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg 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 .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MessageOptionalIgnoreDefault 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.Proto3MessageOptionalIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefaultOrBuilder.java deleted file mode 100644 index ed5c64d9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MessageOptionalIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreDefault.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmpty.java deleted file mode 100644 index a2c93104..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmpty.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty} - */ -public final class Proto3MessageOptionalIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty) - Proto3MessageOptionalIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MessageOptionalIgnoreEmpty.class.getName()); - } - // Use Proto3MessageOptionalIgnoreEmpty.newBuilder() to construct. - private Proto3MessageOptionalIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MessageOptionalIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto3MessageOptionalIgnoreEmpty.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg other = (build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg) 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.Proto3MessageOptionalIgnoreEmpty.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg) - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg build() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg result = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3MessageOptionalIgnoreEmpty.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg) - private static final build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto3MessageOptionalIgnoreEmpty.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val_; - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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 .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.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.Proto3MessageOptionalIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty) 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.Proto3MessageOptionalIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.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.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.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 build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg 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 .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MessageOptionalIgnoreEmpty 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.Proto3MessageOptionalIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmptyOrBuilder.java deleted file mode 100644 index 8d45a35f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MessageOptionalIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreEmpty.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecified.java deleted file mode 100644 index 57f8e7a9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecified.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified} - */ -public final class Proto3MessageOptionalIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified) - Proto3MessageOptionalIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3MessageOptionalIgnoreUnspecified.class.getName()); - } - // Use Proto3MessageOptionalIgnoreUnspecified.newBuilder() to construct. - private Proto3MessageOptionalIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3MessageOptionalIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.Proto3MessageOptionalIgnoreUnspecified.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg other = (build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg) 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.Proto3MessageOptionalIgnoreUnspecified.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg) - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg build() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg result = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3MessageOptionalIgnoreUnspecified.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg) - private static final build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.Proto3MessageOptionalIgnoreUnspecified.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val_; - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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 .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.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.Proto3MessageOptionalIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified) 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.Proto3MessageOptionalIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.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.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3MessageOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.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 build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg 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 .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg.Builder, build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3MessageOptionalIgnoreUnspecified 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.Proto3MessageOptionalIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index c5fef495..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3MessageOptionalIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3MessageOptionalIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Proto3MessageOptionalIgnoreUnspecified.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefault.java deleted file mode 100644 index 60306449..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3OneofIgnoreDefault} - */ -public final class Proto3OneofIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3OneofIgnoreDefault) - Proto3OneofIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3OneofIgnoreDefault.class.getName()); - } - // Use Proto3OneofIgnoreDefault.newBuilder() to construct. - private Proto3OneofIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3OneofIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto3OneofIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3OneofIgnoreDefault) - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3OneofIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3OneofIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3OneofIgnoreDefault 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.Proto3OneofIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefaultOrBuilder.java deleted file mode 100644 index 465245d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3OneofIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3OneofIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto3OneofIgnoreDefault.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmpty.java deleted file mode 100644 index e2f34880..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmpty.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3OneofIgnoreEmpty} - */ -public final class Proto3OneofIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) - Proto3OneofIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3OneofIgnoreEmpty.class.getName()); - } - // Use Proto3OneofIgnoreEmpty.newBuilder() to construct. - private Proto3OneofIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3OneofIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto3OneofIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3OneofIgnoreEmpty 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.Proto3OneofIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmptyOrBuilder.java deleted file mode 100644 index c3e4de84..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3OneofIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3OneofIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto3OneofIgnoreEmpty.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecified.java deleted file mode 100644 index 198e1559..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecified.java +++ /dev/null @@ -1,531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified} - */ -public final class Proto3OneofIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) - Proto3OneofIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3OneofIgnoreUnspecified.class.getName()); - } - // Use Proto3OneofIgnoreUnspecified.newBuilder() to construct. - private Proto3OneofIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3OneofIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.Builder.class); - } - - private int oCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object o_; - public enum OCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VAL(1), - O_NOT_SET(0); - private final int value; - private OCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OCase valueOf(int value) { - return forNumber(value); - } - - public static OCase forNumber(int value) { - switch (value) { - case 1: return VAL; - case 0: return O_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public static final int VAL_FIELD_NUMBER = 1; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - - 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 (oCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) o_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) o_)); - } - 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.Proto3OneofIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) obj; - - if (!getOCase().equals(other.getOCase())) return false; - switch (oCase_) { - case 1: - if (getVal() - != other.getVal()) return false; - break; - case 0: - default: - } - 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(); - switch (oCase_) { - case 1: - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - oCase_ = 0; - o_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3OneofIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified result) { - result.oCase_ = oCase_; - result.o_ = this.o_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.getDefaultInstance()) return this; - switch (other.getOCase()) { - case VAL: { - setVal(other.getVal()); - break; - } - case O_NOT_SET: { - break; - } - } - 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 8: { - o_ = input.readInt32(); - oCase_ = 1; - break; - } // case 8 - 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 oCase_ = 0; - private java.lang.Object o_; - public OCase - getOCase() { - return OCase.forNumber( - oCase_); - } - - public Builder clearO() { - oCase_ = 0; - o_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return oCase_ == 1; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public int getVal() { - if (oCase_ == 1) { - return (java.lang.Integer) o_; - } - return 0; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - oCase_ = 1; - o_ = value; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - if (oCase_ == 1) { - oCase_ = 0; - o_ = null; - onChanged(); - } - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3OneofIgnoreUnspecified 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.Proto3OneofIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 87e681b5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3OneofIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3OneofIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); - - build.buf.validate.conformance.cases.Proto3OneofIgnoreUnspecified.OCase getOCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefault.java deleted file mode 100644 index eaa4b68c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefault.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault} - */ -public final class Proto3RepeatedIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) - Proto3RepeatedIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3RepeatedIgnoreDefault.class.getName()); - } - // Use Proto3RepeatedIgnoreDefault.newBuilder() to construct. - private Proto3RepeatedIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3RepeatedIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.Proto3RepeatedIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) 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.Proto3RepeatedIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3RepeatedIgnoreDefault 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.Proto3RepeatedIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefaultOrBuilder.java deleted file mode 100644 index 46e8c92d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3RepeatedIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3RepeatedIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmpty.java deleted file mode 100644 index 02084405..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmpty.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty} - */ -public final class Proto3RepeatedIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) - Proto3RepeatedIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3RepeatedIgnoreEmpty.class.getName()); - } - // Use Proto3RepeatedIgnoreEmpty.newBuilder() to construct. - private Proto3RepeatedIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3RepeatedIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.Proto3RepeatedIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) 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.Proto3RepeatedIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3RepeatedIgnoreEmpty 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.Proto3RepeatedIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmptyOrBuilder.java deleted file mode 100644 index d1a3e33d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3RepeatedIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3RepeatedIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecified.java deleted file mode 100644 index efdad1e5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecified.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified} - */ -public final class Proto3RepeatedIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) - Proto3RepeatedIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3RepeatedIgnoreUnspecified.class.getName()); - } - // Use Proto3RepeatedIgnoreUnspecified.newBuilder() to construct. - private Proto3RepeatedIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3RepeatedIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.Proto3RepeatedIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) 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.Proto3RepeatedIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3RepeatedIgnoreUnspecified 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.Proto3RepeatedIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 00b84091..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3RepeatedIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3RepeatedIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefault.java deleted file mode 100644 index 3da49a32..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefault.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault} - */ -public final class Proto3RepeatedItemIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) - Proto3RepeatedItemIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3RepeatedItemIgnoreDefault.class.getName()); - } - // Use Proto3RepeatedItemIgnoreDefault.newBuilder() to construct. - private Proto3RepeatedItemIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3RepeatedItemIgnoreDefault() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.Proto3RepeatedItemIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) 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.Proto3RepeatedItemIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3RepeatedItemIgnoreDefault 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.Proto3RepeatedItemIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefaultOrBuilder.java deleted file mode 100644 index 94a10780..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3RepeatedItemIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmpty.java deleted file mode 100644 index d4d93a74..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmpty.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty} - */ -public final class Proto3RepeatedItemIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) - Proto3RepeatedItemIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3RepeatedItemIgnoreEmpty.class.getName()); - } - // Use Proto3RepeatedItemIgnoreEmpty.newBuilder() to construct. - private Proto3RepeatedItemIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3RepeatedItemIgnoreEmpty() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.Proto3RepeatedItemIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) 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.Proto3RepeatedItemIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3RepeatedItemIgnoreEmpty 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.Proto3RepeatedItemIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmptyOrBuilder.java deleted file mode 100644 index 865e3c84..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3RepeatedItemIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecified.java deleted file mode 100644 index b8ef019e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecified.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified} - */ -public final class Proto3RepeatedItemIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) - Proto3RepeatedItemIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3RepeatedItemIgnoreUnspecified.class.getName()); - } - // Use Proto3RepeatedItemIgnoreUnspecified.newBuilder() to construct. - private Proto3RepeatedItemIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3RepeatedItemIgnoreUnspecified() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.Proto3RepeatedItemIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) 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.Proto3RepeatedItemIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3RepeatedItemIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3RepeatedItemIgnoreUnspecified 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.Proto3RepeatedItemIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index 4d9da049..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3RepeatedItemIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3RepeatedItemIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3RepeatedItemIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefault.java deleted file mode 100644 index 3cb7b208..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefault.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3ScalarIgnoreDefault} - */ -public final class Proto3ScalarIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) - Proto3ScalarIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3ScalarIgnoreDefault.class.getName()); - } - // Use Proto3ScalarIgnoreDefault.newBuilder() to construct. - private Proto3ScalarIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3ScalarIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Proto3ScalarIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) - build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3ScalarIgnoreDefault 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.Proto3ScalarIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefaultOrBuilder.java deleted file mode 100644 index 67c60da5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3ScalarIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3ScalarIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmpty.java deleted file mode 100644 index 0b70f060..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmpty.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty} - */ -public final class Proto3ScalarIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) - Proto3ScalarIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3ScalarIgnoreEmpty.class.getName()); - } - // Use Proto3ScalarIgnoreEmpty.newBuilder() to construct. - private Proto3ScalarIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3ScalarIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Proto3ScalarIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3ScalarIgnoreEmpty 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.Proto3ScalarIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmptyOrBuilder.java deleted file mode 100644 index 9a12c09e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3ScalarIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3ScalarIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecified.java deleted file mode 100644 index 9f1eb8b7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecified.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified} - */ -public final class Proto3ScalarIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) - Proto3ScalarIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3ScalarIgnoreUnspecified.class.getName()); - } - // Use Proto3ScalarIgnoreUnspecified.newBuilder() to construct. - private Proto3ScalarIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3ScalarIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, val_); - } - 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.Proto3ScalarIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3ScalarIgnoreUnspecified 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.Proto3ScalarIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index be9f69b1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3ScalarIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3ScalarIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefault.java deleted file mode 100644 index c965a305..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefault.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault} - */ -public final class Proto3ScalarOptionalIgnoreDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault) - Proto3ScalarOptionalIgnoreDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3ScalarOptionalIgnoreDefault.class.getName()); - } - // Use Proto3ScalarOptionalIgnoreDefault.newBuilder() to construct. - private Proto3ScalarOptionalIgnoreDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3ScalarOptionalIgnoreDefault() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto3ScalarOptionalIgnoreDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault other = (build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault) - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.class, build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault build() { - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault buildPartial() { - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault result = new build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3ScalarOptionalIgnoreDefault) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault other) { - if (other == build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault) - private static final build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault(); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3ScalarOptionalIgnoreDefault 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.Proto3ScalarOptionalIgnoreDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefaultOrBuilder.java deleted file mode 100644 index 0dce3439..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreDefaultOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3ScalarOptionalIgnoreDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmpty.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmpty.java deleted file mode 100644 index 9eec3eb8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmpty.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty} - */ -public final class Proto3ScalarOptionalIgnoreEmpty extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty) - Proto3ScalarOptionalIgnoreEmptyOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3ScalarOptionalIgnoreEmpty.class.getName()); - } - // Use Proto3ScalarOptionalIgnoreEmpty.newBuilder() to construct. - private Proto3ScalarOptionalIgnoreEmpty(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3ScalarOptionalIgnoreEmpty() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto3ScalarOptionalIgnoreEmpty)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty other = (build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty) - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.class, build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreEmpty_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty build() { - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty buildPartial() { - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty result = new build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3ScalarOptionalIgnoreEmpty) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty other) { - if (other == build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty) - private static final build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty(); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3ScalarOptionalIgnoreEmpty 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.Proto3ScalarOptionalIgnoreEmpty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmptyOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmptyOrBuilder.java deleted file mode 100644 index 9ae1ba00..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreEmptyOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3ScalarOptionalIgnoreEmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreEmpty) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecified.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecified.java deleted file mode 100644 index e1015637..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecified.java +++ /dev/null @@ -1,456 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified} - */ -public final class Proto3ScalarOptionalIgnoreUnspecified extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified) - Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Proto3ScalarOptionalIgnoreUnspecified.class.getName()); - } - // Use Proto3ScalarOptionalIgnoreUnspecified.newBuilder() to construct. - private Proto3ScalarOptionalIgnoreUnspecified(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Proto3ScalarOptionalIgnoreUnspecified() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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.writeInt32(1, val_); - } - 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 - .computeInt32Size(1, val_); - } - 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.Proto3ScalarOptionalIgnoreUnspecified)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified other = (build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified) obj; - - if (hasVal() != other.hasVal()) return false; - if (hasVal()) { - if (getVal() - != 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(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified) - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.class, build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.IgnoreProto3Proto.internal_static_buf_validate_conformance_cases_Proto3ScalarOptionalIgnoreUnspecified_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified build() { - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified buildPartial() { - build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified result = new build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.Proto3ScalarOptionalIgnoreUnspecified) { - return mergeFrom((build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified other) { - if (other == build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified.getDefaultInstance()) return this; - if (other.hasVal()) { - setVal(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 8: { - val_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * optional int32 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 int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified) - private static final build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified(); - } - - public static build.buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proto3ScalarOptionalIgnoreUnspecified 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.Proto3ScalarOptionalIgnoreUnspecified getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder.java deleted file mode 100644 index da13ad20..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/ignore_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface Proto3ScalarOptionalIgnoreUnspecifiedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.Proto3ScalarOptionalIgnoreUnspecified) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional int32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyIn.java deleted file mode 100644 index 82369cfc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyIn.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedAnyIn} - */ -public final class RepeatedAnyIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedAnyIn) - RepeatedAnyInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedAnyIn.class.getName()); - } - // Use RepeatedAnyIn.newBuilder() to construct. - private RepeatedAnyIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedAnyIn() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedAnyIn.class, build.buf.validate.conformance.cases.RepeatedAnyIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Any getVal(int index) { - return val_.get(index); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder 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.RepeatedAnyIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedAnyIn other = (build.buf.validate.conformance.cases.RepeatedAnyIn) 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.RepeatedAnyIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedAnyIn 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.RepeatedAnyIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedAnyIn 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.RepeatedAnyIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedAnyIn 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.RepeatedAnyIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedAnyIn 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.RepeatedAnyIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedAnyIn 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.RepeatedAnyIn 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.RepeatedAnyIn 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.RepeatedAnyIn 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.RepeatedAnyIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedAnyIn) - build.buf.validate.conformance.cases.RepeatedAnyInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedAnyIn.class, build.buf.validate.conformance.cases.RepeatedAnyIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedAnyIn.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedAnyIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedAnyIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedAnyIn build() { - build.buf.validate.conformance.cases.RepeatedAnyIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedAnyIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedAnyIn result = new build.buf.validate.conformance.cases.RepeatedAnyIn(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedAnyIn 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.RepeatedAnyIn result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedAnyIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedAnyIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedAnyIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedAnyIn.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.Any m = - input.readMessage( - com.google.protobuf.Any.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.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valBuilder_; - - /** - * repeated .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, com.google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, com.google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any 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.Any 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.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.AnyOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedAnyIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedAnyIn) - private static final build.buf.validate.conformance.cases.RepeatedAnyIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedAnyIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedAnyIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedAnyIn 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.RepeatedAnyIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyInOrBuilder.java deleted file mode 100644 index 917d7d62..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyInOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedAnyInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedAnyIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValList(); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.Any getVal(int index); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.AnyOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotIn.java deleted file mode 100644 index 6c2b7ccd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotIn.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedAnyNotIn} - */ -public final class RepeatedAnyNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedAnyNotIn) - RepeatedAnyNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedAnyNotIn.class.getName()); - } - // Use RepeatedAnyNotIn.newBuilder() to construct. - private RepeatedAnyNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedAnyNotIn() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedAnyNotIn.class, build.buf.validate.conformance.cases.RepeatedAnyNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Any getVal(int index) { - return val_.get(index); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder 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.RepeatedAnyNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedAnyNotIn other = (build.buf.validate.conformance.cases.RepeatedAnyNotIn) 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.RepeatedAnyNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedAnyNotIn 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.RepeatedAnyNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedAnyNotIn 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.RepeatedAnyNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedAnyNotIn 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.RepeatedAnyNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedAnyNotIn 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.RepeatedAnyNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedAnyNotIn 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.RepeatedAnyNotIn 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.RepeatedAnyNotIn 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.RepeatedAnyNotIn 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.RepeatedAnyNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedAnyNotIn) - build.buf.validate.conformance.cases.RepeatedAnyNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedAnyNotIn.class, build.buf.validate.conformance.cases.RepeatedAnyNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedAnyNotIn.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedAnyNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedAnyNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedAnyNotIn build() { - build.buf.validate.conformance.cases.RepeatedAnyNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedAnyNotIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedAnyNotIn result = new build.buf.validate.conformance.cases.RepeatedAnyNotIn(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedAnyNotIn 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.RepeatedAnyNotIn result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedAnyNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedAnyNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedAnyNotIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedAnyNotIn.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.Any m = - input.readMessage( - com.google.protobuf.Any.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.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valBuilder_; - - /** - * repeated .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, com.google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal(com.google.protobuf.Any value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, com.google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any 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.Any 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.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.AnyOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Any 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.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Any.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedAnyNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedAnyNotIn) - private static final build.buf.validate.conformance.cases.RepeatedAnyNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedAnyNotIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedAnyNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedAnyNotIn 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.RepeatedAnyNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotInOrBuilder.java deleted file mode 100644 index 8d84c096..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedAnyNotInOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedAnyNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedAnyNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValList(); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.Any getVal(int index); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .google.protobuf.Any val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.AnyOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDuration.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDuration.java deleted file mode 100644 index 532f4dc4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDuration.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedDuration} - */ -public final class RepeatedDuration extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedDuration) - RepeatedDurationOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedDuration.class.getName()); - } - // Use RepeatedDuration.newBuilder() to construct. - private RepeatedDuration(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedDuration() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedDuration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedDuration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedDuration.class, build.buf.validate.conformance.cases.RepeatedDuration.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Duration getVal(int index) { - return val_.get(index); - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder 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.RepeatedDuration)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedDuration other = (build.buf.validate.conformance.cases.RepeatedDuration) 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.RepeatedDuration parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedDuration 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.RepeatedDuration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedDuration 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.RepeatedDuration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedDuration 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.RepeatedDuration parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedDuration 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.RepeatedDuration parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedDuration 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.RepeatedDuration 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.RepeatedDuration 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.RepeatedDuration 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.RepeatedDuration} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedDuration) - build.buf.validate.conformance.cases.RepeatedDurationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedDuration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedDuration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedDuration.class, build.buf.validate.conformance.cases.RepeatedDuration.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedDuration.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedDuration_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedDuration getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedDuration.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedDuration build() { - build.buf.validate.conformance.cases.RepeatedDuration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedDuration buildPartial() { - build.buf.validate.conformance.cases.RepeatedDuration result = new build.buf.validate.conformance.cases.RepeatedDuration(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedDuration 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.RepeatedDuration result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedDuration) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedDuration)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedDuration other) { - if (other == build.buf.validate.conformance.cases.RepeatedDuration.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.Duration m = - input.readMessage( - com.google.protobuf.Duration.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.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> valBuilder_; - - /** - * repeated .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, com.google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal(com.google.protobuf.Duration value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, com.google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Duration 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.Duration 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.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Duration 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.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - com.google.protobuf.Duration.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Duration.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, com.google.protobuf.Duration.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedDuration) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedDuration) - private static final build.buf.validate.conformance.cases.RepeatedDuration DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedDuration(); - } - - public static build.buf.validate.conformance.cases.RepeatedDuration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedDuration 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.RepeatedDuration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDurationOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDurationOrBuilder.java deleted file mode 100644 index b0991f82..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedDurationOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedDurationOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedDuration) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValList(); - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.Duration getVal(int index); - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .google.protobuf.Duration val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.DurationOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNone.java deleted file mode 100644 index bcc5e6ad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNone.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone} - */ -public final class RepeatedEmbedCrossPackageNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) - RepeatedEmbedCrossPackageNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEmbedCrossPackageNone.class.getName()); - } - // Use RepeatedEmbedCrossPackageNone.newBuilder() to construct. - private RepeatedEmbedCrossPackageNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEmbedCrossPackageNone() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.class, build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed getVal(int index) { - return val_.get(index); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.EmbedOrBuilder 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.RepeatedEmbedCrossPackageNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone other = (build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) 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.RepeatedEmbedCrossPackageNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) - build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.class, build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone build() { - build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone buildPartial() { - build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone result = new build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone other) { - if (other == build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.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: { - build.buf.validate.conformance.cases.other_package.Embed m = - input.readMessage( - build.buf.validate.conformance.cases.other_package.Embed.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< - build.buf.validate.conformance.cases.other_package.Embed, build.buf.validate.conformance.cases.other_package.Embed.Builder, build.buf.validate.conformance.cases.other_package.EmbedOrBuilder> valBuilder_; - - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public java.util.List getValList() { - if (valBuilder_ == null) { - return java.util.Collections.unmodifiableList(val_); - } else { - return valBuilder_.getMessageList(); - } - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.Embed getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.other_package.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.set(index, value); - onChanged(); - } else { - valBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.other_package.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal(build.buf.validate.conformance.cases.other_package.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.other_package.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(index, value); - onChanged(); - } else { - valBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal( - build.buf.validate.conformance.cases.other_package.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.other_package.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - 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 .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - if (valBuilder_ == null) { - val_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valBuilder_.clear(); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public Builder removeVal(int index) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.remove(index); - onChanged(); - } else { - valBuilder_.remove(index); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.Embed.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.EmbedOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public java.util.List - getValOrBuilderList() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(val_); - } - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.Embed.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.other_package.Embed.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.other_package.Embed, build.buf.validate.conformance.cases.other_package.Embed.Builder, build.buf.validate.conformance.cases.other_package.EmbedOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.other_package.Embed, build.buf.validate.conformance.cases.other_package.Embed.Builder, build.buf.validate.conformance.cases.other_package.EmbedOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) - private static final build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone(); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEmbedCrossPackageNone 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.RepeatedEmbedCrossPackageNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNoneOrBuilder.java deleted file mode 100644 index dfdd5db6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedCrossPackageNoneOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEmbedCrossPackageNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - java.util.List - getValList(); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.other_package.Embed getVal(int index); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.other_package.EmbedOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNone.java deleted file mode 100644 index b3e454b5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNone.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEmbedNone} - */ -public final class RepeatedEmbedNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEmbedNone) - RepeatedEmbedNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEmbedNone.class.getName()); - } - // Use RepeatedEmbedNone.newBuilder() to construct. - private RepeatedEmbedNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEmbedNone() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbedNone.class, build.buf.validate.conformance.cases.RepeatedEmbedNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Embed getVal(int index) { - return val_.get(index); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EmbedOrBuilder 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.RepeatedEmbedNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEmbedNone other = (build.buf.validate.conformance.cases.RepeatedEmbedNone) 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.RepeatedEmbedNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedNone 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.RepeatedEmbedNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedNone 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.RepeatedEmbedNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedNone 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.RepeatedEmbedNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedNone 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.RepeatedEmbedNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbedNone 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.RepeatedEmbedNone 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.RepeatedEmbedNone 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.RepeatedEmbedNone 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.RepeatedEmbedNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEmbedNone) - build.buf.validate.conformance.cases.RepeatedEmbedNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbedNone.class, build.buf.validate.conformance.cases.RepeatedEmbedNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEmbedNone.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEmbedNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedNone build() { - build.buf.validate.conformance.cases.RepeatedEmbedNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedNone buildPartial() { - build.buf.validate.conformance.cases.RepeatedEmbedNone result = new build.buf.validate.conformance.cases.RepeatedEmbedNone(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEmbedNone 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.RepeatedEmbedNone result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEmbedNone) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEmbedNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEmbedNone other) { - if (other == build.buf.validate.conformance.cases.RepeatedEmbedNone.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: { - build.buf.validate.conformance.cases.Embed m = - input.readMessage( - build.buf.validate.conformance.cases.Embed.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< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder> valBuilder_; - - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public java.util.List getValList() { - if (valBuilder_ == null) { - return java.util.Collections.unmodifiableList(val_); - } else { - return valBuilder_.getMessageList(); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.Embed getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.set(index, value); - onChanged(); - } else { - valBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal(build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(index, value); - onChanged(); - } else { - valBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal( - build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - if (valBuilder_ == null) { - val_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valBuilder_.clear(); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public Builder removeVal(int index) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.remove(index); - onChanged(); - } else { - valBuilder_.remove(index); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.Embed.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.EmbedOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public java.util.List - getValOrBuilderList() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(val_); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.Embed.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - build.buf.validate.conformance.cases.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public build.buf.validate.conformance.cases.Embed.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, build.buf.validate.conformance.cases.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEmbedNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEmbedNone) - private static final build.buf.validate.conformance.cases.RepeatedEmbedNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEmbedNone(); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbedNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEmbedNone 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.RepeatedEmbedNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNoneOrBuilder.java deleted file mode 100644 index e86fabc5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedNoneOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEmbedNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEmbedNone) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - java.util.List - getValList(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.Embed getVal(int index); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val"]; - */ - build.buf.validate.conformance.cases.EmbedOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkip.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkip.java deleted file mode 100644 index bccb044c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkip.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEmbedSkip} - */ -public final class RepeatedEmbedSkip extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEmbedSkip) - RepeatedEmbedSkipOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEmbedSkip.class.getName()); - } - // Use RepeatedEmbedSkip.newBuilder() to construct. - private RepeatedEmbedSkip(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEmbedSkip() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbedSkip.class, build.buf.validate.conformance.cases.RepeatedEmbedSkip.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Embed getVal(int index) { - return val_.get(index); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EmbedOrBuilder 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.RepeatedEmbedSkip)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEmbedSkip other = (build.buf.validate.conformance.cases.RepeatedEmbedSkip) 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.RepeatedEmbedSkip parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedSkip 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.RepeatedEmbedSkip parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedSkip 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.RepeatedEmbedSkip parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedSkip 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.RepeatedEmbedSkip parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEmbedSkip 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.RepeatedEmbedSkip parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbedSkip 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.RepeatedEmbedSkip 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.RepeatedEmbedSkip 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.RepeatedEmbedSkip 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.RepeatedEmbedSkip} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEmbedSkip) - build.buf.validate.conformance.cases.RepeatedEmbedSkipOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbedSkip.class, build.buf.validate.conformance.cases.RepeatedEmbedSkip.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEmbedSkip.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedSkip getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEmbedSkip.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedSkip build() { - build.buf.validate.conformance.cases.RepeatedEmbedSkip result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbedSkip buildPartial() { - build.buf.validate.conformance.cases.RepeatedEmbedSkip result = new build.buf.validate.conformance.cases.RepeatedEmbedSkip(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEmbedSkip 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.RepeatedEmbedSkip result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEmbedSkip) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEmbedSkip)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEmbedSkip other) { - if (other == build.buf.validate.conformance.cases.RepeatedEmbedSkip.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: { - build.buf.validate.conformance.cases.Embed m = - input.readMessage( - build.buf.validate.conformance.cases.Embed.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< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder> valBuilder_; - - /** - * repeated .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.set(index, value); - onChanged(); - } else { - valBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal(build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(index, value); - onChanged(); - } else { - valBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EmbedOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - build.buf.validate.conformance.cases.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, build.buf.validate.conformance.cases.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEmbedSkip) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEmbedSkip) - private static final build.buf.validate.conformance.cases.RepeatedEmbedSkip DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEmbedSkip(); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbedSkip getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEmbedSkip 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.RepeatedEmbedSkip getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkipOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkipOrBuilder.java deleted file mode 100644 index ab3917d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbedSkipOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEmbedSkipOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEmbedSkip) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValList(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Embed getVal(int index); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.EmbedOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumIn.java deleted file mode 100644 index 8b791a33..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumIn.java +++ /dev/null @@ -1,753 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEmbeddedEnumIn} - */ -public final class RepeatedEmbeddedEnumIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) - RepeatedEmbeddedEnumInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEmbeddedEnumIn.class.getName()); - } - // Use RepeatedEmbeddedEnumIn.newBuilder() to construct. - private RepeatedEmbeddedEnumIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEmbeddedEnumIn() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.class, build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum} - */ - public enum AnotherInEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ANOTHER_IN_ENUM_UNSPECIFIED = 0; - */ - ANOTHER_IN_ENUM_UNSPECIFIED(0), - /** - * ANOTHER_IN_ENUM_A = 1; - */ - ANOTHER_IN_ENUM_A(1), - /** - * ANOTHER_IN_ENUM_B = 2; - */ - ANOTHER_IN_ENUM_B(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnotherInEnum.class.getName()); - } - /** - * ANOTHER_IN_ENUM_UNSPECIFIED = 0; - */ - public static final int ANOTHER_IN_ENUM_UNSPECIFIED_VALUE = 0; - /** - * ANOTHER_IN_ENUM_A = 1; - */ - public static final int ANOTHER_IN_ENUM_A_VALUE = 1; - /** - * ANOTHER_IN_ENUM_B = 2; - */ - public static final int ANOTHER_IN_ENUM_B_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AnotherInEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AnotherInEnum forNumber(int value) { - switch (value) { - case 0: return ANOTHER_IN_ENUM_UNSPECIFIED; - case 1: return ANOTHER_IN_ENUM_A; - case 2: return ANOTHER_IN_ENUM_B; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AnotherInEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AnotherInEnum findValueByNumber(int number) { - return AnotherInEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.getDescriptor().getEnumTypes().get(0); - } - - private static final AnotherInEnum[] VALUES = values(); - - public static AnotherInEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AnotherInEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum) - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum>() { - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum convert(int from) { - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum result = build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedEmbeddedEnumIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn other = (build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.class, build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn build() { - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn result = new build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) - private static final build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEmbeddedEnumIn 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.RepeatedEmbeddedEnumIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumInOrBuilder.java deleted file mode 100644 index c367d7f4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumInOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEmbeddedEnumInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEmbeddedEnumIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum getVal(int index); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotIn.java deleted file mode 100644 index 01a90166..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotIn.java +++ /dev/null @@ -1,753 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn} - */ -public final class RepeatedEmbeddedEnumNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) - RepeatedEmbeddedEnumNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEmbeddedEnumNotIn.class.getName()); - } - // Use RepeatedEmbeddedEnumNotIn.newBuilder() to construct. - private RepeatedEmbeddedEnumNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEmbeddedEnumNotIn() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.class, build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum} - */ - public enum AnotherNotInEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ANOTHER_NOT_IN_ENUM_UNSPECIFIED = 0; - */ - ANOTHER_NOT_IN_ENUM_UNSPECIFIED(0), - /** - * ANOTHER_NOT_IN_ENUM_A = 1; - */ - ANOTHER_NOT_IN_ENUM_A(1), - /** - * ANOTHER_NOT_IN_ENUM_B = 2; - */ - ANOTHER_NOT_IN_ENUM_B(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnotherNotInEnum.class.getName()); - } - /** - * ANOTHER_NOT_IN_ENUM_UNSPECIFIED = 0; - */ - public static final int ANOTHER_NOT_IN_ENUM_UNSPECIFIED_VALUE = 0; - /** - * ANOTHER_NOT_IN_ENUM_A = 1; - */ - public static final int ANOTHER_NOT_IN_ENUM_A_VALUE = 1; - /** - * ANOTHER_NOT_IN_ENUM_B = 2; - */ - public static final int ANOTHER_NOT_IN_ENUM_B_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AnotherNotInEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AnotherNotInEnum forNumber(int value) { - switch (value) { - case 0: return ANOTHER_NOT_IN_ENUM_UNSPECIFIED; - case 1: return ANOTHER_NOT_IN_ENUM_A; - case 2: return ANOTHER_NOT_IN_ENUM_B; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AnotherNotInEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AnotherNotInEnum findValueByNumber(int number) { - return AnotherNotInEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.getDescriptor().getEnumTypes().get(0); - } - - private static final AnotherNotInEnum[] VALUES = values(); - - public static AnotherNotInEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AnotherNotInEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum) - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum>() { - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum convert(int from) { - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum result = build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedEmbeddedEnumNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn other = (build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.class, build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn build() { - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn result = new build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) - private static final build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEmbeddedEnumNotIn 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.RepeatedEmbeddedEnumNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotInOrBuilder.java deleted file mode 100644 index 512039d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEmbeddedEnumNotInOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEmbeddedEnumNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum getVal(int index); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefined.java deleted file mode 100644 index 797fa7cd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefined.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEnumDefined} - */ -public final class RepeatedEnumDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEnumDefined) - RepeatedEnumDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEnumDefined.class.getName()); - } - // Use RepeatedEnumDefined.newBuilder() to construct. - private RepeatedEnumDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEnumDefined() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEnumDefined.class, build.buf.validate.conformance.cases.RepeatedEnumDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.TestEnum> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.TestEnum>() { - public build.buf.validate.conformance.cases.TestEnum convert(int from) { - build.buf.validate.conformance.cases.TestEnum result = build.buf.validate.conformance.cases.TestEnum.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.TestEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.TestEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedEnumDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEnumDefined other = (build.buf.validate.conformance.cases.RepeatedEnumDefined) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedEnumDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumDefined 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.RepeatedEnumDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumDefined 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.RepeatedEnumDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumDefined 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.RepeatedEnumDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEnumDefined 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.RepeatedEnumDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEnumDefined 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.RepeatedEnumDefined 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.RepeatedEnumDefined 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.RepeatedEnumDefined 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.RepeatedEnumDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEnumDefined) - build.buf.validate.conformance.cases.RepeatedEnumDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEnumDefined.class, build.buf.validate.conformance.cases.RepeatedEnumDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEnumDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedEnumDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEnumDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumDefined build() { - build.buf.validate.conformance.cases.RepeatedEnumDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumDefined buildPartial() { - build.buf.validate.conformance.cases.RepeatedEnumDefined result = new build.buf.validate.conformance.cases.RepeatedEnumDefined(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEnumDefined result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedEnumDefined result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEnumDefined) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEnumDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEnumDefined other) { - if (other == build.buf.validate.conformance.cases.RepeatedEnumDefined.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.TestEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.TestEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.TestEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.TestEnum value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEnumDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEnumDefined) - private static final build.buf.validate.conformance.cases.RepeatedEnumDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEnumDefined(); - } - - public static build.buf.validate.conformance.cases.RepeatedEnumDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEnumDefined 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.RepeatedEnumDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefinedOrBuilder.java deleted file mode 100644 index f79451ff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumDefinedOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEnumDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEnumDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.TestEnum getVal(int index); - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.TestEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumIn.java deleted file mode 100644 index 2a48ca8a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumIn.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEnumIn} - */ -public final class RepeatedEnumIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEnumIn) - RepeatedEnumInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEnumIn.class.getName()); - } - // Use RepeatedEnumIn.newBuilder() to construct. - private RepeatedEnumIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEnumIn() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEnumIn.class, build.buf.validate.conformance.cases.RepeatedEnumIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.AnEnum> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.AnEnum>() { - public build.buf.validate.conformance.cases.AnEnum convert(int from) { - build.buf.validate.conformance.cases.AnEnum result = build.buf.validate.conformance.cases.AnEnum.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.AnEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.AnEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.AnEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedEnumIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEnumIn other = (build.buf.validate.conformance.cases.RepeatedEnumIn) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedEnumIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumIn 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.RepeatedEnumIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumIn 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.RepeatedEnumIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumIn 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.RepeatedEnumIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEnumIn 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.RepeatedEnumIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEnumIn 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.RepeatedEnumIn 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.RepeatedEnumIn 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.RepeatedEnumIn 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.RepeatedEnumIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEnumIn) - build.buf.validate.conformance.cases.RepeatedEnumInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEnumIn.class, build.buf.validate.conformance.cases.RepeatedEnumIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEnumIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEnumIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumIn build() { - build.buf.validate.conformance.cases.RepeatedEnumIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedEnumIn result = new build.buf.validate.conformance.cases.RepeatedEnumIn(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEnumIn result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedEnumIn result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEnumIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEnumIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEnumIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedEnumIn.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.AnEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.AnEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.AnEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.AnEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.AnEnum value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEnumIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEnumIn) - private static final build.buf.validate.conformance.cases.RepeatedEnumIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEnumIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedEnumIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEnumIn 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.RepeatedEnumIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumInOrBuilder.java deleted file mode 100644 index 84c8808a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumInOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEnumInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEnumIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.AnEnum getVal(int index); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotIn.java deleted file mode 100644 index d8ad39c1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotIn.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedEnumNotIn} - */ -public final class RepeatedEnumNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedEnumNotIn) - RepeatedEnumNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedEnumNotIn.class.getName()); - } - // Use RepeatedEnumNotIn.newBuilder() to construct. - private RepeatedEnumNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedEnumNotIn() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEnumNotIn.class, build.buf.validate.conformance.cases.RepeatedEnumNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.AnEnum> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.AnEnum>() { - public build.buf.validate.conformance.cases.AnEnum convert(int from) { - build.buf.validate.conformance.cases.AnEnum result = build.buf.validate.conformance.cases.AnEnum.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.AnEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.AnEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.AnEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedEnumNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedEnumNotIn other = (build.buf.validate.conformance.cases.RepeatedEnumNotIn) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn 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.RepeatedEnumNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn 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.RepeatedEnumNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn 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.RepeatedEnumNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn 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.RepeatedEnumNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn 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.RepeatedEnumNotIn 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.RepeatedEnumNotIn 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.RepeatedEnumNotIn 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.RepeatedEnumNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedEnumNotIn) - build.buf.validate.conformance.cases.RepeatedEnumNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedEnumNotIn.class, build.buf.validate.conformance.cases.RepeatedEnumNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedEnumNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedEnumNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumNotIn build() { - build.buf.validate.conformance.cases.RepeatedEnumNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedEnumNotIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedEnumNotIn result = new build.buf.validate.conformance.cases.RepeatedEnumNotIn(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedEnumNotIn result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedEnumNotIn result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedEnumNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedEnumNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedEnumNotIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedEnumNotIn.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.AnEnum>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.AnEnum getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.AnEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.AnEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.AnEnum value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedEnumNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedEnumNotIn) - private static final build.buf.validate.conformance.cases.RepeatedEnumNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedEnumNotIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedEnumNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedEnumNotIn 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.RepeatedEnumNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotInOrBuilder.java deleted file mode 100644 index e12321ac..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedEnumNotInOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedEnumNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedEnumNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.AnEnum getVal(int index); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.AnEnum val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExact.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExact.java deleted file mode 100644 index 7692af72..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExact.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedExact} - */ -public final class RepeatedExact extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedExact) - RepeatedExactOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedExact.class.getName()); - } - // Use RepeatedExact.newBuilder() to construct. - private RepeatedExact(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedExact() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedExact.class, build.buf.validate.conformance.cases.RepeatedExact.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeUInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.RepeatedExact)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedExact other = (build.buf.validate.conformance.cases.RepeatedExact) 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.RepeatedExact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExact 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.RepeatedExact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExact 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.RepeatedExact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExact 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.RepeatedExact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedExact 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.RepeatedExact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedExact 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.RepeatedExact 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.RepeatedExact 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.RepeatedExact 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.RepeatedExact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedExact) - build.buf.validate.conformance.cases.RepeatedExactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedExact.class, build.buf.validate.conformance.cases.RepeatedExact.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedExact.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExact_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExact getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedExact.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExact build() { - build.buf.validate.conformance.cases.RepeatedExact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExact buildPartial() { - build.buf.validate.conformance.cases.RepeatedExact result = new build.buf.validate.conformance.cases.RepeatedExact(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedExact result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedExact) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedExact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedExact other) { - if (other == build.buf.validate.conformance.cases.RepeatedExact.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readUInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readUInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedExact) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedExact) - private static final build.buf.validate.conformance.cases.RepeatedExact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedExact(); - } - - public static build.buf.validate.conformance.cases.RepeatedExact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedExact 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.RepeatedExact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnore.java deleted file mode 100644 index 956bbf89..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnore.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedExactIgnore} - */ -public final class RepeatedExactIgnore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedExactIgnore) - RepeatedExactIgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedExactIgnore.class.getName()); - } - // Use RepeatedExactIgnore.newBuilder() to construct. - private RepeatedExactIgnore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedExactIgnore() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedExactIgnore.class, build.buf.validate.conformance.cases.RepeatedExactIgnore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeUInt32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.RepeatedExactIgnore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedExactIgnore other = (build.buf.validate.conformance.cases.RepeatedExactIgnore) 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.RepeatedExactIgnore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExactIgnore 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.RepeatedExactIgnore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExactIgnore 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.RepeatedExactIgnore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExactIgnore 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.RepeatedExactIgnore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedExactIgnore 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.RepeatedExactIgnore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedExactIgnore 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.RepeatedExactIgnore 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.RepeatedExactIgnore 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.RepeatedExactIgnore 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.RepeatedExactIgnore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedExactIgnore) - build.buf.validate.conformance.cases.RepeatedExactIgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedExactIgnore.class, build.buf.validate.conformance.cases.RepeatedExactIgnore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedExactIgnore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExactIgnore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedExactIgnore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExactIgnore build() { - build.buf.validate.conformance.cases.RepeatedExactIgnore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExactIgnore buildPartial() { - build.buf.validate.conformance.cases.RepeatedExactIgnore result = new build.buf.validate.conformance.cases.RepeatedExactIgnore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedExactIgnore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedExactIgnore) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedExactIgnore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedExactIgnore other) { - if (other == build.buf.validate.conformance.cases.RepeatedExactIgnore.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int v = input.readUInt32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readUInt32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedExactIgnore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedExactIgnore) - private static final build.buf.validate.conformance.cases.RepeatedExactIgnore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedExactIgnore(); - } - - public static build.buf.validate.conformance.cases.RepeatedExactIgnore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedExactIgnore 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.RepeatedExactIgnore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnoreOrBuilder.java deleted file mode 100644 index a540efff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactIgnoreOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedExactIgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedExactIgnore) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactOrBuilder.java deleted file mode 100644 index b4bceca4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExactOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedExactOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedExact) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefined.java deleted file mode 100644 index 1d753283..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefined.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedExternalEnumDefined} - */ -public final class RepeatedExternalEnumDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedExternalEnumDefined) - RepeatedExternalEnumDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedExternalEnumDefined.class.getName()); - } - // Use RepeatedExternalEnumDefined.newBuilder() to construct. - private RepeatedExternalEnumDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedExternalEnumDefined() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.class, build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.other_package.Embed.Enumerated> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.other_package.Embed.Enumerated>() { - public build.buf.validate.conformance.cases.other_package.Embed.Enumerated convert(int from) { - build.buf.validate.conformance.cases.other_package.Embed.Enumerated result = build.buf.validate.conformance.cases.other_package.Embed.Enumerated.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.other_package.Embed.Enumerated.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.other_package.Embed.Enumerated>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.Enumerated getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedExternalEnumDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedExternalEnumDefined other = (build.buf.validate.conformance.cases.RepeatedExternalEnumDefined) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedExternalEnumDefined) - build.buf.validate.conformance.cases.RepeatedExternalEnumDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.class, build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedExternalEnumDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExternalEnumDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExternalEnumDefined build() { - build.buf.validate.conformance.cases.RepeatedExternalEnumDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedExternalEnumDefined buildPartial() { - build.buf.validate.conformance.cases.RepeatedExternalEnumDefined result = new build.buf.validate.conformance.cases.RepeatedExternalEnumDefined(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedExternalEnumDefined result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedExternalEnumDefined result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedExternalEnumDefined) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedExternalEnumDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedExternalEnumDefined other) { - if (other == build.buf.validate.conformance.cases.RepeatedExternalEnumDefined.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.other_package.Embed.Enumerated>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.other_package.Embed.Enumerated getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.other_package.Embed.Enumerated value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.other_package.Embed.Enumerated value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.other_package.Embed.Enumerated value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedExternalEnumDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedExternalEnumDefined) - private static final build.buf.validate.conformance.cases.RepeatedExternalEnumDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedExternalEnumDefined(); - } - - public static build.buf.validate.conformance.cases.RepeatedExternalEnumDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedExternalEnumDefined 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.RepeatedExternalEnumDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefinedOrBuilder.java deleted file mode 100644 index e6bd556e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedExternalEnumDefinedOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedExternalEnumDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedExternalEnumDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.other_package.Embed.Enumerated getVal(int index); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.other_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemIn.java deleted file mode 100644 index 0b047591..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemIn.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedItemIn} - */ -public final class RepeatedItemIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedItemIn) - RepeatedItemInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedItemIn.class.getName()); - } - // Use RepeatedItemIn.newBuilder() to construct. - private RepeatedItemIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedItemIn() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemIn.class, build.buf.validate.conformance.cases.RepeatedItemIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedItemIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedItemIn other = (build.buf.validate.conformance.cases.RepeatedItemIn) 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.RepeatedItemIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemIn 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.RepeatedItemIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemIn 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.RepeatedItemIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemIn 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.RepeatedItemIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedItemIn 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.RepeatedItemIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedItemIn 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.RepeatedItemIn 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.RepeatedItemIn 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.RepeatedItemIn 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.RepeatedItemIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedItemIn) - build.buf.validate.conformance.cases.RepeatedItemInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemIn.class, build.buf.validate.conformance.cases.RepeatedItemIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedItemIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedItemIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemIn build() { - build.buf.validate.conformance.cases.RepeatedItemIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedItemIn result = new build.buf.validate.conformance.cases.RepeatedItemIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedItemIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedItemIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedItemIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedItemIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedItemIn.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedItemIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedItemIn) - private static final build.buf.validate.conformance.cases.RepeatedItemIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedItemIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedItemIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedItemIn 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.RepeatedItemIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemInOrBuilder.java deleted file mode 100644 index 0c830def..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemInOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedItemInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedItemIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotIn.java deleted file mode 100644 index 002c2d84..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotIn.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedItemNotIn} - */ -public final class RepeatedItemNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedItemNotIn) - RepeatedItemNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedItemNotIn.class.getName()); - } - // Use RepeatedItemNotIn.newBuilder() to construct. - private RepeatedItemNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedItemNotIn() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemNotIn.class, build.buf.validate.conformance.cases.RepeatedItemNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedItemNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedItemNotIn other = (build.buf.validate.conformance.cases.RepeatedItemNotIn) 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.RepeatedItemNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemNotIn 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.RepeatedItemNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemNotIn 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.RepeatedItemNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemNotIn 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.RepeatedItemNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedItemNotIn 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.RepeatedItemNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedItemNotIn 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.RepeatedItemNotIn 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.RepeatedItemNotIn 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.RepeatedItemNotIn 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.RepeatedItemNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedItemNotIn) - build.buf.validate.conformance.cases.RepeatedItemNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemNotIn.class, build.buf.validate.conformance.cases.RepeatedItemNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedItemNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedItemNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemNotIn build() { - build.buf.validate.conformance.cases.RepeatedItemNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemNotIn buildPartial() { - build.buf.validate.conformance.cases.RepeatedItemNotIn result = new build.buf.validate.conformance.cases.RepeatedItemNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedItemNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedItemNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedItemNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedItemNotIn other) { - if (other == build.buf.validate.conformance.cases.RepeatedItemNotIn.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedItemNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedItemNotIn) - private static final build.buf.validate.conformance.cases.RepeatedItemNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedItemNotIn(); - } - - public static build.buf.validate.conformance.cases.RepeatedItemNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedItemNotIn 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.RepeatedItemNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotInOrBuilder.java deleted file mode 100644 index 94dbb8a7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemNotInOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedItemNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedItemNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPattern.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPattern.java deleted file mode 100644 index 214e1e81..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPattern.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedItemPattern} - */ -public final class RepeatedItemPattern extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedItemPattern) - RepeatedItemPatternOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedItemPattern.class.getName()); - } - // Use RepeatedItemPattern.newBuilder() to construct. - private RepeatedItemPattern(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedItemPattern() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemPattern.class, build.buf.validate.conformance.cases.RepeatedItemPattern.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedItemPattern)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedItemPattern other = (build.buf.validate.conformance.cases.RepeatedItemPattern) 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.RepeatedItemPattern parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemPattern 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.RepeatedItemPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemPattern 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.RepeatedItemPattern parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemPattern 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.RepeatedItemPattern parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedItemPattern 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.RepeatedItemPattern parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedItemPattern 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.RepeatedItemPattern 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.RepeatedItemPattern 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.RepeatedItemPattern 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.RepeatedItemPattern} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedItemPattern) - build.buf.validate.conformance.cases.RepeatedItemPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemPattern.class, build.buf.validate.conformance.cases.RepeatedItemPattern.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedItemPattern.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemPattern_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemPattern getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedItemPattern.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemPattern build() { - build.buf.validate.conformance.cases.RepeatedItemPattern result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemPattern buildPartial() { - build.buf.validate.conformance.cases.RepeatedItemPattern result = new build.buf.validate.conformance.cases.RepeatedItemPattern(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedItemPattern result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedItemPattern) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedItemPattern)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedItemPattern other) { - if (other == build.buf.validate.conformance.cases.RepeatedItemPattern.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedItemPattern) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedItemPattern) - private static final build.buf.validate.conformance.cases.RepeatedItemPattern DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedItemPattern(); - } - - public static build.buf.validate.conformance.cases.RepeatedItemPattern getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedItemPattern 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.RepeatedItemPattern getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPatternOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPatternOrBuilder.java deleted file mode 100644 index dc81010e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemPatternOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedItemPatternOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedItemPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRule.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRule.java deleted file mode 100644 index 0d4358a0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRule.java +++ /dev/null @@ -1,544 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedItemRule} - */ -public final class RepeatedItemRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedItemRule) - RepeatedItemRuleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedItemRule.class.getName()); - } - // Use RepeatedItemRule.newBuilder() to construct. - private RepeatedItemRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedItemRule() { - val_ = emptyFloatList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemRule.class, build.buf.validate.conformance.cases.RepeatedItemRule.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList val_ = - emptyFloatList(); - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public float getVal(int index) { - return val_.getFloat(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeFloatNoTag(val_.getFloat(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getValList().size(); - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.RepeatedItemRule)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedItemRule other = (build.buf.validate.conformance.cases.RepeatedItemRule) 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.RepeatedItemRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemRule 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.RepeatedItemRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemRule 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.RepeatedItemRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedItemRule 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.RepeatedItemRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedItemRule 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.RepeatedItemRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedItemRule 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.RepeatedItemRule 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.RepeatedItemRule 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.RepeatedItemRule 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.RepeatedItemRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedItemRule) - build.buf.validate.conformance.cases.RepeatedItemRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedItemRule.class, build.buf.validate.conformance.cases.RepeatedItemRule.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedItemRule.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyFloatList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedItemRule_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemRule getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedItemRule.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemRule build() { - build.buf.validate.conformance.cases.RepeatedItemRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedItemRule buildPartial() { - build.buf.validate.conformance.cases.RepeatedItemRule result = new build.buf.validate.conformance.cases.RepeatedItemRule(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedItemRule result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedItemRule) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedItemRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedItemRule other) { - if (other == build.buf.validate.conformance.cases.RepeatedItemRule.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 13: { - float v = input.readFloat(); - ensureValIsMutable(); - val_.addFloat(v); - break; - } // case 13 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureValIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - val_.addFloat(input.readFloat()); - } - input.popLimit(limit); - 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.Internal.FloatList val_ = emptyFloatList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - private void ensureValIsMutable(int capacity) { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_, capacity); - } - bitField0_ |= 0x00000001; - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public float getVal(int index) { - return val_.getFloat(index); - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, float value) { - - ensureValIsMutable(); - val_.setFloat(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(float value) { - - ensureValIsMutable(); - val_.addFloat(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedItemRule) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedItemRule) - private static final build.buf.validate.conformance.cases.RepeatedItemRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedItemRule(); - } - - public static build.buf.validate.conformance.cases.RepeatedItemRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedItemRule 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.RepeatedItemRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRuleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRuleOrBuilder.java deleted file mode 100644 index e5b95e30..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedItemRuleOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedItemRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedItemRule) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated float val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - float getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMax.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMax.java deleted file mode 100644 index f288d308..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMax.java +++ /dev/null @@ -1,544 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedMax} - */ -public final class RepeatedMax extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedMax) - RepeatedMaxOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedMax.class.getName()); - } - // Use RepeatedMax.newBuilder() to construct. - private RepeatedMax(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedMax() { - val_ = emptyDoubleList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMax_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMax.class, build.buf.validate.conformance.cases.RepeatedMax.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList val_ = - emptyDoubleList(); - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public double getVal(int index) { - return val_.getDouble(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeDoubleNoTag(val_.getDouble(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 8 * getValList().size(); - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.RepeatedMax)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedMax other = (build.buf.validate.conformance.cases.RepeatedMax) 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.RepeatedMax parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMax 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.RepeatedMax parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMax 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.RepeatedMax parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMax 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.RepeatedMax parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedMax 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.RepeatedMax parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedMax 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.RepeatedMax 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.RepeatedMax 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.RepeatedMax 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.RepeatedMax} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedMax) - build.buf.validate.conformance.cases.RepeatedMaxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMax_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMax.class, build.buf.validate.conformance.cases.RepeatedMax.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedMax.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyDoubleList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMax_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMax getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedMax.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMax build() { - build.buf.validate.conformance.cases.RepeatedMax result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMax buildPartial() { - build.buf.validate.conformance.cases.RepeatedMax result = new build.buf.validate.conformance.cases.RepeatedMax(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedMax result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedMax) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedMax)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedMax other) { - if (other == build.buf.validate.conformance.cases.RepeatedMax.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 9: { - double v = input.readDouble(); - ensureValIsMutable(); - val_.addDouble(v); - break; - } // case 9 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureValIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - val_.addDouble(input.readDouble()); - } - input.popLimit(limit); - 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.Internal.DoubleList val_ = emptyDoubleList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - private void ensureValIsMutable(int capacity) { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_, capacity); - } - bitField0_ |= 0x00000001; - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public double getVal(int index) { - return val_.getDouble(index); - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, double value) { - - ensureValIsMutable(); - val_.setDouble(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(double value) { - - ensureValIsMutable(); - val_.addDouble(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedMax) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedMax) - private static final build.buf.validate.conformance.cases.RepeatedMax DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedMax(); - } - - public static build.buf.validate.conformance.cases.RepeatedMax getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedMax 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.RepeatedMax getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMaxOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMaxOrBuilder.java deleted file mode 100644 index 663f592f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMaxOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedMaxOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedMax) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated double val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - double getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMin.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMin.java deleted file mode 100644 index cf43c806..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMin.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedMin} - */ -public final class RepeatedMin extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedMin) - RepeatedMinOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedMin.class.getName()); - } - // Use RepeatedMin.newBuilder() to construct. - private RepeatedMin(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedMin() { - val_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMin.class, build.buf.validate.conformance.cases.RepeatedMin.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List val_; - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getValList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getValOrBuilderList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.Embed getVal(int index) { - return val_.get(index); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.EmbedOrBuilder 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.RepeatedMin)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedMin other = (build.buf.validate.conformance.cases.RepeatedMin) 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.RepeatedMin parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMin 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.RepeatedMin parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMin 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.RepeatedMin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMin 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.RepeatedMin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedMin 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.RepeatedMin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedMin 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.RepeatedMin 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.RepeatedMin 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.RepeatedMin 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.RepeatedMin} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedMin) - build.buf.validate.conformance.cases.RepeatedMinOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMin.class, build.buf.validate.conformance.cases.RepeatedMin.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedMin.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.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMin_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMin getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedMin.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMin build() { - build.buf.validate.conformance.cases.RepeatedMin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMin buildPartial() { - build.buf.validate.conformance.cases.RepeatedMin result = new build.buf.validate.conformance.cases.RepeatedMin(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedMin 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.RepeatedMin result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedMin) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedMin)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedMin other) { - if (other == build.buf.validate.conformance.cases.RepeatedMin.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: { - build.buf.validate.conformance.cases.Embed m = - input.readMessage( - build.buf.validate.conformance.cases.Embed.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< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder> valBuilder_; - - /** - * repeated .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public int getValCount() { - if (valBuilder_ == null) { - return val_.size(); - } else { - return valBuilder_.getCount(); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed getVal(int index) { - if (valBuilder_ == null) { - return val_.get(index); - } else { - return valBuilder_.getMessage(index); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.set(index, value); - onChanged(); - } else { - valBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.set(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal(build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(value); - onChanged(); - } else { - valBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.Embed value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.add(index, value); - onChanged(); - } else { - valBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder addVal( - int index, build.buf.validate.conformance.cases.Embed.Builder builderForValue) { - if (valBuilder_ == null) { - ensureValIsMutable(); - val_.add(index, builderForValue.build()); - onChanged(); - } else { - valBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed.Builder getValBuilder( - int index) { - return getValFieldBuilder().getBuilder(index); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.EmbedOrBuilder getValOrBuilder( - int index) { - if (valBuilder_ == null) { - return val_.get(index); } else { - return valBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .buf.validate.conformance.cases.Embed 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 .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed.Builder addValBuilder() { - return getValFieldBuilder().addBuilder( - build.buf.validate.conformance.cases.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.Embed.Builder addValBuilder( - int index) { - return getValFieldBuilder().addBuilder( - index, build.buf.validate.conformance.cases.Embed.getDefaultInstance()); - } - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public java.util.List - getValBuilderList() { - return getValFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.cases.Embed, build.buf.validate.conformance.cases.Embed.Builder, build.buf.validate.conformance.cases.EmbedOrBuilder>( - val_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedMin) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedMin) - private static final build.buf.validate.conformance.cases.RepeatedMin DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedMin(); - } - - public static build.buf.validate.conformance.cases.RepeatedMin getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedMin 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.RepeatedMin getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLen.java deleted file mode 100644 index f10ffab3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLen.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedMinAndItemLen} - */ -public final class RepeatedMinAndItemLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedMinAndItemLen) - RepeatedMinAndItemLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedMinAndItemLen.class.getName()); - } - // Use RepeatedMinAndItemLen.newBuilder() to construct. - private RepeatedMinAndItemLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedMinAndItemLen() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMinAndItemLen.class, build.buf.validate.conformance.cases.RepeatedMinAndItemLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedMinAndItemLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedMinAndItemLen other = (build.buf.validate.conformance.cases.RepeatedMinAndItemLen) 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.RepeatedMinAndItemLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen 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.RepeatedMinAndItemLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedMinAndItemLen) - build.buf.validate.conformance.cases.RepeatedMinAndItemLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMinAndItemLen.class, build.buf.validate.conformance.cases.RepeatedMinAndItemLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedMinAndItemLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinAndItemLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedMinAndItemLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinAndItemLen build() { - build.buf.validate.conformance.cases.RepeatedMinAndItemLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinAndItemLen buildPartial() { - build.buf.validate.conformance.cases.RepeatedMinAndItemLen result = new build.buf.validate.conformance.cases.RepeatedMinAndItemLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedMinAndItemLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedMinAndItemLen) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedMinAndItemLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedMinAndItemLen other) { - if (other == build.buf.validate.conformance.cases.RepeatedMinAndItemLen.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedMinAndItemLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedMinAndItemLen) - private static final build.buf.validate.conformance.cases.RepeatedMinAndItemLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedMinAndItemLen(); - } - - public static build.buf.validate.conformance.cases.RepeatedMinAndItemLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedMinAndItemLen 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.RepeatedMinAndItemLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLenOrBuilder.java deleted file mode 100644 index d2efc51b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndItemLenOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedMinAndItemLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedMinAndItemLen) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLen.java deleted file mode 100644 index 0ebd4de3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLen.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedMinAndMaxItemLen} - */ -public final class RepeatedMinAndMaxItemLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) - RepeatedMinAndMaxItemLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedMinAndMaxItemLen.class.getName()); - } - // Use RepeatedMinAndMaxItemLen.newBuilder() to construct. - private RepeatedMinAndMaxItemLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedMinAndMaxItemLen() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.class, build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedMinAndMaxItemLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen other = (build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) 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.RepeatedMinAndMaxItemLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) - build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.class, build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen build() { - build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen buildPartial() { - build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen result = new build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen other) { - if (other == build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) - private static final build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen(); - } - - public static build.buf.validate.conformance.cases.RepeatedMinAndMaxItemLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedMinAndMaxItemLen 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.RepeatedMinAndMaxItemLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLenOrBuilder.java deleted file mode 100644 index c441cde8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinAndMaxItemLenOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedMinAndMaxItemLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedMinAndMaxItemLen) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMax.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMax.java deleted file mode 100644 index d5b0fe8f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMax.java +++ /dev/null @@ -1,544 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedMinMax} - */ -public final class RepeatedMinMax extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedMinMax) - RepeatedMinMaxOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedMinMax.class.getName()); - } - // Use RepeatedMinMax.newBuilder() to construct. - private RepeatedMinMax(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedMinMax() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinMax_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMinMax.class, build.buf.validate.conformance.cases.RepeatedMinMax.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_ = - emptyIntList(); - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeSFixed32NoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getValList().size(); - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.RepeatedMinMax)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedMinMax other = (build.buf.validate.conformance.cases.RepeatedMinMax) 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.RepeatedMinMax parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinMax 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.RepeatedMinMax parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinMax 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.RepeatedMinMax parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMinMax 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.RepeatedMinMax parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedMinMax 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.RepeatedMinMax parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedMinMax 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.RepeatedMinMax 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.RepeatedMinMax 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.RepeatedMinMax 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.RepeatedMinMax} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedMinMax) - build.buf.validate.conformance.cases.RepeatedMinMaxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinMax_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinMax_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMinMax.class, build.buf.validate.conformance.cases.RepeatedMinMax.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedMinMax.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMinMax_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinMax getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedMinMax.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinMax build() { - build.buf.validate.conformance.cases.RepeatedMinMax result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMinMax buildPartial() { - build.buf.validate.conformance.cases.RepeatedMinMax result = new build.buf.validate.conformance.cases.RepeatedMinMax(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedMinMax result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedMinMax) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedMinMax)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedMinMax other) { - if (other == build.buf.validate.conformance.cases.RepeatedMinMax.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 13: { - int v = input.readSFixed32(); - ensureValIsMutable(); - val_.addInt(v); - break; - } // case 13 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureValIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - val_.addInt(input.readSFixed32()); - } - input.popLimit(limit); - 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.Internal.IntList val_ = emptyIntList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - private void ensureValIsMutable(int capacity) { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_, capacity); - } - bitField0_ |= 0x00000001; - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public int getVal(int index) { - return val_.getInt(index); - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, int value) { - - ensureValIsMutable(); - val_.setInt(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(int value) { - - ensureValIsMutable(); - val_.addInt(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedMinMax) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedMinMax) - private static final build.buf.validate.conformance.cases.RepeatedMinMax DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedMinMax(); - } - - public static build.buf.validate.conformance.cases.RepeatedMinMax getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedMinMax 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.RepeatedMinMax getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMaxOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMaxOrBuilder.java deleted file mode 100644 index 4b50c300..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinMaxOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedMinMaxOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedMinMax) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - int getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinOrBuilder.java deleted file mode 100644 index 8a293666..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMinOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedMinOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedMin) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValList(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.Embed getVal(int index); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.List - getValOrBuilderList(); - /** - * repeated .buf.validate.conformance.cases.Embed val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.EmbedOrBuilder getValOrBuilder( - int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUnique.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUnique.java deleted file mode 100644 index 1bb6cbf7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUnique.java +++ /dev/null @@ -1,729 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedMultipleUnique} - */ -public final class RepeatedMultipleUnique extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedMultipleUnique) - RepeatedMultipleUniqueOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedMultipleUnique.class.getName()); - } - // Use RepeatedMultipleUnique.newBuilder() to construct. - private RepeatedMultipleUnique(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedMultipleUnique() { - a_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - b_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMultipleUnique.class, build.buf.validate.conformance.cases.RepeatedMultipleUnique.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList a_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return A list containing the a. - */ - public com.google.protobuf.ProtocolStringList - getAList() { - return a_; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The count of a. - */ - public int getACount() { - return a_.size(); - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The a at the given index. - */ - public java.lang.String getA(int index) { - return a_.get(index); - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the a at the given index. - */ - public com.google.protobuf.ByteString - getABytes(int index) { - return a_.getByteString(index); - } - - public static final int B_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList b_ = - emptyIntList(); - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return A list containing the b. - */ - @java.lang.Override - public java.util.List - getBList() { - return b_; - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The count of b. - */ - public int getBCount() { - return b_.size(); - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The b at the given index. - */ - public int getB(int index) { - return b_.getInt(index); - } - private int bMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - for (int i = 0; i < a_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, a_.getRaw(i)); - } - if (getBList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(bMemoizedSerializedSize); - } - for (int i = 0; i < b_.size(); i++) { - output.writeInt32NoTag(b_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < a_.size(); i++) { - dataSize += computeStringSizeNoTag(a_.getRaw(i)); - } - size += dataSize; - size += 1 * getAList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < b_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(b_.getInt(i)); - } - size += dataSize; - if (!getBList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - bMemoizedSerializedSize = dataSize; - } - 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.RepeatedMultipleUnique)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedMultipleUnique other = (build.buf.validate.conformance.cases.RepeatedMultipleUnique) obj; - - if (!getAList() - .equals(other.getAList())) return false; - if (!getBList() - .equals(other.getBList())) 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 (getACount() > 0) { - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getAList().hashCode(); - } - if (getBCount() > 0) { - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getBList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique 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.RepeatedMultipleUnique parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique 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.RepeatedMultipleUnique parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique 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.RepeatedMultipleUnique parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique 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.RepeatedMultipleUnique parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique 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.RepeatedMultipleUnique 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.RepeatedMultipleUnique 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.RepeatedMultipleUnique 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.RepeatedMultipleUnique} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedMultipleUnique) - build.buf.validate.conformance.cases.RepeatedMultipleUniqueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedMultipleUnique.class, build.buf.validate.conformance.cases.RepeatedMultipleUnique.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedMultipleUnique.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - b_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMultipleUnique getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedMultipleUnique.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMultipleUnique build() { - build.buf.validate.conformance.cases.RepeatedMultipleUnique result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedMultipleUnique buildPartial() { - build.buf.validate.conformance.cases.RepeatedMultipleUnique result = new build.buf.validate.conformance.cases.RepeatedMultipleUnique(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedMultipleUnique result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - a_.makeImmutable(); - result.a_ = a_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - b_.makeImmutable(); - result.b_ = b_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedMultipleUnique) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedMultipleUnique)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedMultipleUnique other) { - if (other == build.buf.validate.conformance.cases.RepeatedMultipleUnique.getDefaultInstance()) return this; - if (!other.a_.isEmpty()) { - if (a_.isEmpty()) { - a_ = other.a_; - bitField0_ |= 0x00000001; - } else { - ensureAIsMutable(); - a_.addAll(other.a_); - } - onChanged(); - } - if (!other.b_.isEmpty()) { - if (b_.isEmpty()) { - b_ = other.b_; - b_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureBIsMutable(); - b_.addAll(other.b_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureAIsMutable(); - a_.add(s); - break; - } // case 10 - case 16: { - int v = input.readInt32(); - ensureBIsMutable(); - b_.addInt(v); - break; - } // case 16 - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureBIsMutable(); - while (input.getBytesUntilLimit() > 0) { - b_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 18 - 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.LazyStringArrayList a_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureAIsMutable() { - if (!a_.isModifiable()) { - a_ = new com.google.protobuf.LazyStringArrayList(a_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return A list containing the a. - */ - public com.google.protobuf.ProtocolStringList - getAList() { - a_.makeImmutable(); - return a_; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The count of a. - */ - public int getACount() { - return a_.size(); - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The a at the given index. - */ - public java.lang.String getA(int index) { - return a_.get(index); - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the a at the given index. - */ - public com.google.protobuf.ByteString - getABytes(int index) { - return a_.getByteString(index); - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAIsMutable(); - a_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to add. - * @return This builder for chaining. - */ - public Builder addA( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureAIsMutable(); - a_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param values The a to add. - * @return This builder for chaining. - */ - public Builder addAllA( - java.lang.Iterable values) { - ensureAIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, a_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - a_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The bytes of the a to add. - * @return This builder for chaining. - */ - public Builder addABytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureAIsMutable(); - a_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList b_ = emptyIntList(); - private void ensureBIsMutable() { - if (!b_.isModifiable()) { - b_ = makeMutableCopy(b_); - } - bitField0_ |= 0x00000002; - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return A list containing the b. - */ - public java.util.List - getBList() { - b_.makeImmutable(); - return b_; - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The count of b. - */ - public int getBCount() { - return b_.size(); - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The b at the given index. - */ - public int getB(int index) { - return b_.getInt(index); - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB( - int index, int value) { - - ensureBIsMutable(); - b_.setInt(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param value The b to add. - * @return This builder for chaining. - */ - public Builder addB(int value) { - - ensureBIsMutable(); - b_.addInt(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param values The b to add. - * @return This builder for chaining. - */ - public Builder addAllB( - java.lang.Iterable values) { - ensureBIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, b_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearB() { - b_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedMultipleUnique) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedMultipleUnique) - private static final build.buf.validate.conformance.cases.RepeatedMultipleUnique DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedMultipleUnique(); - } - - public static build.buf.validate.conformance.cases.RepeatedMultipleUnique getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedMultipleUnique 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.RepeatedMultipleUnique getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUniqueOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUniqueOrBuilder.java deleted file mode 100644 index 07074181..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedMultipleUniqueOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedMultipleUniqueOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedMultipleUnique) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return A list containing the a. - */ - java.util.List - getAList(); - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The count of a. - */ - int getACount(); - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The a at the given index. - */ - java.lang.String getA(int index); - /** - * repeated string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the a at the given index. - */ - com.google.protobuf.ByteString - getABytes(int index); - - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return A list containing the b. - */ - java.util.List getBList(); - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The count of b. - */ - int getBCount(); - /** - * repeated int32 b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The b at the given index. - */ - int getB(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNone.java deleted file mode 100644 index 96c013bc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNone.java +++ /dev/null @@ -1,540 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedNone} - */ -public final class RepeatedNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedNone) - RepeatedNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedNone.class.getName()); - } - // Use RepeatedNone.newBuilder() to construct. - private RepeatedNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedNone() { - val_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedNone.class, build.buf.validate.conformance.cases.RepeatedNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList val_ = - emptyLongList(); - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List - getValList() { - return val_; - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - private int valMemoizedSerializedSize = -1; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeInt64NoTag(val_.getLong(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(val_.getLong(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - valMemoizedSerializedSize = dataSize; - } - 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.RepeatedNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedNone other = (build.buf.validate.conformance.cases.RepeatedNone) 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.RepeatedNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedNone 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.RepeatedNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedNone 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.RepeatedNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedNone 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.RepeatedNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedNone 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.RepeatedNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedNone 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.RepeatedNone 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.RepeatedNone 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.RepeatedNone 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.RepeatedNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedNone) - build.buf.validate.conformance.cases.RepeatedNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedNone.class, build.buf.validate.conformance.cases.RepeatedNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyLongList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedNone build() { - build.buf.validate.conformance.cases.RepeatedNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedNone buildPartial() { - build.buf.validate.conformance.cases.RepeatedNone result = new build.buf.validate.conformance.cases.RepeatedNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedNone) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedNone other) { - if (other == build.buf.validate.conformance.cases.RepeatedNone.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - val_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - long v = input.readInt64(); - ensureValIsMutable(); - val_.addLong(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - val_.addLong(input.readInt64()); - } - input.popLimit(limit); - 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.Internal.LongList val_ = emptyLongList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = makeMutableCopy(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return A list containing the val. - */ - public java.util.List - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @param index The index of the element to return. - * @return The val at the given index. - */ - public long getVal(int index) { - return val_.getLong(index); - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, long value) { - - ensureValIsMutable(); - val_.setLong(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(long value) { - - ensureValIsMutable(); - val_.addLong(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedNone) - private static final build.buf.validate.conformance.cases.RepeatedNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedNone(); - } - - public static build.buf.validate.conformance.cases.RepeatedNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedNone 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.RepeatedNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNoneOrBuilder.java deleted file mode 100644 index d07ca4a1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNoneOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedNone) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated int64 val = 1 [json_name = "val"]; - * @return The count of val. - */ - int getValCount(); - /** - * repeated int64 val = 1 [json_name = "val"]; - * @param index The index of the element to return. - * @return The val at the given index. - */ - long getVal(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUnique.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUnique.java deleted file mode 100644 index 393faddb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUnique.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedNotUnique} - */ -public final class RepeatedNotUnique extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedNotUnique) - RepeatedNotUniqueOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedNotUnique.class.getName()); - } - // Use RepeatedNotUnique.newBuilder() to construct. - private RepeatedNotUnique(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedNotUnique() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNotUnique_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNotUnique_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedNotUnique.class, build.buf.validate.conformance.cases.RepeatedNotUnique.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedNotUnique)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedNotUnique other = (build.buf.validate.conformance.cases.RepeatedNotUnique) 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.RepeatedNotUnique parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedNotUnique 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.RepeatedNotUnique parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedNotUnique 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.RepeatedNotUnique parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedNotUnique 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.RepeatedNotUnique parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedNotUnique 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.RepeatedNotUnique parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedNotUnique 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.RepeatedNotUnique 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.RepeatedNotUnique 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.RepeatedNotUnique 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.RepeatedNotUnique} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedNotUnique) - build.buf.validate.conformance.cases.RepeatedNotUniqueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNotUnique_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNotUnique_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedNotUnique.class, build.buf.validate.conformance.cases.RepeatedNotUnique.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedNotUnique.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedNotUnique_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedNotUnique getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedNotUnique.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedNotUnique build() { - build.buf.validate.conformance.cases.RepeatedNotUnique result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedNotUnique buildPartial() { - build.buf.validate.conformance.cases.RepeatedNotUnique result = new build.buf.validate.conformance.cases.RepeatedNotUnique(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedNotUnique result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedNotUnique) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedNotUnique)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedNotUnique other) { - if (other == build.buf.validate.conformance.cases.RepeatedNotUnique.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedNotUnique) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedNotUnique) - private static final build.buf.validate.conformance.cases.RepeatedNotUnique DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedNotUnique(); - } - - public static build.buf.validate.conformance.cases.RepeatedNotUnique getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedNotUnique 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.RepeatedNotUnique getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUniqueOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUniqueOrBuilder.java deleted file mode 100644 index 65899bd4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedNotUniqueOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedNotUniqueOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedNotUnique) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedProto.java deleted file mode 100644 index ed31a92f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedProto.java +++ /dev/null @@ -1,412 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class RepeatedProto { - private RepeatedProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_Embed_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_Embed_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedMin_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedMin_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedMax_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedMax_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedMinMax_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedMinMax_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedExact_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedExact_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedUnique_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedUnique_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedNotUnique_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedNotUnique_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedItemRule_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedItemRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedItemPattern_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedItemPattern_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedItemIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedItemIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEnumIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEnumIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedAnyIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedAnyIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedDuration_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedDuration_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n-buf/validate/conformance/cases/repeate" + - "d.proto\022\036buf.validate.conformance.cases\032" + - "8buf/validate/conformance/cases/other_pa" + - "ckage/embed.proto\032\033buf/validate/validate" + - ".proto\032\031google/protobuf/any.proto\032\036googl" + - "e/protobuf/duration.proto\"\"\n\005Embed\022\031\n\003va" + - "l\030\001 \001(\003B\007\272H\004\"\002 \000R\003val\" \n\014RepeatedNone\022\020\n" + - "\003val\030\001 \003(\003R\003val\"L\n\021RepeatedEmbedNone\0227\n\003" + - "val\030\001 \003(\0132%.buf.validate.conformance.cas" + - "es.EmbedR\003val\"f\n\035RepeatedEmbedCrossPacka" + - "geNone\022E\n\003val\030\001 \003(\01323.buf.validate.confo" + - "rmance.cases.other_package.EmbedR\003val\"P\n" + - "\013RepeatedMin\022A\n\003val\030\001 \003(\0132%.buf.validate" + - ".conformance.cases.EmbedB\010\272H\005\222\001\002\010\002R\003val\"" + - ")\n\013RepeatedMax\022\032\n\003val\030\001 \003(\001B\010\272H\005\222\001\002\020\003R\003v" + - "al\".\n\016RepeatedMinMax\022\034\n\003val\030\001 \003(\017B\n\272H\007\222\001" + - "\004\010\002\020\004R\003val\"-\n\rRepeatedExact\022\034\n\003val\030\001 \003(\r" + - "B\n\272H\007\222\001\004\010\003\020\003R\003val\",\n\016RepeatedUnique\022\032\n\003v" + - "al\030\001 \003(\tB\010\272H\005\222\001\002\030\001R\003val\"/\n\021RepeatedNotUn" + - "ique\022\032\n\003val\030\001 \003(\tB\010\272H\005\222\001\002\030\000R\003val\"H\n\026Repe" + - "atedMultipleUnique\022\026\n\001a\030\001 \003(\tB\010\272H\005\222\001\002\030\001R" + - "\001a\022\026\n\001b\030\002 \003(\005B\010\272H\005\222\001\002\030\001R\001b\"5\n\020RepeatedIt" + - "emRule\022!\n\003val\030\001 \003(\002B\017\272H\014\222\001\t\"\007\n\005%\000\000\000\000R\003va" + - "l\"D\n\023RepeatedItemPattern\022-\n\003val\030\001 \003(\tB\033\272" + - "H\030\222\001\025\"\023r\0212\017(?i)^[a-z0-9]+$R\003val\"Y\n\021Repea" + - "tedEmbedSkip\022D\n\003val\030\001 \003(\0132%.buf.validate" + - ".conformance.cases.EmbedB\013\272H\010\222\001\005\"\003\330\001\003R\003v" + - "al\"8\n\016RepeatedItemIn\022&\n\003val\030\001 \003(\tB\024\272H\021\222\001" + - "\016\"\014r\nR\003fooR\003barR\003val\";\n\021RepeatedItemNotI" + - "n\022&\n\003val\030\001 \003(\tB\024\272H\021\222\001\016\"\014r\nZ\003fooZ\003barR\003va" + - "l\"Y\n\016RepeatedEnumIn\022G\n\003val\030\001 \003(\0162&.buf.v" + - "alidate.conformance.cases.AnEnumB\r\272H\n\222\001\007" + - "\"\005\202\001\002\030\000R\003val\"\\\n\021RepeatedEnumNotIn\022G\n\003val" + - "\030\001 \003(\0162&.buf.validate.conformance.cases." + - "AnEnumB\r\272H\n\222\001\007\"\005\202\001\002 \000R\003val\"\337\001\n\026RepeatedE" + - "mbeddedEnumIn\022e\n\003val\030\001 \003(\0162D.buf.validat" + - "e.conformance.cases.RepeatedEmbeddedEnum" + - "In.AnotherInEnumB\r\272H\n\222\001\007\"\005\202\001\002\030\000R\003val\"^\n\r" + - "AnotherInEnum\022\037\n\033ANOTHER_IN_ENUM_UNSPECI" + - "FIED\020\000\022\025\n\021ANOTHER_IN_ENUM_A\020\001\022\025\n\021ANOTHER" + - "_IN_ENUM_B\020\002\"\367\001\n\031RepeatedEmbeddedEnumNot" + - "In\022k\n\003val\030\001 \003(\0162J.buf.validate.conforman" + - "ce.cases.RepeatedEmbeddedEnumNotIn.Anoth" + - "erNotInEnumB\r\272H\n\222\001\007\"\005\202\001\002 \000R\003val\"m\n\020Anoth" + - "erNotInEnum\022#\n\037ANOTHER_NOT_IN_ENUM_UNSPE" + - "CIFIED\020\000\022\031\n\025ANOTHER_NOT_IN_ENUM_A\020\001\022\031\n\025A" + - "NOTHER_NOT_IN_ENUM_B\020\002\"r\n\rRepeatedAnyIn\022" + - "a\n\003val\030\001 \003(\0132\024.google.protobuf.AnyB9\272H6\222" + - "\0013\"1\242\001.\022,type.googleapis.com/google.prot" + - "obuf.DurationR\003val\"v\n\020RepeatedAnyNotIn\022b" + - "\n\003val\030\001 \003(\0132\024.google.protobuf.AnyB:\272H7\222\001" + - "4\"2\242\001/\032-type.googleapis.com/google.proto" + - "buf.TimestampR\003val\":\n\025RepeatedMinAndItem" + - "Len\022!\n\003val\030\001 \003(\tB\017\272H\014\222\001\t\010\001\"\005r\003\230\001\003R\003val\"8" + - "\n\030RepeatedMinAndMaxItemLen\022\034\n\003val\030\001 \003(\tB" + - "\n\272H\007\222\001\004\010\001\020\003R\003val\"R\n\020RepeatedDuration\022>\n\003" + - "val\030\001 \003(\0132\031.google.protobuf.DurationB\021\272H" + - "\016\222\001\013\"\t\252\001\0062\004\020\300\204=R\003val\"6\n\023RepeatedExactIgn" + - "ore\022\037\n\003val\030\001 \003(\rB\r\272H\n\222\001\004\010\003\020\003\320\001\001R\003val*?\n\006" + - "AnEnum\022\027\n\023AN_ENUM_UNSPECIFIED\020\000\022\r\n\tAN_EN" + - "UM_X\020\001\022\r\n\tAN_ENUM_Y\020\002B\321\001\n$build.buf.vali" + - "date.conformance.casesB\rRepeatedProtoP\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\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.conformance.cases.other_package.EmbedProto.getDescriptor(), - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_Embed_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_Embed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_Embed_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedNone_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_RepeatedNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEmbedNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEmbedCrossPackageNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedMin_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_RepeatedMin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedMin_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedMax_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_RepeatedMax_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedMax_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedMinMax_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_RepeatedMinMax_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedMinMax_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedExact_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_RepeatedExact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedExact_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedUnique_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_RepeatedUnique_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedUnique_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedNotUnique_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_RepeatedNotUnique_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedNotUnique_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedMultipleUnique_descriptor, - new java.lang.String[] { "A", "B", }); - internal_static_buf_validate_conformance_cases_RepeatedItemRule_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_RepeatedItemRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedItemRule_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedItemPattern_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_RepeatedItemPattern_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedItemPattern_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEmbedSkip_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedItemIn_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_RepeatedItemIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedItemIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedItemNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEnumIn_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_RepeatedEnumIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEnumIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEnumNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedEmbeddedEnumNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedAnyIn_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_RepeatedAnyIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedAnyIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedAnyNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedMinAndItemLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedMinAndMaxItemLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedDuration_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_conformance_cases_RepeatedDuration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedDuration_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RepeatedExactIgnore_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.conformance.cases.other_package.EmbedProto.getDescriptor(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUnique.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUnique.java deleted file mode 100644 index 90c1485d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUnique.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedUnique} - */ -public final class RepeatedUnique extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedUnique) - RepeatedUniqueOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedUnique.class.getName()); - } - // Use RepeatedUnique.newBuilder() to construct. - private RepeatedUnique(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedUnique() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedUnique_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedUnique_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedUnique.class, build.buf.validate.conformance.cases.RepeatedUnique.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RepeatedUnique)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedUnique other = (build.buf.validate.conformance.cases.RepeatedUnique) 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.RepeatedUnique parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedUnique 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.RepeatedUnique parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedUnique 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.RepeatedUnique parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedUnique 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.RepeatedUnique parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedUnique 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.RepeatedUnique parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedUnique 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.RepeatedUnique 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.RepeatedUnique 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.RepeatedUnique 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.RepeatedUnique} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedUnique) - build.buf.validate.conformance.cases.RepeatedUniqueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedUnique_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedUnique_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedUnique.class, build.buf.validate.conformance.cases.RepeatedUnique.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedUnique.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RepeatedProto.internal_static_buf_validate_conformance_cases_RepeatedUnique_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedUnique getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedUnique.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedUnique build() { - build.buf.validate.conformance.cases.RepeatedUnique result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedUnique buildPartial() { - build.buf.validate.conformance.cases.RepeatedUnique result = new build.buf.validate.conformance.cases.RepeatedUnique(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedUnique result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedUnique) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedUnique)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedUnique other) { - if (other == build.buf.validate.conformance.cases.RepeatedUnique.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedUnique) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedUnique) - private static final build.buf.validate.conformance.cases.RepeatedUnique DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedUnique(); - } - - public static build.buf.validate.conformance.cases.RepeatedUnique getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedUnique 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.RepeatedUnique getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUniqueOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUniqueOrBuilder.java deleted file mode 100644 index de218d1f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedUniqueOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/repeated.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedUniqueOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedUnique) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefined.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefined.java deleted file mode 100644 index 1a252fef..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefined.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined} - */ -public final class RepeatedYetAnotherExternalEnumDefined extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) - RepeatedYetAnotherExternalEnumDefinedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedYetAnotherExternalEnumDefined.class.getName()); - } - // Use RepeatedYetAnotherExternalEnumDefined.newBuilder() to construct. - private RepeatedYetAnotherExternalEnumDefined(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RepeatedYetAnotherExternalEnumDefined() { - val_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.class, build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList val_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated> val_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated>() { - public build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated convert(int from) { - build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated result = build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated.forNumber(from); - return result == null ? build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated.UNRECOGNIZED : result; - } - }; - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - @java.lang.Override - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - @java.lang.Override - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - @java.lang.Override - public java.util.List - getValValueList() { - return val_; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - @java.lang.Override - public int getValValue(int index) { - return val_.getInt(index); - } - private int valMemoizedSerializedSize; - - 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 { - getSerializedSize(); - if (getValList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(valMemoizedSerializedSize); - } - for (int i = 0; i < val_.size(); i++) { - output.writeEnumNoTag(val_.getInt(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(val_.getInt(i)); - } - size += dataSize; - if (!getValList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }valMemoizedSerializedSize = dataSize; - } - 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.RepeatedYetAnotherExternalEnumDefined)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined other = (build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) obj; - - if (!val_.equals(other.val_)) 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) + val_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) - build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefinedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.class, build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.EnumsProto.internal_static_buf_validate_conformance_cases_RepeatedYetAnotherExternalEnumDefined_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined build() { - build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined buildPartial() { - build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined result = new build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined result) { - if (((bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.val_ = val_; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) { - return mergeFrom((build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined other) { - if (other == build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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 8: { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int tmpRaw = input.readEnum(); - ensureValIsMutable(); - val_.addInt(tmpRaw); - } - input.popLimit(oldLimit); - 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.Internal.IntList val_ = - emptyIntList(); - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - val_ = makeMutableCopy(val_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public java.util.List getValList() { - return new com.google.protobuf.Internal.IntListAdapter< - build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated>(val_, val_converter_); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated getVal(int index) { - return val_converter_.convert(val_.getInt(index)); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal(build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValIsMutable(); - val_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - for (build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated value : values) { - val_.addInt(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - public java.util.List - getValValueList() { - return java.util.Collections.unmodifiableList(val_); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - public int getValValue(int index) { - return val_.getInt(index); - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for val to set. - * @return This builder for chaining. - */ - public Builder setValValue( - int index, int value) { - ensureValIsMutable(); - val_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addValValue(int value) { - ensureValIsMutable(); - val_.addInt(value); - onChanged(); - return this; - } - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The enum numeric values on the wire for val to add. - * @return This builder for chaining. - */ - public Builder addAllValValue( - java.lang.Iterable values) { - ensureValIsMutable(); - for (int value : values) { - val_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) - private static final build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined(); - } - - public static build.buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedYetAnotherExternalEnumDefined 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.RepeatedYetAnotherExternalEnumDefined getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefinedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefinedOrBuilder.java deleted file mode 100644 index 9aa0c2f8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RepeatedYetAnotherExternalEnumDefinedOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RepeatedYetAnotherExternalEnumDefinedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RepeatedYetAnotherExternalEnumDefined) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List getValList(); - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - build.buf.validate.conformance.cases.yet_another_package.Embed.Enumerated getVal(int index); - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the enum numeric values on the wire for val. - */ - java.util.List - getValValueList(); - /** - * repeated .buf.validate.conformance.cases.yet_another_package.Embed.Enumerated val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The enum numeric value on the wire of val at the given index. - */ - int getValValue(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMap.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMap.java deleted file mode 100644 index 6694c665..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMap.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMap} - */ -public final class RequiredEditionsMap extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMap) - RequiredEditionsMapOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsMap.class.getName()); - } - // Use RequiredEditionsMap.newBuilder() to construct. - private RequiredEditionsMap(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsMap() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMap_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMap.class, build.buf.validate.conformance.cases.RequiredEditionsMap.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMap_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.RequiredEditionsMap)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMap other = (build.buf.validate.conformance.cases.RequiredEditionsMap) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMap parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMap 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.RequiredEditionsMap parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMap 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.RequiredEditionsMap parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMap 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.RequiredEditionsMap parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMap 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.RequiredEditionsMap parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMap 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.RequiredEditionsMap 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.RequiredEditionsMap 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.RequiredEditionsMap 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.RequiredEditionsMap} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMap) - build.buf.validate.conformance.cases.RequiredEditionsMapOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMap_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMap.class, build.buf.validate.conformance.cases.RequiredEditionsMap.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMap.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMap getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMap.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMap build() { - build.buf.validate.conformance.cases.RequiredEditionsMap result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMap buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMap result = new build.buf.validate.conformance.cases.RequiredEditionsMap(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMap result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredEditionsMap) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMap)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMap other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMap.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMap) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMap) - private static final build.buf.validate.conformance.cases.RequiredEditionsMap DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMap(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMap getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsMap 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.RequiredEditionsMap getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMapOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMapOrBuilder.java deleted file mode 100644 index 122842d1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMapOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsMapOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMap) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresence.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresence.java deleted file mode 100644 index c372428b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresence.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence} - */ -public final class RequiredEditionsMessageExplicitPresence extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence) - RequiredEditionsMessageExplicitPresenceOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsMessageExplicitPresence.class.getName()); - } - // Use RequiredEditionsMessageExplicitPresence.newBuilder() to construct. - private RequiredEditionsMessageExplicitPresence(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsMessageExplicitPresence() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsMessageExplicitPresence.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg other = (build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg) 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.RequiredEditionsMessageExplicitPresence.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg 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.RequiredEditionsMessageExplicitPresence.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg) - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg result = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsMessageExplicitPresence.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.RequiredEditionsMessageExplicitPresence.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.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.RequiredEditionsMessageExplicitPresence)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence other = (build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence) 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.RequiredEditionsMessageExplicitPresence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence) - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.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.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence result = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.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 build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg 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; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsMessageExplicitPresence 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.RequiredEditionsMessageExplicitPresence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimited.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimited.java deleted file mode 100644 index 8610e6d9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimited.java +++ /dev/null @@ -1,1097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited} - */ -public final class RequiredEditionsMessageExplicitPresenceDelimited extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited) - RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsMessageExplicitPresenceDelimited.class.getName()); - } - // Use RequiredEditionsMessageExplicitPresenceDelimited.newBuilder() to construct. - private RequiredEditionsMessageExplicitPresenceDelimited(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsMessageExplicitPresenceDelimited() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg other = (build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg) 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg) - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg result = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.RequiredEditionsMessageExplicitPresenceDelimited.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.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.writeGroup(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 - .computeGroupSize(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.RequiredEditionsMessageExplicitPresenceDelimited)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited other = (build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited) 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.RequiredEditionsMessageExplicitPresenceDelimited parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited) - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.class, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.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.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited result = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsMessageExplicitPresenceDelimited 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.RequiredEditionsMessageExplicitPresenceDelimited getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder.java deleted file mode 100644 index 718b87f0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsMessageExplicitPresenceDelimitedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg getVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresenceDelimited.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceOrBuilder.java deleted file mode 100644 index 842ea87f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageExplicitPresenceOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsMessageExplicitPresenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg getVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageExplicitPresence.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequired.java deleted file mode 100644 index 733956d3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequired.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired} - */ -public final class RequiredEditionsMessageLegacyRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired) - RequiredEditionsMessageLegacyRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsMessageLegacyRequired.class.getName()); - } - // Use RequiredEditionsMessageLegacyRequired.newBuilder() to construct. - private RequiredEditionsMessageLegacyRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsMessageLegacyRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsMessageLegacyRequired.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg other = (build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg) 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.RequiredEditionsMessageLegacyRequired.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg 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.RequiredEditionsMessageLegacyRequired.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg) - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg result = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsMessageLegacyRequired.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.RequiredEditionsMessageLegacyRequired.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.RequiredEditionsMessageLegacyRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired other = (build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired) 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.RequiredEditionsMessageLegacyRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired) - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.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.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired result = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsMessageLegacyRequired 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.RequiredEditionsMessageLegacyRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimited.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimited.java deleted file mode 100644 index d56edb2e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimited.java +++ /dev/null @@ -1,1104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited} - */ -public final class RequiredEditionsMessageLegacyRequiredDelimited extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited) - RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsMessageLegacyRequiredDelimited.class.getName()); - } - // Use RequiredEditionsMessageLegacyRequiredDelimited.newBuilder() to construct. - private RequiredEditionsMessageLegacyRequiredDelimited(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsMessageLegacyRequiredDelimited() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg other = (build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg) 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg) - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg result = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.RequiredEditionsMessageLegacyRequiredDelimited.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.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; - - if (!hasVal()) { - memoizedIsInitialized = 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.writeGroup(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 - .computeGroupSize(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.RequiredEditionsMessageLegacyRequiredDelimited)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited other = (build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited) 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.RequiredEditionsMessageLegacyRequiredDelimited parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited) - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.class, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.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.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited build() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited result = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.getDefaultInstance()) return this; - if (other.hasVal()) { - mergeVal(other.getVal()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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 11: { - input.readGroup(1, - getValFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 11 - 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 build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - public build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg.Builder, build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited) - private static final build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsMessageLegacyRequiredDelimited 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.RequiredEditionsMessageLegacyRequiredDelimited getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder.java deleted file mode 100644 index 926ebc7b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsMessageLegacyRequiredDelimitedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg getVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequiredDelimited.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredOrBuilder.java deleted file mode 100644 index a2f40d2e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsMessageLegacyRequiredOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsMessageLegacyRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg getVal(); - /** - * .buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.Msg val = 1 [json_name = "val", features = { ... } - */ - build.buf.validate.conformance.cases.RequiredEditionsMessageLegacyRequired.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneof.java deleted file mode 100644 index c55103d7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneof.java +++ /dev/null @@ -1,786 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsOneof} - */ -public final class RequiredEditionsOneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsOneof) - RequiredEditionsOneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsOneof.class.getName()); - } - // Use RequiredEditionsOneof.newBuilder() to construct. - private RequiredEditionsOneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsOneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsOneof.class, build.buf.validate.conformance.cases.RequiredEditionsOneof.Builder.class); - } - - private int valCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object val_; - public enum ValCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - A(1), - B(2), - VAL_NOT_SET(0); - private final int value; - private ValCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValCase valueOf(int value) { - return forNumber(value); - } - - public static ValCase forNumber(int value) { - switch (value) { - case 1: return A; - case 2: return B; - case 0: return VAL_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValCase - getValCase() { - return ValCase.forNumber( - valCase_); - } - - public static final int A_FIELD_NUMBER = 1; - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - public boolean hasA() { - return valCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - public java.lang.String getA() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 1) { - val_ = s; - } - return s; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 1) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int B_FIELD_NUMBER = 2; - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - public boolean hasB() { - return valCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - public java.lang.String getB() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 2) { - val_ = s; - } - return s; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 2) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (valCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - if (valCase_ == 2) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - if (valCase_ == 2) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, val_); - } - 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.RequiredEditionsOneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsOneof other = (build.buf.validate.conformance.cases.RequiredEditionsOneof) obj; - - if (!getValCase().equals(other.getValCase())) return false; - switch (valCase_) { - case 1: - if (!getA() - .equals(other.getA())) return false; - break; - case 2: - if (!getB() - .equals(other.getB())) return false; - break; - case 0: - default: - } - 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(); - switch (valCase_) { - case 1: - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA().hashCode(); - break; - case 2: - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RequiredEditionsOneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsOneof 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.RequiredEditionsOneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsOneof 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.RequiredEditionsOneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsOneof 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.RequiredEditionsOneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsOneof 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.RequiredEditionsOneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsOneof 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.RequiredEditionsOneof 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.RequiredEditionsOneof 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.RequiredEditionsOneof 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.RequiredEditionsOneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsOneof) - build.buf.validate.conformance.cases.RequiredEditionsOneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsOneof.class, build.buf.validate.conformance.cases.RequiredEditionsOneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsOneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valCase_ = 0; - val_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsOneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsOneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsOneof build() { - build.buf.validate.conformance.cases.RequiredEditionsOneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsOneof buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsOneof result = new build.buf.validate.conformance.cases.RequiredEditionsOneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsOneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.RequiredEditionsOneof result) { - result.valCase_ = valCase_; - result.val_ = this.val_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredEditionsOneof) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsOneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsOneof other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsOneof.getDefaultInstance()) return this; - switch (other.getValCase()) { - case A: { - valCase_ = 1; - val_ = other.val_; - onChanged(); - break; - } - case B: { - valCase_ = 2; - val_ = other.val_; - onChanged(); - break; - } - case VAL_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - valCase_ = 1; - val_ = s; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - valCase_ = 2; - val_ = s; - break; - } // case 18 - 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 valCase_ = 0; - private java.lang.Object val_; - public ValCase - getValCase() { - return ValCase.forNumber( - valCase_); - } - - public Builder clearVal() { - valCase_ = 0; - val_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return valCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public java.lang.String getA() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 1) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 1) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 1; - val_ = value; - onChanged(); - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - if (valCase_ == 1) { - valCase_ = 0; - val_ = null; - onChanged(); - } - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The bytes for a to set. - * @return This builder for chaining. - */ - public Builder setABytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - valCase_ = 1; - val_ = value; - onChanged(); - return this; - } - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return valCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public java.lang.String getB() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 2) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 2) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 2; - val_ = value; - onChanged(); - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - if (valCase_ == 2) { - valCase_ = 0; - val_ = null; - onChanged(); - } - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @param value The bytes for b to set. - * @return This builder for chaining. - */ - public Builder setBBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - valCase_ = 2; - val_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsOneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsOneof) - private static final build.buf.validate.conformance.cases.RequiredEditionsOneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsOneof(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsOneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsOneof 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.RequiredEditionsOneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneofOrBuilder.java deleted file mode 100644 index 87aa915e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsOneofOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsOneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsOneof) - com.google.protobuf.MessageOrBuilder { - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - boolean hasA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - java.lang.String getA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - com.google.protobuf.ByteString - getABytes(); - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - java.lang.String getB(); - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - com.google.protobuf.ByteString - getBBytes(); - - build.buf.validate.conformance.cases.RequiredEditionsOneof.ValCase getValCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeated.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeated.java deleted file mode 100644 index 82eee5aa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeated.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsRepeated} - */ -public final class RequiredEditionsRepeated extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsRepeated) - RequiredEditionsRepeatedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsRepeated.class.getName()); - } - // Use RequiredEditionsRepeated.newBuilder() to construct. - private RequiredEditionsRepeated(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsRepeated() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsRepeated.class, build.buf.validate.conformance.cases.RequiredEditionsRepeated.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RequiredEditionsRepeated)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsRepeated other = (build.buf.validate.conformance.cases.RequiredEditionsRepeated) 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.RequiredEditionsRepeated parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeated 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.RequiredEditionsRepeated parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeated 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.RequiredEditionsRepeated parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeated 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.RequiredEditionsRepeated parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeated 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.RequiredEditionsRepeated parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsRepeated 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.RequiredEditionsRepeated 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.RequiredEditionsRepeated 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.RequiredEditionsRepeated 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.RequiredEditionsRepeated} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsRepeated) - build.buf.validate.conformance.cases.RequiredEditionsRepeatedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsRepeated.class, build.buf.validate.conformance.cases.RequiredEditionsRepeated.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsRepeated.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsRepeated getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsRepeated.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsRepeated build() { - build.buf.validate.conformance.cases.RequiredEditionsRepeated result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsRepeated buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsRepeated result = new build.buf.validate.conformance.cases.RequiredEditionsRepeated(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsRepeated result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredEditionsRepeated) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsRepeated)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsRepeated other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsRepeated.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsRepeated) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsRepeated) - private static final build.buf.validate.conformance.cases.RequiredEditionsRepeated DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsRepeated(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsRepeated getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsRepeated 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.RequiredEditionsRepeated getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpanded.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpanded.java deleted file mode 100644 index 75c613ef..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpanded.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded} - */ -public final class RequiredEditionsRepeatedExpanded extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) - RequiredEditionsRepeatedExpandedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsRepeatedExpanded.class.getName()); - } - // Use RequiredEditionsRepeatedExpanded.newBuilder() to construct. - private RequiredEditionsRepeatedExpanded(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsRepeatedExpanded() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.class, build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RequiredEditionsRepeatedExpanded)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded other = (build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) 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.RequiredEditionsRepeatedExpanded parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) - build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpandedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.class, build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded build() { - build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded result = new build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) - private static final build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsRepeatedExpanded 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.RequiredEditionsRepeatedExpanded getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpandedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpandedOrBuilder.java deleted file mode 100644 index 08488ad2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedExpandedOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsRepeatedExpandedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsRepeatedExpanded) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", features = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedOrBuilder.java deleted file mode 100644 index 0d944cad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsRepeatedOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsRepeatedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsRepeated) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresence.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresence.java deleted file mode 100644 index 4ca6c785..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresence.java +++ /dev/null @@ -1,525 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence} - */ -public final class RequiredEditionsScalarExplicitPresence extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence) - RequiredEditionsScalarExplicitPresenceOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsScalarExplicitPresence.class.getName()); - } - // Use RequiredEditionsScalarExplicitPresence.newBuilder() to construct. - private RequiredEditionsScalarExplicitPresence(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsScalarExplicitPresence() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.class, build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string 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); - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsScalarExplicitPresence)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence other = (build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence) 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.RequiredEditionsScalarExplicitPresence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence) - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.class, build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence build() { - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence result = new build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsScalarExplicitPresence) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence) - private static final build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsScalarExplicitPresence 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.RequiredEditionsScalarExplicitPresence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefault.java deleted file mode 100644 index 39467fc0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefault.java +++ /dev/null @@ -1,525 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault} - */ -public final class RequiredEditionsScalarExplicitPresenceDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault) - RequiredEditionsScalarExplicitPresenceDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsScalarExplicitPresenceDefault.class.getName()); - } - // Use RequiredEditionsScalarExplicitPresenceDefault.newBuilder() to construct. - private RequiredEditionsScalarExplicitPresenceDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsScalarExplicitPresenceDefault() { - val_ = "foo"; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.class, build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = "foo"; - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsScalarExplicitPresenceDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault other = (build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault) 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.RequiredEditionsScalarExplicitPresenceDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault) - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.class, build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = "foo"; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault build() { - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault result = new build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsScalarExplicitPresenceDefault) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = "foo"; - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault) - private static final build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsScalarExplicitPresenceDefault 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.RequiredEditionsScalarExplicitPresenceDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefaultOrBuilder.java deleted file mode 100644 index 4fc06a12..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsScalarExplicitPresenceDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresenceDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceOrBuilder.java deleted file mode 100644 index 65d9ba46..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarExplicitPresenceOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsScalarExplicitPresenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsScalarExplicitPresence) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresence.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresence.java deleted file mode 100644 index a3c889de..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresence.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence} - */ -public final class RequiredEditionsScalarImplicitPresence extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) - RequiredEditionsScalarImplicitPresenceOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsScalarImplicitPresence.class.getName()); - } - // Use RequiredEditionsScalarImplicitPresence.newBuilder() to construct. - private RequiredEditionsScalarImplicitPresence(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsScalarImplicitPresence() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.class, build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsScalarImplicitPresence)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence other = (build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) obj; - - 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(); - 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.RequiredEditionsScalarImplicitPresence parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) - build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.class, build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence build() { - build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence result = new build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) - private static final build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsScalarImplicitPresence 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.RequiredEditionsScalarImplicitPresence getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresenceOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresenceOrBuilder.java deleted file mode 100644 index 36365fa1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarImplicitPresenceOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsScalarImplicitPresenceOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsScalarImplicitPresence) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequired.java deleted file mode 100644 index cf3cd2e0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequired.java +++ /dev/null @@ -1,532 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired} - */ -public final class RequiredEditionsScalarLegacyRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired) - RequiredEditionsScalarLegacyRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredEditionsScalarLegacyRequired.class.getName()); - } - // Use RequiredEditionsScalarLegacyRequired.newBuilder() to construct. - private RequiredEditionsScalarLegacyRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredEditionsScalarLegacyRequired() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.class, build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasVal()) { - memoizedIsInitialized = 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredEditionsScalarLegacyRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired other = (build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired) 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.RequiredEditionsScalarLegacyRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired) - build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.class, build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProtoEditionsProto.internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired build() { - build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired buildPartial() { - build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired result = new build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredEditionsScalarLegacyRequired) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired other) { - if (other == build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", features = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired) - private static final build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired(); - } - - public static build.buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredEditionsScalarLegacyRequired 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.RequiredEditionsScalarLegacyRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequiredOrBuilder.java deleted file mode 100644 index e495ed53..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredEditionsScalarLegacyRequiredOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredEditionsScalarLegacyRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredEditionsScalarLegacyRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", features = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", features = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto2Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto2Proto.java deleted file mode 100644 index 6a1d399e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto2Proto.java +++ /dev/null @@ -1,176 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class RequiredFieldProto2Proto { - private RequiredFieldProto2Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredFieldProto2Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2Message_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2Map_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto2Map_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto2Map_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n:buf/validate/conformance/cases/require" + - "d_field_proto2.proto\022\036buf.validate.confo" + - "rmance.cases\032\033buf/validate/validate.prot" + - "o\"8\n\034RequiredProto2ScalarOptional\022\030\n\003val" + - "\030\001 \001(\tB\006\272H\003\310\001\001R\003val\"D\n#RequiredProto2Sca" + - "larOptionalDefault\022\035\n\003val\030\001 \001(\t:\003fooB\006\272H" + - "\003\310\001\001R\003val\"8\n\034RequiredProto2ScalarRequire" + - "d\022\030\n\003val\030\001 \002(\tB\006\272H\003\310\001\001R\003val\"\205\001\n\025Required" + - "Proto2Message\022S\n\003val\030\001 \001(\01329.buf.validat" + - "e.conformance.cases.RequiredProto2Messag" + - "e.MsgB\006\272H\003\310\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003" + - "val\"D\n\023RequiredProto2Oneof\022\026\n\001a\030\001 \001(\tB\006\272" + - "H\003\310\001\001H\000R\001a\022\016\n\001b\030\002 \001(\tH\000R\001bB\005\n\003val\"2\n\026Req" + - "uiredProto2Repeated\022\030\n\003val\030\001 \003(\tB\006\272H\003\310\001\001" + - "R\003val\"\241\001\n\021RequiredProto2Map\022T\n\003val\030\001 \003(\013" + - "2:.buf.validate.conformance.cases.Requir" + - "edProto2Map.ValEntryB\006\272H\003\310\001\001R\003val\0326\n\010Val" + - "Entry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005" + - "value:\0028\001B\334\001\n$build.buf.validate.conform" + - "ance.casesB\030RequiredFieldProto2ProtoP\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, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_RequiredProto2Message_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_descriptor = - internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_descriptor, - new java.lang.String[] { "A", "B", "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_RequiredProto2Map_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto2Map_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredProto2Map_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto2Map_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto3Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto3Proto.java deleted file mode 100644 index 5e1b966f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProto3Proto.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class RequiredFieldProto3Proto { - private RequiredFieldProto3Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredFieldProto3Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3Message_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3Map_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredProto3Map_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredProto3Map_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n:buf/validate/conformance/cases/require" + - "d_field_proto3.proto\022\036buf.validate.confo" + - "rmance.cases\032\033buf/validate/validate.prot" + - "o\"0\n\024RequiredProto3Scalar\022\030\n\003val\030\001 \001(\tB\006" + - "\272H\003\310\001\001R\003val\"E\n\034RequiredProto3OptionalSca" + - "lar\022\035\n\003val\030\001 \001(\tB\006\272H\003\310\001\001H\000R\003val\210\001\001B\006\n\004_v" + - "al\"\205\001\n\025RequiredProto3Message\022S\n\003val\030\001 \001(" + - "\01329.buf.validate.conformance.cases.Requi" + - "redProto3Message.MsgB\006\272H\003\310\001\001R\003val\032\027\n\003Msg" + - "\022\020\n\003val\030\001 \001(\tR\003val\"D\n\023RequiredProto3OneO" + - "f\022\026\n\001a\030\001 \001(\tB\006\272H\003\310\001\001H\000R\001a\022\016\n\001b\030\002 \001(\tH\000R\001" + - "bB\005\n\003val\"2\n\026RequiredProto3Repeated\022\030\n\003va" + - "l\030\001 \003(\tB\006\272H\003\310\001\001R\003val\"\241\001\n\021RequiredProto3M" + - "ap\022T\n\003val\030\001 \003(\0132:.buf.validate.conforman" + - "ce.cases.RequiredProto3Map.ValEntryB\006\272H\003" + - "\310\001\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024" + - "\n\005value\030\002 \001(\tR\005value:\0028\001B\334\001\n$build.buf.v" + - "alidate.conformance.casesB\030RequiredField" + - "Proto3ProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conf" + - "ormance.Cases\312\002\036Buf\\Validate\\Conformance" + - "\\Cases\342\002*Buf\\Validate\\Conformance\\Cases\\" + - "GPBMetadata\352\002!Buf::Validate::Conformance" + - "::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_RequiredProto3Message_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_descriptor = - internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_descriptor, - new java.lang.String[] { "A", "B", "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_RequiredProto3Map_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredProto3Map_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredProto3Map_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredProto3Map_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProtoEditionsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProtoEditionsProto.java deleted file mode 100644 index 868b19c6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredFieldProtoEditionsProto.java +++ /dev/null @@ -1,284 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto_editions.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class RequiredFieldProtoEditionsProto { - private RequiredFieldProtoEditionsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredFieldProtoEditionsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_ValEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_ValEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\nBbuf/validate/conformance/cases/require" + - "d_field_proto_editions.proto\022\036buf.valida" + - "te.conformance.cases\032\033buf/validate/valid" + - "ate.proto\"B\n&RequiredEditionsScalarExpli" + - "citPresence\022\030\n\003val\030\001 \001(\tB\006\272H\003\310\001\001R\003val\"N\n" + - "-RequiredEditionsScalarExplicitPresenceD" + - "efault\022\035\n\003val\030\001 \001(\t:\003fooB\006\272H\003\310\001\001R\003val\"G\n" + - "&RequiredEditionsScalarImplicitPresence\022" + - "\035\n\003val\030\001 \001(\tB\013\252\001\002\010\002\272H\003\310\001\001R\003val\"E\n$Requir" + - "edEditionsScalarLegacyRequired\022\035\n\003val\030\001 " + - "\001(\tB\013\252\001\002\010\003\272H\003\310\001\001R\003val\"\251\001\n\'RequiredEditio" + - "nsMessageExplicitPresence\022e\n\003val\030\001 \001(\0132K" + - ".buf.validate.conformance.cases.Required" + - "EditionsMessageExplicitPresence.MsgB\006\272H\003" + - "\310\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\300\001\n0Re" + - "quiredEditionsMessageExplicitPresenceDel" + - "imited\022s\n\003val\030\001 \001(\0132T.buf.validate.confo" + - "rmance.cases.RequiredEditionsMessageExpl" + - "icitPresenceDelimited.MsgB\013\252\001\002(\002\272H\003\310\001\001R\003" + - "val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"\252\001\n%Require" + - "dEditionsMessageLegacyRequired\022h\n\003val\030\001 " + - "\001(\0132I.buf.validate.conformance.cases.Req" + - "uiredEditionsMessageLegacyRequired.MsgB\013" + - "\252\001\002\010\003\272H\003\310\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003va" + - "l\"\276\001\n.RequiredEditionsMessageLegacyRequi" + - "redDelimited\022s\n\003val\030\001 \001(\0132R.buf.validate" + - ".conformance.cases.RequiredEditionsMessa" + - "geLegacyRequiredDelimited.MsgB\r\252\001\004\010\003(\002\272H" + - "\003\310\001\001R\003val\032\027\n\003Msg\022\020\n\003val\030\001 \001(\tR\003val\"F\n\025Re" + - "quiredEditionsOneof\022\026\n\001a\030\001 \001(\tB\006\272H\003\310\001\001H\000" + - "R\001a\022\016\n\001b\030\002 \001(\tH\000R\001bB\005\n\003val\"4\n\030RequiredEd" + - "itionsRepeated\022\030\n\003val\030\001 \003(\tB\006\272H\003\310\001\001R\003val" + - "\"A\n RequiredEditionsRepeatedExpanded\022\035\n\003" + - "val\030\001 \003(\tB\013\252\001\002\030\002\272H\003\310\001\001R\003val\"\245\001\n\023Required" + - "EditionsMap\022V\n\003val\030\001 \003(\0132<.buf.validate." + - "conformance.cases.RequiredEditionsMap.Va" + - "lEntryB\006\272H\003\310\001\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001" + - " \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001B\343\001\n$" + - "build.buf.validate.conformance.casesB\037Re" + - "quiredFieldProtoEditionsProtoP\001\242\002\004BVCC\252\002" + - "\036Buf.Validate.Conformance.Cases\312\002\036Buf\\Va" + - "lidate\\Conformance\\Cases\342\002*Buf\\Validate\\" + - "Conformance\\Cases\\GPBMetadata\352\002!Buf::Val" + - "idate::Conformance::Casesb\010editionsp\350\007" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresence_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarExplicitPresenceDefault_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarImplicitPresence_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsScalarLegacyRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_descriptor = - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresence_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_descriptor = - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageExplicitPresenceDelimited_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_descriptor = - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequired_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_descriptor = - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMessageLegacyRequiredDelimited_Msg_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsOneof_descriptor, - new java.lang.String[] { "A", "B", "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeated_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsRepeatedExpanded_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_ValEntry_descriptor = - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_ValEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_RequiredEditionsMap_ValEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Map.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Map.java deleted file mode 100644 index ec37e042..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Map.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2Map} - */ -public final class RequiredProto2Map extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2Map) - RequiredProto2MapOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2Map.class.getName()); - } - // Use RequiredProto2Map.newBuilder() to construct. - private RequiredProto2Map(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2Map() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Map.class, build.buf.validate.conformance.cases.RequiredProto2Map.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Map_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.RequiredProto2Map)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2Map other = (build.buf.validate.conformance.cases.RequiredProto2Map) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RequiredProto2Map parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Map 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.RequiredProto2Map parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Map 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.RequiredProto2Map parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Map 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.RequiredProto2Map parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2Map 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.RequiredProto2Map parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Map 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.RequiredProto2Map 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.RequiredProto2Map 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.RequiredProto2Map 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.RequiredProto2Map} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2Map) - build.buf.validate.conformance.cases.RequiredProto2MapOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Map.class, build.buf.validate.conformance.cases.RequiredProto2Map.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2Map.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Map_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Map getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2Map.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Map build() { - build.buf.validate.conformance.cases.RequiredProto2Map result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Map buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2Map result = new build.buf.validate.conformance.cases.RequiredProto2Map(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2Map result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto2Map) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2Map)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2Map other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2Map.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2Map) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2Map) - private static final build.buf.validate.conformance.cases.RequiredProto2Map DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2Map(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Map getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2Map 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.RequiredProto2Map getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MapOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MapOrBuilder.java deleted file mode 100644 index 7c9b2ac8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MapOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2MapOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2Map) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Message.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Message.java deleted file mode 100644 index 78a84fe6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Message.java +++ /dev/null @@ -1,1100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2Message} - */ -public final class RequiredProto2Message extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2Message) - RequiredProto2MessageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2Message.class.getName()); - } - // Use RequiredProto2Message.newBuilder() to construct. - private RequiredProto2Message(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2Message() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Message.class, build.buf.validate.conformance.cases.RequiredProto2Message.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2Message.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2Message.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2Message.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Message.Msg.class, build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto2Message.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2Message.Msg other = (build.buf.validate.conformance.cases.RequiredProto2Message.Msg) 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.RequiredProto2Message.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg 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.RequiredProto2Message.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2Message.Msg) - build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Message.Msg.class, build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2Message.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2Message.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message.Msg build() { - build.buf.validate.conformance.cases.RequiredProto2Message.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message.Msg buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2Message.Msg result = new build.buf.validate.conformance.cases.RequiredProto2Message.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2Message.Msg result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredProto2Message.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2Message.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2Message.Msg other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2Message.Msg.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2Message.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2Message.Msg) - private static final build.buf.validate.conformance.cases.RequiredProto2Message.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2Message.Msg(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Message.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.RequiredProto2Message.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.RequiredProto2Message.Msg val_; - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg 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 .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredProto2Message.Msg.getDefaultInstance() : val_; - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredProto2Message.Msg.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.RequiredProto2Message)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2Message other = (build.buf.validate.conformance.cases.RequiredProto2Message) 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.RequiredProto2Message parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message 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.RequiredProto2Message parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message 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.RequiredProto2Message parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message 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.RequiredProto2Message parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2Message 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.RequiredProto2Message parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Message 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.RequiredProto2Message 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.RequiredProto2Message 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.RequiredProto2Message 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.RequiredProto2Message} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2Message) - build.buf.validate.conformance.cases.RequiredProto2MessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Message.class, build.buf.validate.conformance.cases.RequiredProto2Message.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2Message.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.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Message_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2Message.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message build() { - build.buf.validate.conformance.cases.RequiredProto2Message result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Message buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2Message result = new build.buf.validate.conformance.cases.RequiredProto2Message(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2Message 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.RequiredProto2Message) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2Message)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2Message other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2Message.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 build.buf.validate.conformance.cases.RequiredProto2Message.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredProto2Message.Msg, build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder, build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder> valBuilder_; - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.RequiredProto2Message.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.RequiredProto2Message.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.RequiredProto2Message.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.RequiredProto2Message.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.RequiredProto2Message.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg 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 .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.RequiredProto2Message.Msg.getDefaultInstance() : val_; - } - } - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredProto2Message.Msg, build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder, build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredProto2Message.Msg, build.buf.validate.conformance.cases.RequiredProto2Message.Msg.Builder, build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2Message) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2Message) - private static final build.buf.validate.conformance.cases.RequiredProto2Message DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2Message(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Message getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2Message 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.RequiredProto2Message getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MessageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MessageOrBuilder.java deleted file mode 100644 index b8256047..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2MessageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2MessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2Message) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.RequiredProto2Message.Msg getVal(); - /** - * optional .buf.validate.conformance.cases.RequiredProto2Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.RequiredProto2Message.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Oneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Oneof.java deleted file mode 100644 index 6c54f4ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Oneof.java +++ /dev/null @@ -1,788 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2Oneof} - */ -public final class RequiredProto2Oneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2Oneof) - RequiredProto2OneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2Oneof.class.getName()); - } - // Use RequiredProto2Oneof.newBuilder() to construct. - private RequiredProto2Oneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2Oneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Oneof.class, build.buf.validate.conformance.cases.RequiredProto2Oneof.Builder.class); - } - - private int valCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object val_; - public enum ValCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - A(1), - B(2), - VAL_NOT_SET(0); - private final int value; - private ValCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValCase valueOf(int value) { - return forNumber(value); - } - - public static ValCase forNumber(int value) { - switch (value) { - case 1: return A; - case 2: return B; - case 0: return VAL_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValCase - getValCase() { - return ValCase.forNumber( - valCase_); - } - - public static final int A_FIELD_NUMBER = 1; - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - public boolean hasA() { - return valCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - public java.lang.String getA() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8() && (valCase_ == 1)) { - val_ = s; - } - return s; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 1) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int B_FIELD_NUMBER = 2; - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - public boolean hasB() { - return valCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - public java.lang.String getB() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8() && (valCase_ == 2)) { - val_ = s; - } - return s; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 2) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (valCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - if (valCase_ == 2) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - if (valCase_ == 2) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, val_); - } - 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.RequiredProto2Oneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2Oneof other = (build.buf.validate.conformance.cases.RequiredProto2Oneof) obj; - - if (!getValCase().equals(other.getValCase())) return false; - switch (valCase_) { - case 1: - if (!getA() - .equals(other.getA())) return false; - break; - case 2: - if (!getB() - .equals(other.getB())) return false; - break; - case 0: - default: - } - 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(); - switch (valCase_) { - case 1: - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA().hashCode(); - break; - case 2: - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RequiredProto2Oneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Oneof 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.RequiredProto2Oneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Oneof 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.RequiredProto2Oneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Oneof 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.RequiredProto2Oneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2Oneof 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.RequiredProto2Oneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Oneof 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.RequiredProto2Oneof 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.RequiredProto2Oneof 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.RequiredProto2Oneof 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.RequiredProto2Oneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2Oneof) - build.buf.validate.conformance.cases.RequiredProto2OneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Oneof.class, build.buf.validate.conformance.cases.RequiredProto2Oneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2Oneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valCase_ = 0; - val_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Oneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Oneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2Oneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Oneof build() { - build.buf.validate.conformance.cases.RequiredProto2Oneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Oneof buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2Oneof result = new build.buf.validate.conformance.cases.RequiredProto2Oneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2Oneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.RequiredProto2Oneof result) { - result.valCase_ = valCase_; - result.val_ = this.val_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto2Oneof) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2Oneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2Oneof other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2Oneof.getDefaultInstance()) return this; - switch (other.getValCase()) { - case A: { - valCase_ = 1; - val_ = other.val_; - onChanged(); - break; - } - case B: { - valCase_ = 2; - val_ = other.val_; - onChanged(); - break; - } - case VAL_NOT_SET: { - break; - } - } - 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.ByteString bs = input.readBytes(); - valCase_ = 1; - val_ = bs; - break; - } // case 10 - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - valCase_ = 2; - val_ = bs; - break; - } // case 18 - 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 valCase_ = 0; - private java.lang.Object val_; - public ValCase - getValCase() { - return ValCase.forNumber( - valCase_); - } - - public Builder clearVal() { - valCase_ = 0; - val_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return valCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public java.lang.String getA() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 1) { - if (bs.isValidUtf8()) { - val_ = s; - } - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 1) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 1; - val_ = value; - onChanged(); - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - if (valCase_ == 1) { - valCase_ = 0; - val_ = null; - onChanged(); - } - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The bytes for a to set. - * @return This builder for chaining. - */ - public Builder setABytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 1; - val_ = value; - onChanged(); - return this; - } - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return valCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public java.lang.String getB() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 2) { - if (bs.isValidUtf8()) { - val_ = s; - } - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 2) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 2; - val_ = value; - onChanged(); - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - if (valCase_ == 2) { - valCase_ = 0; - val_ = null; - onChanged(); - } - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @param value The bytes for b to set. - * @return This builder for chaining. - */ - public Builder setBBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 2; - val_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2Oneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2Oneof) - private static final build.buf.validate.conformance.cases.RequiredProto2Oneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2Oneof(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Oneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2Oneof 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.RequiredProto2Oneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2OneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2OneofOrBuilder.java deleted file mode 100644 index 2892db80..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2OneofOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2OneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2Oneof) - com.google.protobuf.MessageOrBuilder { - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - boolean hasA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - java.lang.String getA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - com.google.protobuf.ByteString - getABytes(); - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - java.lang.String getB(); - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - com.google.protobuf.ByteString - getBBytes(); - - build.buf.validate.conformance.cases.RequiredProto2Oneof.ValCase getValCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Repeated.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Repeated.java deleted file mode 100644 index 157dc6d5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2Repeated.java +++ /dev/null @@ -1,553 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2Repeated} - */ -public final class RequiredProto2Repeated extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2Repeated) - RequiredProto2RepeatedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2Repeated.class.getName()); - } - // Use RequiredProto2Repeated.newBuilder() to construct. - private RequiredProto2Repeated(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2Repeated() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Repeated.class, build.buf.validate.conformance.cases.RequiredProto2Repeated.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RequiredProto2Repeated)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2Repeated other = (build.buf.validate.conformance.cases.RequiredProto2Repeated) 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.RequiredProto2Repeated parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Repeated 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.RequiredProto2Repeated parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Repeated 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.RequiredProto2Repeated parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2Repeated 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.RequiredProto2Repeated parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2Repeated 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.RequiredProto2Repeated parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Repeated 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.RequiredProto2Repeated 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.RequiredProto2Repeated 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.RequiredProto2Repeated 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.RequiredProto2Repeated} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2Repeated) - build.buf.validate.conformance.cases.RequiredProto2RepeatedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2Repeated.class, build.buf.validate.conformance.cases.RequiredProto2Repeated.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2Repeated.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2Repeated_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Repeated getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2Repeated.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Repeated build() { - build.buf.validate.conformance.cases.RequiredProto2Repeated result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2Repeated buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2Repeated result = new build.buf.validate.conformance.cases.RequiredProto2Repeated(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2Repeated result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto2Repeated) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2Repeated)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2Repeated other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2Repeated.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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.ByteString bs = input.readBytes(); - ensureValIsMutable(); - val_.add(bs); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2Repeated) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2Repeated) - private static final build.buf.validate.conformance.cases.RequiredProto2Repeated DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2Repeated(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2Repeated getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2Repeated 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.RequiredProto2Repeated getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2RepeatedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2RepeatedOrBuilder.java deleted file mode 100644 index aa21c21d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2RepeatedOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2RepeatedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2Repeated) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptional.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptional.java deleted file mode 100644 index 68ffefc5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptional.java +++ /dev/null @@ -1,528 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2ScalarOptional} - */ -public final class RequiredProto2ScalarOptional extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2ScalarOptional) - RequiredProto2ScalarOptionalOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2ScalarOptional.class.getName()); - } - // Use RequiredProto2ScalarOptional.newBuilder() to construct. - private RequiredProto2ScalarOptional(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2ScalarOptional() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.class, build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string 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 string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto2ScalarOptional)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2ScalarOptional other = (build.buf.validate.conformance.cases.RequiredProto2ScalarOptional) 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.RequiredProto2ScalarOptional parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2ScalarOptional) - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.class, build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptional_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarOptional getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarOptional build() { - build.buf.validate.conformance.cases.RequiredProto2ScalarOptional result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarOptional buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2ScalarOptional result = new build.buf.validate.conformance.cases.RequiredProto2ScalarOptional(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2ScalarOptional result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredProto2ScalarOptional) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2ScalarOptional)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2ScalarOptional other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2ScalarOptional.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2ScalarOptional) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2ScalarOptional) - private static final build.buf.validate.conformance.cases.RequiredProto2ScalarOptional DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2ScalarOptional(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptional getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2ScalarOptional 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.RequiredProto2ScalarOptional getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefault.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefault.java deleted file mode 100644 index bfd52634..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefault.java +++ /dev/null @@ -1,528 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault} - */ -public final class RequiredProto2ScalarOptionalDefault extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault) - RequiredProto2ScalarOptionalDefaultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2ScalarOptionalDefault.class.getName()); - } - // Use RequiredProto2ScalarOptionalDefault.newBuilder() to construct. - private RequiredProto2ScalarOptionalDefault(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2ScalarOptionalDefault() { - val_ = "foo"; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.class, build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = "foo"; - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto2ScalarOptionalDefault)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault other = (build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault) 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.RequiredProto2ScalarOptionalDefault parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault) - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefaultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.class, build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = "foo"; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarOptionalDefault_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault build() { - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault result = new build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredProto2ScalarOptionalDefault) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = "foo"; - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault) - private static final build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2ScalarOptionalDefault 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.RequiredProto2ScalarOptionalDefault getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefaultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefaultOrBuilder.java deleted file mode 100644 index 7cc453ff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalDefaultOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2ScalarOptionalDefaultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2ScalarOptionalDefault) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [default = "foo", json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalOrBuilder.java deleted file mode 100644 index b55c755c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarOptionalOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2ScalarOptionalOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2ScalarOptional) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequired.java deleted file mode 100644 index 7c602f0a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequired.java +++ /dev/null @@ -1,535 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto2ScalarRequired} - */ -public final class RequiredProto2ScalarRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto2ScalarRequired) - RequiredProto2ScalarRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto2ScalarRequired.class.getName()); - } - // Use RequiredProto2ScalarRequired.newBuilder() to construct. - private RequiredProto2ScalarRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto2ScalarRequired() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.class, build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * required string 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); - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasVal()) { - memoizedIsInitialized = 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto2ScalarRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto2ScalarRequired other = (build.buf.validate.conformance.cases.RequiredProto2ScalarRequired) 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.RequiredProto2ScalarRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto2ScalarRequired) - build.buf.validate.conformance.cases.RequiredProto2ScalarRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.class, build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto2Proto.internal_static_buf_validate_conformance_cases_RequiredProto2ScalarRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarRequired build() { - build.buf.validate.conformance.cases.RequiredProto2ScalarRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto2ScalarRequired buildPartial() { - build.buf.validate.conformance.cases.RequiredProto2ScalarRequired result = new build.buf.validate.conformance.cases.RequiredProto2ScalarRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto2ScalarRequired result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredProto2ScalarRequired) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto2ScalarRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto2ScalarRequired other) { - if (other == build.buf.validate.conformance.cases.RequiredProto2ScalarRequired.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasVal()) { - return false; - } - 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: { - val_ = input.readBytes(); - 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 java.lang.Object val_ = ""; - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto2ScalarRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto2ScalarRequired) - private static final build.buf.validate.conformance.cases.RequiredProto2ScalarRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto2ScalarRequired(); - } - - public static build.buf.validate.conformance.cases.RequiredProto2ScalarRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto2ScalarRequired 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.RequiredProto2ScalarRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequiredOrBuilder.java deleted file mode 100644 index 1c905066..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto2ScalarRequiredOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto2ScalarRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto2ScalarRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * required string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Map.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Map.java deleted file mode 100644 index 5fa914dc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Map.java +++ /dev/null @@ -1,644 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3Map} - */ -public final class RequiredProto3Map extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3Map) - RequiredProto3MapOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto3Map.class.getName()); - } - // Use RequiredProto3Map.newBuilder() to construct. - private RequiredProto3Map(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto3Map() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Map.class, build.buf.validate.conformance.cases.RequiredProto3Map.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private static final class ValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Map_ValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetVal(), - ValDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - val__ = ValDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, val__); - } - 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.RequiredProto3Map)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3Map other = (build.buf.validate.conformance.cases.RequiredProto3Map) obj; - - if (!internalGetVal().equals( - other.internalGetVal())) 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 (!internalGetVal().getMap().isEmpty()) { - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetVal().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RequiredProto3Map parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Map 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.RequiredProto3Map parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Map 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.RequiredProto3Map parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Map 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.RequiredProto3Map parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3Map 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.RequiredProto3Map parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Map 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.RequiredProto3Map 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.RequiredProto3Map 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.RequiredProto3Map 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.RequiredProto3Map} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3Map) - build.buf.validate.conformance.cases.RequiredProto3MapOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableVal(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Map_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Map.class, build.buf.validate.conformance.cases.RequiredProto3Map.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3Map.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableVal().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Map_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Map getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3Map.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Map build() { - build.buf.validate.conformance.cases.RequiredProto3Map result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Map buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3Map result = new build.buf.validate.conformance.cases.RequiredProto3Map(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3Map result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = internalGetVal(); - result.val_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto3Map) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3Map)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3Map other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3Map.getDefaultInstance()) return this; - internalGetMutableVal().mergeFrom( - other.internalGetVal()); - bitField0_ |= 0x00000001; - 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.MapEntry - val__ = input.readMessage( - ValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableVal().getMutableMap().put( - val__.getKey(), val__.getValue()); - 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.MapField< - java.lang.String, java.lang.String> val_; - private com.google.protobuf.MapField - internalGetVal() { - if (val_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ValDefaultEntryHolder.defaultEntry); - } - return val_; - } - private com.google.protobuf.MapField - internalGetMutableVal() { - if (val_ == null) { - val_ = com.google.protobuf.MapField.newMapField( - ValDefaultEntryHolder.defaultEntry); - } - if (!val_.isMutable()) { - val_ = val_.copy(); - } - bitField0_ |= 0x00000001; - onChanged(); - return val_; - } - public int getValCount() { - return internalGetVal().getMap().size(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public boolean containsVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetVal().getMap().containsKey(key); - } - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getVal() { - return getValMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.Map getValMap() { - return internalGetVal().getMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.lang.String getValOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableVal().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder removeVal( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableVal().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableVal() { - bitField0_ |= 0x00000001; - return internalGetMutableVal().getMutableMap(); - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putVal( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableVal().getMutableMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder putAllVal( - java.util.Map values) { - internalGetMutableVal().getMutableMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3Map) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3Map) - private static final build.buf.validate.conformance.cases.RequiredProto3Map DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3Map(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Map getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto3Map 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.RequiredProto3Map getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MapOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MapOrBuilder.java deleted file mode 100644 index 194bd4cb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MapOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto3MapOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3Map) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - int getValCount(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - boolean containsVal( - java.lang.String key); - /** - * Use {@link #getValMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getVal(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.util.Map - getValMap(); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - /* nullable */ -java.lang.String getValOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - java.lang.String getValOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Message.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Message.java deleted file mode 100644 index 2cb5a08f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Message.java +++ /dev/null @@ -1,1068 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3Message} - */ -public final class RequiredProto3Message extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3Message) - RequiredProto3MessageOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto3Message.class.getName()); - } - // Use RequiredProto3Message.newBuilder() to construct. - private RequiredProto3Message(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto3Message() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Message.class, build.buf.validate.conformance.cases.RequiredProto3Message.Builder.class); - } - - public interface MsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3Message.Msg) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3Message.Msg} - */ - public static final class Msg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3Message.Msg) - MsgOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Msg.class.getName()); - } - // Use Msg.newBuilder() to construct. - private Msg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Msg() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Message.Msg.class, build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto3Message.Msg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3Message.Msg other = (build.buf.validate.conformance.cases.RequiredProto3Message.Msg) obj; - - 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(); - 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.RequiredProto3Message.Msg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg 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.RequiredProto3Message.Msg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3Message.Msg) - build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Message.Msg.class, build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3Message.Msg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_Msg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message.Msg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3Message.Msg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message.Msg build() { - build.buf.validate.conformance.cases.RequiredProto3Message.Msg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message.Msg buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3Message.Msg result = new build.buf.validate.conformance.cases.RequiredProto3Message.Msg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3Message.Msg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto3Message.Msg) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3Message.Msg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3Message.Msg other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3Message.Msg.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3Message.Msg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3Message.Msg) - private static final build.buf.validate.conformance.cases.RequiredProto3Message.Msg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3Message.Msg(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Message.Msg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Msg 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.RequiredProto3Message.Msg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.RequiredProto3Message.Msg val_; - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg 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); - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message.Msg getVal() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredProto3Message.Msg.getDefaultInstance() : val_; - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder getValOrBuilder() { - return val_ == null ? build.buf.validate.conformance.cases.RequiredProto3Message.Msg.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.RequiredProto3Message)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3Message other = (build.buf.validate.conformance.cases.RequiredProto3Message) 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.RequiredProto3Message parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message 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.RequiredProto3Message parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message 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.RequiredProto3Message parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message 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.RequiredProto3Message parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3Message 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.RequiredProto3Message parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Message 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.RequiredProto3Message 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.RequiredProto3Message 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.RequiredProto3Message 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.RequiredProto3Message} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3Message) - build.buf.validate.conformance.cases.RequiredProto3MessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Message.class, build.buf.validate.conformance.cases.RequiredProto3Message.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3Message.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.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Message_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3Message.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message build() { - build.buf.validate.conformance.cases.RequiredProto3Message result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Message buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3Message result = new build.buf.validate.conformance.cases.RequiredProto3Message(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3Message 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.RequiredProto3Message) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3Message)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3Message other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3Message.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 build.buf.validate.conformance.cases.RequiredProto3Message.Msg val_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredProto3Message.Msg, build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder, build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder> valBuilder_; - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public build.buf.validate.conformance.cases.RequiredProto3Message.Msg getVal() { - if (valBuilder_ == null) { - return val_ == null ? build.buf.validate.conformance.cases.RequiredProto3Message.Msg.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(build.buf.validate.conformance.cases.RequiredProto3Message.Msg value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(build.buf.validate.conformance.cases.RequiredProto3Message.Msg value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != build.buf.validate.conformance.cases.RequiredProto3Message.Msg.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg 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; - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - build.buf.validate.conformance.cases.RequiredProto3Message.Msg.getDefaultInstance() : val_; - } - } - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredProto3Message.Msg, build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder, build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.RequiredProto3Message.Msg, build.buf.validate.conformance.cases.RequiredProto3Message.Msg.Builder, build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3Message) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3Message) - private static final build.buf.validate.conformance.cases.RequiredProto3Message DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3Message(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Message getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto3Message 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.RequiredProto3Message getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MessageOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MessageOrBuilder.java deleted file mode 100644 index a417b9ca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3MessageOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto3MessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3Message) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - build.buf.validate.conformance.cases.RequiredProto3Message.Msg getVal(); - /** - * .buf.validate.conformance.cases.RequiredProto3Message.Msg val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.RequiredProto3Message.MsgOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOf.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOf.java deleted file mode 100644 index 61869141..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOf.java +++ /dev/null @@ -1,786 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3OneOf} - */ -public final class RequiredProto3OneOf extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3OneOf) - RequiredProto3OneOfOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto3OneOf.class.getName()); - } - // Use RequiredProto3OneOf.newBuilder() to construct. - private RequiredProto3OneOf(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto3OneOf() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3OneOf.class, build.buf.validate.conformance.cases.RequiredProto3OneOf.Builder.class); - } - - private int valCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object val_; - public enum ValCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - A(1), - B(2), - VAL_NOT_SET(0); - private final int value; - private ValCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValCase valueOf(int value) { - return forNumber(value); - } - - public static ValCase forNumber(int value) { - switch (value) { - case 1: return A; - case 2: return B; - case 0: return VAL_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValCase - getValCase() { - return ValCase.forNumber( - valCase_); - } - - public static final int A_FIELD_NUMBER = 1; - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - public boolean hasA() { - return valCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - public java.lang.String getA() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 1) { - val_ = s; - } - return s; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 1) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int B_FIELD_NUMBER = 2; - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - public boolean hasB() { - return valCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - public java.lang.String getB() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 2) { - val_ = s; - } - return s; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 2) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (valCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - if (valCase_ == 2) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - if (valCase_ == 2) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, val_); - } - 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.RequiredProto3OneOf)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3OneOf other = (build.buf.validate.conformance.cases.RequiredProto3OneOf) obj; - - if (!getValCase().equals(other.getValCase())) return false; - switch (valCase_) { - case 1: - if (!getA() - .equals(other.getA())) return false; - break; - case 2: - if (!getB() - .equals(other.getB())) return false; - break; - case 0: - default: - } - 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(); - switch (valCase_) { - case 1: - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA().hashCode(); - break; - case 2: - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.RequiredProto3OneOf parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3OneOf 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.RequiredProto3OneOf parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3OneOf 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.RequiredProto3OneOf parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3OneOf 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.RequiredProto3OneOf parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3OneOf 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.RequiredProto3OneOf parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3OneOf 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.RequiredProto3OneOf 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.RequiredProto3OneOf 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.RequiredProto3OneOf 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.RequiredProto3OneOf} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3OneOf) - build.buf.validate.conformance.cases.RequiredProto3OneOfOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3OneOf.class, build.buf.validate.conformance.cases.RequiredProto3OneOf.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3OneOf.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - valCase_ = 0; - val_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OneOf_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3OneOf getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3OneOf.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3OneOf build() { - build.buf.validate.conformance.cases.RequiredProto3OneOf result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3OneOf buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3OneOf result = new build.buf.validate.conformance.cases.RequiredProto3OneOf(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3OneOf result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.RequiredProto3OneOf result) { - result.valCase_ = valCase_; - result.val_ = this.val_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto3OneOf) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3OneOf)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3OneOf other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3OneOf.getDefaultInstance()) return this; - switch (other.getValCase()) { - case A: { - valCase_ = 1; - val_ = other.val_; - onChanged(); - break; - } - case B: { - valCase_ = 2; - val_ = other.val_; - onChanged(); - break; - } - case VAL_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - valCase_ = 1; - val_ = s; - break; - } // case 10 - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - valCase_ = 2; - val_ = s; - break; - } // case 18 - 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 valCase_ = 0; - private java.lang.Object val_; - public ValCase - getValCase() { - return ValCase.forNumber( - valCase_); - } - - public Builder clearVal() { - valCase_ = 0; - val_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return valCase_ == 1; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public java.lang.String getA() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 1) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getABytes() { - java.lang.Object ref = ""; - if (valCase_ == 1) { - ref = val_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 1) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 1; - val_ = value; - onChanged(); - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - if (valCase_ == 1) { - valCase_ = 0; - val_ = null; - onChanged(); - } - return this; - } - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The bytes for a to set. - * @return This builder for chaining. - */ - public Builder setABytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - valCase_ = 1; - val_ = value; - onChanged(); - return this; - } - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - @java.lang.Override - public boolean hasB() { - return valCase_ == 2; - } - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public java.lang.String getB() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valCase_ == 2) { - val_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBBytes() { - java.lang.Object ref = ""; - if (valCase_ == 2) { - ref = val_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valCase_ == 2) { - val_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - valCase_ = 2; - val_ = value; - onChanged(); - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - if (valCase_ == 2) { - valCase_ = 0; - val_ = null; - onChanged(); - } - return this; - } - /** - * string b = 2 [json_name = "b"]; - * @param value The bytes for b to set. - * @return This builder for chaining. - */ - public Builder setBBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - valCase_ = 2; - val_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3OneOf) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3OneOf) - private static final build.buf.validate.conformance.cases.RequiredProto3OneOf DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3OneOf(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3OneOf getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto3OneOf 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.RequiredProto3OneOf getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOfOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOfOrBuilder.java deleted file mode 100644 index 525f3672..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OneOfOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto3OneOfOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3OneOf) - com.google.protobuf.MessageOrBuilder { - - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - boolean hasA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - java.lang.String getA(); - /** - * string a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The bytes for a. - */ - com.google.protobuf.ByteString - getABytes(); - - /** - * string b = 2 [json_name = "b"]; - * @return Whether the b field is set. - */ - boolean hasB(); - /** - * string b = 2 [json_name = "b"]; - * @return The b. - */ - java.lang.String getB(); - /** - * string b = 2 [json_name = "b"]; - * @return The bytes for b. - */ - com.google.protobuf.ByteString - getBBytes(); - - build.buf.validate.conformance.cases.RequiredProto3OneOf.ValCase getValCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalar.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalar.java deleted file mode 100644 index 80121d2f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalar.java +++ /dev/null @@ -1,525 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3OptionalScalar} - */ -public final class RequiredProto3OptionalScalar extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3OptionalScalar) - RequiredProto3OptionalScalarOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto3OptionalScalar.class.getName()); - } - // Use RequiredProto3OptionalScalar.newBuilder() to construct. - private RequiredProto3OptionalScalar(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto3OptionalScalar() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.class, build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * optional string 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 string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - 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.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto3OptionalScalar)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3OptionalScalar other = (build.buf.validate.conformance.cases.RequiredProto3OptionalScalar) 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.RequiredProto3OptionalScalar parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3OptionalScalar) - build.buf.validate.conformance.cases.RequiredProto3OptionalScalarOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.class, build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3OptionalScalar_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3OptionalScalar getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3OptionalScalar build() { - build.buf.validate.conformance.cases.RequiredProto3OptionalScalar result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3OptionalScalar buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3OptionalScalar result = new build.buf.validate.conformance.cases.RequiredProto3OptionalScalar(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3OptionalScalar result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - 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.RequiredProto3OptionalScalar) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3OptionalScalar)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3OptionalScalar other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3OptionalScalar.getDefaultInstance()) return this; - if (other.hasVal()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3OptionalScalar) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3OptionalScalar) - private static final build.buf.validate.conformance.cases.RequiredProto3OptionalScalar DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3OptionalScalar(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3OptionalScalar getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto3OptionalScalar 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.RequiredProto3OptionalScalar getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalarOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalarOrBuilder.java deleted file mode 100644 index 61918100..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3OptionalScalarOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto3OptionalScalarOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3OptionalScalar) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * optional string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Repeated.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Repeated.java deleted file mode 100644 index 36b3dde5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Repeated.java +++ /dev/null @@ -1,554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3Repeated} - */ -public final class RequiredProto3Repeated extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3Repeated) - RequiredProto3RepeatedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto3Repeated.class.getName()); - } - // Use RequiredProto3Repeated.newBuilder() to construct. - private RequiredProto3Repeated(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto3Repeated() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Repeated.class, build.buf.validate.conformance.cases.RequiredProto3Repeated.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(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++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { - dataSize += computeStringSizeNoTag(val_.getRaw(i)); - } - size += dataSize; - size += 1 * getValList().size(); - } - 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.RequiredProto3Repeated)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3Repeated other = (build.buf.validate.conformance.cases.RequiredProto3Repeated) 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.RequiredProto3Repeated parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Repeated 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.RequiredProto3Repeated parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Repeated 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.RequiredProto3Repeated parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Repeated 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.RequiredProto3Repeated parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3Repeated 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.RequiredProto3Repeated parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Repeated 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.RequiredProto3Repeated 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.RequiredProto3Repeated 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.RequiredProto3Repeated 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.RequiredProto3Repeated} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3Repeated) - build.buf.validate.conformance.cases.RequiredProto3RepeatedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Repeated.class, build.buf.validate.conformance.cases.RequiredProto3Repeated.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3Repeated.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Repeated_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Repeated getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3Repeated.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Repeated build() { - build.buf.validate.conformance.cases.RequiredProto3Repeated result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Repeated buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3Repeated result = new build.buf.validate.conformance.cases.RequiredProto3Repeated(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3Repeated result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - val_.makeImmutable(); - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto3Repeated) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3Repeated)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3Repeated other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3Repeated.getDefaultInstance()) return this; - if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - } else { - ensureValIsMutable(); - val_.addAll(other.val_); - } - onChanged(); - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - ensureValIsMutable(); - val_.add(s); - 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.LazyStringArrayList val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureValIsMutable() { - if (!val_.isModifiable()) { - val_ = new com.google.protobuf.LazyStringArrayList(val_); - } - bitField0_ |= 0x00000001; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - public com.google.protobuf.ProtocolStringList - getValList() { - val_.makeImmutable(); - return val_; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - public int getValCount() { - return val_.size(); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - public java.lang.String getVal(int index) { - return val_.get(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - public com.google.protobuf.ByteString - getValBytes(int index) { - return val_.getByteString(index); - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index to set the value at. - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to add. - * @return This builder for chaining. - */ - public Builder addVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param values The val to add. - * @return This builder for chaining. - */ - public Builder addAllVal( - java.lang.Iterable values) { - ensureValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, val_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes of the val to add. - * @return This builder for chaining. - */ - public Builder addValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureValIsMutable(); - val_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3Repeated) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3Repeated) - private static final build.buf.validate.conformance.cases.RequiredProto3Repeated DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3Repeated(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Repeated getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto3Repeated 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.RequiredProto3Repeated getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3RepeatedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3RepeatedOrBuilder.java deleted file mode 100644 index 1367efd0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3RepeatedOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto3RepeatedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3Repeated) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return A list containing the val. - */ - java.util.List - getValList(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The count of val. - */ - int getValCount(); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the element to return. - * @return The val at the given index. - */ - java.lang.String getVal(int index); - /** - * repeated string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param index The index of the value to return. - * @return The bytes of the val at the given index. - */ - com.google.protobuf.ByteString - getValBytes(int index); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Scalar.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Scalar.java deleted file mode 100644 index 1ef74741..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3Scalar.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.RequiredProto3Scalar} - */ -public final class RequiredProto3Scalar extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.RequiredProto3Scalar) - RequiredProto3ScalarOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RequiredProto3Scalar.class.getName()); - } - // Use RequiredProto3Scalar.newBuilder() to construct. - private RequiredProto3Scalar(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequiredProto3Scalar() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Scalar.class, build.buf.validate.conformance.cases.RequiredProto3Scalar.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.RequiredProto3Scalar)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.RequiredProto3Scalar other = (build.buf.validate.conformance.cases.RequiredProto3Scalar) obj; - - 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(); - 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.RequiredProto3Scalar parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Scalar 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.RequiredProto3Scalar parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Scalar 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.RequiredProto3Scalar parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.RequiredProto3Scalar 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.RequiredProto3Scalar parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.RequiredProto3Scalar 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.RequiredProto3Scalar parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Scalar 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.RequiredProto3Scalar 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.RequiredProto3Scalar 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.RequiredProto3Scalar 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.RequiredProto3Scalar} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.RequiredProto3Scalar) - build.buf.validate.conformance.cases.RequiredProto3ScalarOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.RequiredProto3Scalar.class, build.buf.validate.conformance.cases.RequiredProto3Scalar.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.RequiredProto3Scalar.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.RequiredFieldProto3Proto.internal_static_buf_validate_conformance_cases_RequiredProto3Scalar_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Scalar getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.RequiredProto3Scalar.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Scalar build() { - build.buf.validate.conformance.cases.RequiredProto3Scalar result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.RequiredProto3Scalar buildPartial() { - build.buf.validate.conformance.cases.RequiredProto3Scalar result = new build.buf.validate.conformance.cases.RequiredProto3Scalar(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.RequiredProto3Scalar result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.RequiredProto3Scalar) { - return mergeFrom((build.buf.validate.conformance.cases.RequiredProto3Scalar)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.RequiredProto3Scalar other) { - if (other == build.buf.validate.conformance.cases.RequiredProto3Scalar.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.RequiredProto3Scalar) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.RequiredProto3Scalar) - private static final build.buf.validate.conformance.cases.RequiredProto3Scalar DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.RequiredProto3Scalar(); - } - - public static build.buf.validate.conformance.cases.RequiredProto3Scalar getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequiredProto3Scalar 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.RequiredProto3Scalar getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3ScalarOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3ScalarOrBuilder.java deleted file mode 100644 index cf34a8c5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/RequiredProto3ScalarOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/required_field_proto3.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface RequiredProto3ScalarOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.RequiredProto3Scalar) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Const.java deleted file mode 100644 index 19367082..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Const.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32Const} - */ -public final class SFixed32Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32Const) - SFixed32ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32Const.class.getName()); - } - // Use SFixed32Const.newBuilder() to construct. - private SFixed32Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32Const.class, build.buf.validate.conformance.cases.SFixed32Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32Const other = (build.buf.validate.conformance.cases.SFixed32Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Const 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.SFixed32Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Const 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.SFixed32Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Const 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.SFixed32Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32Const 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.SFixed32Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32Const 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.SFixed32Const 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.SFixed32Const 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.SFixed32Const 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.SFixed32Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32Const) - build.buf.validate.conformance.cases.SFixed32ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32Const.class, build.buf.validate.conformance.cases.SFixed32Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Const build() { - build.buf.validate.conformance.cases.SFixed32Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Const buildPartial() { - build.buf.validate.conformance.cases.SFixed32Const result = new build.buf.validate.conformance.cases.SFixed32Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32Const) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32Const other) { - if (other == build.buf.validate.conformance.cases.SFixed32Const.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32Const) - private static final build.buf.validate.conformance.cases.SFixed32Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32Const(); - } - - public static build.buf.validate.conformance.cases.SFixed32Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32Const 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.SFixed32Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ConstOrBuilder.java deleted file mode 100644 index ddafedfe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32Const) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTE.java deleted file mode 100644 index 6895af48..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32ExGTELTE} - */ -public final class SFixed32ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32ExGTELTE) - SFixed32ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32ExGTELTE.class.getName()); - } - // Use SFixed32ExGTELTE.newBuilder() to construct. - private SFixed32ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32ExGTELTE.class, build.buf.validate.conformance.cases.SFixed32ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32ExGTELTE other = (build.buf.validate.conformance.cases.SFixed32ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE 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.SFixed32ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE 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.SFixed32ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE 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.SFixed32ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE 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.SFixed32ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE 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.SFixed32ExGTELTE 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.SFixed32ExGTELTE 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.SFixed32ExGTELTE 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.SFixed32ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32ExGTELTE) - build.buf.validate.conformance.cases.SFixed32ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32ExGTELTE.class, build.buf.validate.conformance.cases.SFixed32ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32ExGTELTE build() { - build.buf.validate.conformance.cases.SFixed32ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.SFixed32ExGTELTE result = new build.buf.validate.conformance.cases.SFixed32ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.SFixed32ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32ExGTELTE) - private static final build.buf.validate.conformance.cases.SFixed32ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.SFixed32ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32ExGTELTE 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.SFixed32ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTEOrBuilder.java deleted file mode 100644 index a906473c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGT.java deleted file mode 100644 index 6136bfce..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32ExLTGT} - */ -public final class SFixed32ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32ExLTGT) - SFixed32ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32ExLTGT.class.getName()); - } - // Use SFixed32ExLTGT.newBuilder() to construct. - private SFixed32ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32ExLTGT.class, build.buf.validate.conformance.cases.SFixed32ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32ExLTGT other = (build.buf.validate.conformance.cases.SFixed32ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32ExLTGT 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.SFixed32ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32ExLTGT 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.SFixed32ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32ExLTGT 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.SFixed32ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32ExLTGT 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.SFixed32ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32ExLTGT 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.SFixed32ExLTGT 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.SFixed32ExLTGT 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.SFixed32ExLTGT 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.SFixed32ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32ExLTGT) - build.buf.validate.conformance.cases.SFixed32ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32ExLTGT.class, build.buf.validate.conformance.cases.SFixed32ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32ExLTGT build() { - build.buf.validate.conformance.cases.SFixed32ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32ExLTGT buildPartial() { - build.buf.validate.conformance.cases.SFixed32ExLTGT result = new build.buf.validate.conformance.cases.SFixed32ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32ExLTGT other) { - if (other == build.buf.validate.conformance.cases.SFixed32ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32ExLTGT) - private static final build.buf.validate.conformance.cases.SFixed32ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32ExLTGT(); - } - - public static build.buf.validate.conformance.cases.SFixed32ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32ExLTGT 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.SFixed32ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGTOrBuilder.java deleted file mode 100644 index 2b61c6f0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Example.java deleted file mode 100644 index 0d32f5e0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Example.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32Example} - */ -public final class SFixed32Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32Example) - SFixed32ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32Example.class.getName()); - } - // Use SFixed32Example.newBuilder() to construct. - private SFixed32Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32Example.class, build.buf.validate.conformance.cases.SFixed32Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32Example other = (build.buf.validate.conformance.cases.SFixed32Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Example 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.SFixed32Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Example 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.SFixed32Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Example 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.SFixed32Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32Example 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.SFixed32Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32Example 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.SFixed32Example 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.SFixed32Example 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.SFixed32Example 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.SFixed32Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32Example) - build.buf.validate.conformance.cases.SFixed32ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32Example.class, build.buf.validate.conformance.cases.SFixed32Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Example build() { - build.buf.validate.conformance.cases.SFixed32Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Example buildPartial() { - build.buf.validate.conformance.cases.SFixed32Example result = new build.buf.validate.conformance.cases.SFixed32Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32Example) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32Example other) { - if (other == build.buf.validate.conformance.cases.SFixed32Example.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32Example) - private static final build.buf.validate.conformance.cases.SFixed32Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32Example(); - } - - public static build.buf.validate.conformance.cases.SFixed32Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32Example 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.SFixed32Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExampleOrBuilder.java deleted file mode 100644 index 662d23b1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32Example) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GT.java deleted file mode 100644 index e390f419..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32GT} - */ -public final class SFixed32GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32GT) - SFixed32GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32GT.class.getName()); - } - // Use SFixed32GT.newBuilder() to construct. - private SFixed32GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GT.class, build.buf.validate.conformance.cases.SFixed32GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32GT other = (build.buf.validate.conformance.cases.SFixed32GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GT 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.SFixed32GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GT 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.SFixed32GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GT 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.SFixed32GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32GT 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.SFixed32GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32GT 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.SFixed32GT 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.SFixed32GT 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.SFixed32GT 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.SFixed32GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32GT) - build.buf.validate.conformance.cases.SFixed32GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GT.class, build.buf.validate.conformance.cases.SFixed32GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GT build() { - build.buf.validate.conformance.cases.SFixed32GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GT buildPartial() { - build.buf.validate.conformance.cases.SFixed32GT result = new build.buf.validate.conformance.cases.SFixed32GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32GT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32GT other) { - if (other == build.buf.validate.conformance.cases.SFixed32GT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32GT) - private static final build.buf.validate.conformance.cases.SFixed32GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32GT(); - } - - public static build.buf.validate.conformance.cases.SFixed32GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32GT 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.SFixed32GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTE.java deleted file mode 100644 index 31ea945f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32GTE} - */ -public final class SFixed32GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32GTE) - SFixed32GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32GTE.class.getName()); - } - // Use SFixed32GTE.newBuilder() to construct. - private SFixed32GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GTE.class, build.buf.validate.conformance.cases.SFixed32GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32GTE other = (build.buf.validate.conformance.cases.SFixed32GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTE 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.SFixed32GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTE 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.SFixed32GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTE 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.SFixed32GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32GTE 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.SFixed32GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32GTE 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.SFixed32GTE 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.SFixed32GTE 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.SFixed32GTE 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.SFixed32GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32GTE) - build.buf.validate.conformance.cases.SFixed32GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GTE.class, build.buf.validate.conformance.cases.SFixed32GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTE build() { - build.buf.validate.conformance.cases.SFixed32GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTE buildPartial() { - build.buf.validate.conformance.cases.SFixed32GTE result = new build.buf.validate.conformance.cases.SFixed32GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32GTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32GTE other) { - if (other == build.buf.validate.conformance.cases.SFixed32GTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32GTE) - private static final build.buf.validate.conformance.cases.SFixed32GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32GTE(); - } - - public static build.buf.validate.conformance.cases.SFixed32GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32GTE 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.SFixed32GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTE.java deleted file mode 100644 index 3439b215..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32GTELTE} - */ -public final class SFixed32GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32GTELTE) - SFixed32GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32GTELTE.class.getName()); - } - // Use SFixed32GTELTE.newBuilder() to construct. - private SFixed32GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GTELTE.class, build.buf.validate.conformance.cases.SFixed32GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32GTELTE other = (build.buf.validate.conformance.cases.SFixed32GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTELTE 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.SFixed32GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTELTE 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.SFixed32GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTELTE 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.SFixed32GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32GTELTE 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.SFixed32GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32GTELTE 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.SFixed32GTELTE 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.SFixed32GTELTE 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.SFixed32GTELTE 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.SFixed32GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32GTELTE) - build.buf.validate.conformance.cases.SFixed32GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GTELTE.class, build.buf.validate.conformance.cases.SFixed32GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTELTE build() { - build.buf.validate.conformance.cases.SFixed32GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTELTE buildPartial() { - build.buf.validate.conformance.cases.SFixed32GTELTE result = new build.buf.validate.conformance.cases.SFixed32GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32GTELTE other) { - if (other == build.buf.validate.conformance.cases.SFixed32GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32GTELTE) - private static final build.buf.validate.conformance.cases.SFixed32GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32GTELTE(); - } - - public static build.buf.validate.conformance.cases.SFixed32GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32GTELTE 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.SFixed32GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTEOrBuilder.java deleted file mode 100644 index 20d735ec..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTEOrBuilder.java deleted file mode 100644 index 755b5c3d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLT.java deleted file mode 100644 index 1e23d333..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32GTLT} - */ -public final class SFixed32GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32GTLT) - SFixed32GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32GTLT.class.getName()); - } - // Use SFixed32GTLT.newBuilder() to construct. - private SFixed32GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GTLT.class, build.buf.validate.conformance.cases.SFixed32GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32GTLT other = (build.buf.validate.conformance.cases.SFixed32GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTLT 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.SFixed32GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTLT 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.SFixed32GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32GTLT 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.SFixed32GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32GTLT 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.SFixed32GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32GTLT 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.SFixed32GTLT 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.SFixed32GTLT 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.SFixed32GTLT 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.SFixed32GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32GTLT) - build.buf.validate.conformance.cases.SFixed32GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32GTLT.class, build.buf.validate.conformance.cases.SFixed32GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTLT build() { - build.buf.validate.conformance.cases.SFixed32GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32GTLT buildPartial() { - build.buf.validate.conformance.cases.SFixed32GTLT result = new build.buf.validate.conformance.cases.SFixed32GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32GTLT other) { - if (other == build.buf.validate.conformance.cases.SFixed32GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32GTLT) - private static final build.buf.validate.conformance.cases.SFixed32GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32GTLT(); - } - - public static build.buf.validate.conformance.cases.SFixed32GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32GTLT 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.SFixed32GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLTOrBuilder.java deleted file mode 100644 index 10d42fc4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTOrBuilder.java deleted file mode 100644 index c695b0ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32GT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Ignore.java deleted file mode 100644 index ee8ff250..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32Ignore.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32Ignore} - */ -public final class SFixed32Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32Ignore) - SFixed32IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32Ignore.class.getName()); - } - // Use SFixed32Ignore.newBuilder() to construct. - private SFixed32Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32Ignore.class, build.buf.validate.conformance.cases.SFixed32Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32Ignore other = (build.buf.validate.conformance.cases.SFixed32Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Ignore 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.SFixed32Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Ignore 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.SFixed32Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32Ignore 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.SFixed32Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32Ignore 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.SFixed32Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32Ignore 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.SFixed32Ignore 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.SFixed32Ignore 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.SFixed32Ignore 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.SFixed32Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32Ignore) - build.buf.validate.conformance.cases.SFixed32IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32Ignore.class, build.buf.validate.conformance.cases.SFixed32Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Ignore build() { - build.buf.validate.conformance.cases.SFixed32Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32Ignore buildPartial() { - build.buf.validate.conformance.cases.SFixed32Ignore result = new build.buf.validate.conformance.cases.SFixed32Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32Ignore other) { - if (other == build.buf.validate.conformance.cases.SFixed32Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32Ignore) - private static final build.buf.validate.conformance.cases.SFixed32Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32Ignore(); - } - - public static build.buf.validate.conformance.cases.SFixed32Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32Ignore 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.SFixed32Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IgnoreOrBuilder.java deleted file mode 100644 index cbe83c7d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32In.java deleted file mode 100644 index 80cf73fd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32In.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32In} - */ -public final class SFixed32In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32In) - SFixed32InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32In.class.getName()); - } - // Use SFixed32In.newBuilder() to construct. - private SFixed32In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32In.class, build.buf.validate.conformance.cases.SFixed32In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32In other = (build.buf.validate.conformance.cases.SFixed32In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32In 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.SFixed32In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32In 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.SFixed32In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32In 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.SFixed32In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32In 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.SFixed32In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32In 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.SFixed32In 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.SFixed32In 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.SFixed32In 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.SFixed32In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32In) - build.buf.validate.conformance.cases.SFixed32InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32In.class, build.buf.validate.conformance.cases.SFixed32In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32In build() { - build.buf.validate.conformance.cases.SFixed32In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32In buildPartial() { - build.buf.validate.conformance.cases.SFixed32In result = new build.buf.validate.conformance.cases.SFixed32In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32In) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32In other) { - if (other == build.buf.validate.conformance.cases.SFixed32In.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32In) - private static final build.buf.validate.conformance.cases.SFixed32In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32In(); - } - - public static build.buf.validate.conformance.cases.SFixed32In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32In 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.SFixed32In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32InOrBuilder.java deleted file mode 100644 index 365de320..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32In) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectType.java deleted file mode 100644 index 7e78c53b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectType.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32IncorrectType} - */ -public final class SFixed32IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32IncorrectType) - SFixed32IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32IncorrectType.class.getName()); - } - // Use SFixed32IncorrectType.newBuilder() to construct. - private SFixed32IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32IncorrectType.class, build.buf.validate.conformance.cases.SFixed32IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32IncorrectType other = (build.buf.validate.conformance.cases.SFixed32IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32IncorrectType 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.SFixed32IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32IncorrectType 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.SFixed32IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32IncorrectType 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.SFixed32IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32IncorrectType 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.SFixed32IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32IncorrectType 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.SFixed32IncorrectType 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.SFixed32IncorrectType 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.SFixed32IncorrectType 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.SFixed32IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32IncorrectType) - build.buf.validate.conformance.cases.SFixed32IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32IncorrectType.class, build.buf.validate.conformance.cases.SFixed32IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32IncorrectType build() { - build.buf.validate.conformance.cases.SFixed32IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32IncorrectType buildPartial() { - build.buf.validate.conformance.cases.SFixed32IncorrectType result = new build.buf.validate.conformance.cases.SFixed32IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32IncorrectType other) { - if (other == build.buf.validate.conformance.cases.SFixed32IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32IncorrectType) - private static final build.buf.validate.conformance.cases.SFixed32IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32IncorrectType(); - } - - public static build.buf.validate.conformance.cases.SFixed32IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32IncorrectType 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.SFixed32IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectTypeOrBuilder.java deleted file mode 100644 index c32a2871..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LT.java deleted file mode 100644 index 940ebd7b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32LT} - */ -public final class SFixed32LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32LT) - SFixed32LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32LT.class.getName()); - } - // Use SFixed32LT.newBuilder() to construct. - private SFixed32LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32LT.class, build.buf.validate.conformance.cases.SFixed32LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32LT other = (build.buf.validate.conformance.cases.SFixed32LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32LT 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.SFixed32LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32LT 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.SFixed32LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32LT 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.SFixed32LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32LT 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.SFixed32LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32LT 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.SFixed32LT 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.SFixed32LT 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.SFixed32LT 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.SFixed32LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32LT) - build.buf.validate.conformance.cases.SFixed32LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32LT.class, build.buf.validate.conformance.cases.SFixed32LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32LT build() { - build.buf.validate.conformance.cases.SFixed32LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32LT buildPartial() { - build.buf.validate.conformance.cases.SFixed32LT result = new build.buf.validate.conformance.cases.SFixed32LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32LT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32LT other) { - if (other == build.buf.validate.conformance.cases.SFixed32LT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32LT) - private static final build.buf.validate.conformance.cases.SFixed32LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32LT(); - } - - public static build.buf.validate.conformance.cases.SFixed32LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32LT 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.SFixed32LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTE.java deleted file mode 100644 index 1019fdfb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32LTE} - */ -public final class SFixed32LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32LTE) - SFixed32LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32LTE.class.getName()); - } - // Use SFixed32LTE.newBuilder() to construct. - private SFixed32LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32LTE.class, build.buf.validate.conformance.cases.SFixed32LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32LTE other = (build.buf.validate.conformance.cases.SFixed32LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32LTE 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.SFixed32LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32LTE 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.SFixed32LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32LTE 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.SFixed32LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32LTE 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.SFixed32LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32LTE 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.SFixed32LTE 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.SFixed32LTE 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.SFixed32LTE 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.SFixed32LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32LTE) - build.buf.validate.conformance.cases.SFixed32LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32LTE.class, build.buf.validate.conformance.cases.SFixed32LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32LTE build() { - build.buf.validate.conformance.cases.SFixed32LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32LTE buildPartial() { - build.buf.validate.conformance.cases.SFixed32LTE result = new build.buf.validate.conformance.cases.SFixed32LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32LTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32LTE other) { - if (other == build.buf.validate.conformance.cases.SFixed32LTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32LTE) - private static final build.buf.validate.conformance.cases.SFixed32LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32LTE(); - } - - public static build.buf.validate.conformance.cases.SFixed32LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32LTE 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.SFixed32LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTEOrBuilder.java deleted file mode 100644 index 80ff35b4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTOrBuilder.java deleted file mode 100644 index df88fc03..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32LT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32None.java deleted file mode 100644 index af0c2036..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32None.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32None} - */ -public final class SFixed32None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32None) - SFixed32NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32None.class.getName()); - } - // Use SFixed32None.newBuilder() to construct. - private SFixed32None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32None.class, build.buf.validate.conformance.cases.SFixed32None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32None other = (build.buf.validate.conformance.cases.SFixed32None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32None 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.SFixed32None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32None 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.SFixed32None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32None 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.SFixed32None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32None 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.SFixed32None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32None 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.SFixed32None 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.SFixed32None 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.SFixed32None 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.SFixed32None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32None) - build.buf.validate.conformance.cases.SFixed32NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32None.class, build.buf.validate.conformance.cases.SFixed32None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32None build() { - build.buf.validate.conformance.cases.SFixed32None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32None buildPartial() { - build.buf.validate.conformance.cases.SFixed32None result = new build.buf.validate.conformance.cases.SFixed32None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32None) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32None other) { - if (other == build.buf.validate.conformance.cases.SFixed32None.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32None) - private static final build.buf.validate.conformance.cases.SFixed32None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32None(); - } - - public static build.buf.validate.conformance.cases.SFixed32None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32None 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.SFixed32None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NoneOrBuilder.java deleted file mode 100644 index 5d156dd9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32None) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val"]; - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotIn.java deleted file mode 100644 index d77bdb85..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotIn.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed32NotIn} - */ -public final class SFixed32NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed32NotIn) - SFixed32NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32NotIn.class.getName()); - } - // Use SFixed32NotIn.newBuilder() to construct. - private SFixed32NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed32NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32NotIn.class, build.buf.validate.conformance.cases.SFixed32NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSFixed32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(1, val_); - } - 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.SFixed32NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed32NotIn other = (build.buf.validate.conformance.cases.SFixed32NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed32NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32NotIn 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.SFixed32NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32NotIn 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.SFixed32NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed32NotIn 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.SFixed32NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed32NotIn 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.SFixed32NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed32NotIn 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.SFixed32NotIn 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.SFixed32NotIn 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.SFixed32NotIn 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.SFixed32NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed32NotIn) - build.buf.validate.conformance.cases.SFixed32NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed32NotIn.class, build.buf.validate.conformance.cases.SFixed32NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed32NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed32NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed32NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32NotIn build() { - build.buf.validate.conformance.cases.SFixed32NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed32NotIn buildPartial() { - build.buf.validate.conformance.cases.SFixed32NotIn result = new build.buf.validate.conformance.cases.SFixed32NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed32NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed32NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed32NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed32NotIn other) { - if (other == build.buf.validate.conformance.cases.SFixed32NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 13: { - val_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 int val_ ; - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed32NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed32NotIn) - private static final build.buf.validate.conformance.cases.SFixed32NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed32NotIn(); - } - - public static build.buf.validate.conformance.cases.SFixed32NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32NotIn 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.SFixed32NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotInOrBuilder.java deleted file mode 100644 index a3c2c4b9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed32NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed32NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed32NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Const.java deleted file mode 100644 index 08293738..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Const.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64Const} - */ -public final class SFixed64Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64Const) - SFixed64ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64Const.class.getName()); - } - // Use SFixed64Const.newBuilder() to construct. - private SFixed64Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64Const.class, build.buf.validate.conformance.cases.SFixed64Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64Const other = (build.buf.validate.conformance.cases.SFixed64Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Const 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.SFixed64Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Const 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.SFixed64Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Const 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.SFixed64Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64Const 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.SFixed64Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64Const 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.SFixed64Const 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.SFixed64Const 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.SFixed64Const 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.SFixed64Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64Const) - build.buf.validate.conformance.cases.SFixed64ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64Const.class, build.buf.validate.conformance.cases.SFixed64Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Const build() { - build.buf.validate.conformance.cases.SFixed64Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Const buildPartial() { - build.buf.validate.conformance.cases.SFixed64Const result = new build.buf.validate.conformance.cases.SFixed64Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64Const) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64Const other) { - if (other == build.buf.validate.conformance.cases.SFixed64Const.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64Const) - private static final build.buf.validate.conformance.cases.SFixed64Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64Const(); - } - - public static build.buf.validate.conformance.cases.SFixed64Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64Const 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.SFixed64Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ConstOrBuilder.java deleted file mode 100644 index bbfa274a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64Const) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTE.java deleted file mode 100644 index 8651ec16..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64ExGTELTE} - */ -public final class SFixed64ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64ExGTELTE) - SFixed64ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64ExGTELTE.class.getName()); - } - // Use SFixed64ExGTELTE.newBuilder() to construct. - private SFixed64ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64ExGTELTE.class, build.buf.validate.conformance.cases.SFixed64ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64ExGTELTE other = (build.buf.validate.conformance.cases.SFixed64ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE 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.SFixed64ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE 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.SFixed64ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE 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.SFixed64ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE 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.SFixed64ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE 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.SFixed64ExGTELTE 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.SFixed64ExGTELTE 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.SFixed64ExGTELTE 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.SFixed64ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64ExGTELTE) - build.buf.validate.conformance.cases.SFixed64ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64ExGTELTE.class, build.buf.validate.conformance.cases.SFixed64ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64ExGTELTE build() { - build.buf.validate.conformance.cases.SFixed64ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.SFixed64ExGTELTE result = new build.buf.validate.conformance.cases.SFixed64ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.SFixed64ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64ExGTELTE) - private static final build.buf.validate.conformance.cases.SFixed64ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.SFixed64ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64ExGTELTE 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.SFixed64ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTEOrBuilder.java deleted file mode 100644 index 0716c98b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGT.java deleted file mode 100644 index 4872bfd9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64ExLTGT} - */ -public final class SFixed64ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64ExLTGT) - SFixed64ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64ExLTGT.class.getName()); - } - // Use SFixed64ExLTGT.newBuilder() to construct. - private SFixed64ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64ExLTGT.class, build.buf.validate.conformance.cases.SFixed64ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64ExLTGT other = (build.buf.validate.conformance.cases.SFixed64ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64ExLTGT 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.SFixed64ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64ExLTGT 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.SFixed64ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64ExLTGT 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.SFixed64ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64ExLTGT 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.SFixed64ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64ExLTGT 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.SFixed64ExLTGT 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.SFixed64ExLTGT 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.SFixed64ExLTGT 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.SFixed64ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64ExLTGT) - build.buf.validate.conformance.cases.SFixed64ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64ExLTGT.class, build.buf.validate.conformance.cases.SFixed64ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64ExLTGT build() { - build.buf.validate.conformance.cases.SFixed64ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64ExLTGT buildPartial() { - build.buf.validate.conformance.cases.SFixed64ExLTGT result = new build.buf.validate.conformance.cases.SFixed64ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64ExLTGT other) { - if (other == build.buf.validate.conformance.cases.SFixed64ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64ExLTGT) - private static final build.buf.validate.conformance.cases.SFixed64ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64ExLTGT(); - } - - public static build.buf.validate.conformance.cases.SFixed64ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64ExLTGT 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.SFixed64ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGTOrBuilder.java deleted file mode 100644 index 13bf6c80..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Example.java deleted file mode 100644 index 4664515e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Example.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64Example} - */ -public final class SFixed64Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64Example) - SFixed64ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64Example.class.getName()); - } - // Use SFixed64Example.newBuilder() to construct. - private SFixed64Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64Example.class, build.buf.validate.conformance.cases.SFixed64Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64Example other = (build.buf.validate.conformance.cases.SFixed64Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Example 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.SFixed64Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Example 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.SFixed64Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Example 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.SFixed64Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64Example 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.SFixed64Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64Example 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.SFixed64Example 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.SFixed64Example 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.SFixed64Example 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.SFixed64Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64Example) - build.buf.validate.conformance.cases.SFixed64ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64Example.class, build.buf.validate.conformance.cases.SFixed64Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Example build() { - build.buf.validate.conformance.cases.SFixed64Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Example buildPartial() { - build.buf.validate.conformance.cases.SFixed64Example result = new build.buf.validate.conformance.cases.SFixed64Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64Example) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64Example other) { - if (other == build.buf.validate.conformance.cases.SFixed64Example.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64Example) - private static final build.buf.validate.conformance.cases.SFixed64Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64Example(); - } - - public static build.buf.validate.conformance.cases.SFixed64Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64Example 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.SFixed64Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExampleOrBuilder.java deleted file mode 100644 index 8a2de06b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64Example) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GT.java deleted file mode 100644 index 72e47ca6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64GT} - */ -public final class SFixed64GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64GT) - SFixed64GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64GT.class.getName()); - } - // Use SFixed64GT.newBuilder() to construct. - private SFixed64GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GT.class, build.buf.validate.conformance.cases.SFixed64GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64GT other = (build.buf.validate.conformance.cases.SFixed64GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GT 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.SFixed64GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GT 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.SFixed64GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GT 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.SFixed64GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64GT 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.SFixed64GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64GT 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.SFixed64GT 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.SFixed64GT 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.SFixed64GT 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.SFixed64GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64GT) - build.buf.validate.conformance.cases.SFixed64GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GT.class, build.buf.validate.conformance.cases.SFixed64GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GT build() { - build.buf.validate.conformance.cases.SFixed64GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GT buildPartial() { - build.buf.validate.conformance.cases.SFixed64GT result = new build.buf.validate.conformance.cases.SFixed64GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64GT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64GT other) { - if (other == build.buf.validate.conformance.cases.SFixed64GT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64GT) - private static final build.buf.validate.conformance.cases.SFixed64GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64GT(); - } - - public static build.buf.validate.conformance.cases.SFixed64GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64GT 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.SFixed64GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTE.java deleted file mode 100644 index 01e93163..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64GTE} - */ -public final class SFixed64GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64GTE) - SFixed64GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64GTE.class.getName()); - } - // Use SFixed64GTE.newBuilder() to construct. - private SFixed64GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GTE.class, build.buf.validate.conformance.cases.SFixed64GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64GTE other = (build.buf.validate.conformance.cases.SFixed64GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTE 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.SFixed64GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTE 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.SFixed64GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTE 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.SFixed64GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64GTE 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.SFixed64GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64GTE 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.SFixed64GTE 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.SFixed64GTE 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.SFixed64GTE 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.SFixed64GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64GTE) - build.buf.validate.conformance.cases.SFixed64GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GTE.class, build.buf.validate.conformance.cases.SFixed64GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTE build() { - build.buf.validate.conformance.cases.SFixed64GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTE buildPartial() { - build.buf.validate.conformance.cases.SFixed64GTE result = new build.buf.validate.conformance.cases.SFixed64GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64GTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64GTE other) { - if (other == build.buf.validate.conformance.cases.SFixed64GTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64GTE) - private static final build.buf.validate.conformance.cases.SFixed64GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64GTE(); - } - - public static build.buf.validate.conformance.cases.SFixed64GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64GTE 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.SFixed64GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTE.java deleted file mode 100644 index d57943fe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64GTELTE} - */ -public final class SFixed64GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64GTELTE) - SFixed64GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64GTELTE.class.getName()); - } - // Use SFixed64GTELTE.newBuilder() to construct. - private SFixed64GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GTELTE.class, build.buf.validate.conformance.cases.SFixed64GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64GTELTE other = (build.buf.validate.conformance.cases.SFixed64GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTELTE 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.SFixed64GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTELTE 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.SFixed64GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTELTE 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.SFixed64GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64GTELTE 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.SFixed64GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64GTELTE 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.SFixed64GTELTE 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.SFixed64GTELTE 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.SFixed64GTELTE 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.SFixed64GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64GTELTE) - build.buf.validate.conformance.cases.SFixed64GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GTELTE.class, build.buf.validate.conformance.cases.SFixed64GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTELTE build() { - build.buf.validate.conformance.cases.SFixed64GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTELTE buildPartial() { - build.buf.validate.conformance.cases.SFixed64GTELTE result = new build.buf.validate.conformance.cases.SFixed64GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64GTELTE other) { - if (other == build.buf.validate.conformance.cases.SFixed64GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64GTELTE) - private static final build.buf.validate.conformance.cases.SFixed64GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64GTELTE(); - } - - public static build.buf.validate.conformance.cases.SFixed64GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64GTELTE 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.SFixed64GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTEOrBuilder.java deleted file mode 100644 index 553ce626..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTEOrBuilder.java deleted file mode 100644 index 25247a6b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLT.java deleted file mode 100644 index 65507c86..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64GTLT} - */ -public final class SFixed64GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64GTLT) - SFixed64GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64GTLT.class.getName()); - } - // Use SFixed64GTLT.newBuilder() to construct. - private SFixed64GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GTLT.class, build.buf.validate.conformance.cases.SFixed64GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64GTLT other = (build.buf.validate.conformance.cases.SFixed64GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTLT 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.SFixed64GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTLT 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.SFixed64GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64GTLT 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.SFixed64GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64GTLT 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.SFixed64GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64GTLT 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.SFixed64GTLT 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.SFixed64GTLT 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.SFixed64GTLT 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.SFixed64GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64GTLT) - build.buf.validate.conformance.cases.SFixed64GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64GTLT.class, build.buf.validate.conformance.cases.SFixed64GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTLT build() { - build.buf.validate.conformance.cases.SFixed64GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64GTLT buildPartial() { - build.buf.validate.conformance.cases.SFixed64GTLT result = new build.buf.validate.conformance.cases.SFixed64GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64GTLT other) { - if (other == build.buf.validate.conformance.cases.SFixed64GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64GTLT) - private static final build.buf.validate.conformance.cases.SFixed64GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64GTLT(); - } - - public static build.buf.validate.conformance.cases.SFixed64GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64GTLT 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.SFixed64GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLTOrBuilder.java deleted file mode 100644 index 6fd948d8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTOrBuilder.java deleted file mode 100644 index 182284cd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64GT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Ignore.java deleted file mode 100644 index e331d6fa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64Ignore.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64Ignore} - */ -public final class SFixed64Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64Ignore) - SFixed64IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64Ignore.class.getName()); - } - // Use SFixed64Ignore.newBuilder() to construct. - private SFixed64Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64Ignore.class, build.buf.validate.conformance.cases.SFixed64Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64Ignore other = (build.buf.validate.conformance.cases.SFixed64Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Ignore 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.SFixed64Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Ignore 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.SFixed64Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64Ignore 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.SFixed64Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64Ignore 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.SFixed64Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64Ignore 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.SFixed64Ignore 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.SFixed64Ignore 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.SFixed64Ignore 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.SFixed64Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64Ignore) - build.buf.validate.conformance.cases.SFixed64IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64Ignore.class, build.buf.validate.conformance.cases.SFixed64Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Ignore build() { - build.buf.validate.conformance.cases.SFixed64Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64Ignore buildPartial() { - build.buf.validate.conformance.cases.SFixed64Ignore result = new build.buf.validate.conformance.cases.SFixed64Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64Ignore other) { - if (other == build.buf.validate.conformance.cases.SFixed64Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64Ignore) - private static final build.buf.validate.conformance.cases.SFixed64Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64Ignore(); - } - - public static build.buf.validate.conformance.cases.SFixed64Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64Ignore 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.SFixed64Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IgnoreOrBuilder.java deleted file mode 100644 index 4f77e88e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64In.java deleted file mode 100644 index 69fd79d5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64In.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64In} - */ -public final class SFixed64In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64In) - SFixed64InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64In.class.getName()); - } - // Use SFixed64In.newBuilder() to construct. - private SFixed64In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64In.class, build.buf.validate.conformance.cases.SFixed64In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64In other = (build.buf.validate.conformance.cases.SFixed64In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64In 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.SFixed64In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64In 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.SFixed64In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64In 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.SFixed64In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64In 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.SFixed64In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64In 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.SFixed64In 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.SFixed64In 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.SFixed64In 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.SFixed64In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64In) - build.buf.validate.conformance.cases.SFixed64InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64In.class, build.buf.validate.conformance.cases.SFixed64In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64In build() { - build.buf.validate.conformance.cases.SFixed64In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64In buildPartial() { - build.buf.validate.conformance.cases.SFixed64In result = new build.buf.validate.conformance.cases.SFixed64In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64In) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64In other) { - if (other == build.buf.validate.conformance.cases.SFixed64In.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64In) - private static final build.buf.validate.conformance.cases.SFixed64In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64In(); - } - - public static build.buf.validate.conformance.cases.SFixed64In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64In 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.SFixed64In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64InOrBuilder.java deleted file mode 100644 index 68b4c300..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64In) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectType.java deleted file mode 100644 index 3c6aac07..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectType.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64IncorrectType} - */ -public final class SFixed64IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64IncorrectType) - SFixed64IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64IncorrectType.class.getName()); - } - // Use SFixed64IncorrectType.newBuilder() to construct. - private SFixed64IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64IncorrectType.class, build.buf.validate.conformance.cases.SFixed64IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64IncorrectType other = (build.buf.validate.conformance.cases.SFixed64IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64IncorrectType 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.SFixed64IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64IncorrectType 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.SFixed64IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64IncorrectType 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.SFixed64IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64IncorrectType 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.SFixed64IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64IncorrectType 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.SFixed64IncorrectType 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.SFixed64IncorrectType 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.SFixed64IncorrectType 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.SFixed64IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64IncorrectType) - build.buf.validate.conformance.cases.SFixed64IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64IncorrectType.class, build.buf.validate.conformance.cases.SFixed64IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64IncorrectType build() { - build.buf.validate.conformance.cases.SFixed64IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64IncorrectType buildPartial() { - build.buf.validate.conformance.cases.SFixed64IncorrectType result = new build.buf.validate.conformance.cases.SFixed64IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64IncorrectType other) { - if (other == build.buf.validate.conformance.cases.SFixed64IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64IncorrectType) - private static final build.buf.validate.conformance.cases.SFixed64IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64IncorrectType(); - } - - public static build.buf.validate.conformance.cases.SFixed64IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64IncorrectType 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.SFixed64IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectTypeOrBuilder.java deleted file mode 100644 index 4382d439..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LT.java deleted file mode 100644 index d05a9e44..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64LT} - */ -public final class SFixed64LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64LT) - SFixed64LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64LT.class.getName()); - } - // Use SFixed64LT.newBuilder() to construct. - private SFixed64LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64LT.class, build.buf.validate.conformance.cases.SFixed64LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64LT other = (build.buf.validate.conformance.cases.SFixed64LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64LT 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.SFixed64LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64LT 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.SFixed64LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64LT 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.SFixed64LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64LT 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.SFixed64LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64LT 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.SFixed64LT 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.SFixed64LT 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.SFixed64LT 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.SFixed64LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64LT) - build.buf.validate.conformance.cases.SFixed64LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64LT.class, build.buf.validate.conformance.cases.SFixed64LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64LT build() { - build.buf.validate.conformance.cases.SFixed64LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64LT buildPartial() { - build.buf.validate.conformance.cases.SFixed64LT result = new build.buf.validate.conformance.cases.SFixed64LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64LT) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64LT other) { - if (other == build.buf.validate.conformance.cases.SFixed64LT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64LT) - private static final build.buf.validate.conformance.cases.SFixed64LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64LT(); - } - - public static build.buf.validate.conformance.cases.SFixed64LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64LT 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.SFixed64LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTE.java deleted file mode 100644 index 1e087398..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64LTE} - */ -public final class SFixed64LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64LTE) - SFixed64LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64LTE.class.getName()); - } - // Use SFixed64LTE.newBuilder() to construct. - private SFixed64LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64LTE.class, build.buf.validate.conformance.cases.SFixed64LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64LTE other = (build.buf.validate.conformance.cases.SFixed64LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64LTE 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.SFixed64LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64LTE 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.SFixed64LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64LTE 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.SFixed64LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64LTE 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.SFixed64LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64LTE 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.SFixed64LTE 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.SFixed64LTE 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.SFixed64LTE 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.SFixed64LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64LTE) - build.buf.validate.conformance.cases.SFixed64LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64LTE.class, build.buf.validate.conformance.cases.SFixed64LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64LTE build() { - build.buf.validate.conformance.cases.SFixed64LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64LTE buildPartial() { - build.buf.validate.conformance.cases.SFixed64LTE result = new build.buf.validate.conformance.cases.SFixed64LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64LTE) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64LTE other) { - if (other == build.buf.validate.conformance.cases.SFixed64LTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64LTE) - private static final build.buf.validate.conformance.cases.SFixed64LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64LTE(); - } - - public static build.buf.validate.conformance.cases.SFixed64LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64LTE 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.SFixed64LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTEOrBuilder.java deleted file mode 100644 index c130b5c5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTOrBuilder.java deleted file mode 100644 index 242ebd66..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64LT) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64None.java deleted file mode 100644 index 468ecc89..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64None.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64None} - */ -public final class SFixed64None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64None) - SFixed64NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64None.class.getName()); - } - // Use SFixed64None.newBuilder() to construct. - private SFixed64None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64None.class, build.buf.validate.conformance.cases.SFixed64None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64None other = (build.buf.validate.conformance.cases.SFixed64None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64None 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.SFixed64None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64None 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.SFixed64None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64None 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.SFixed64None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64None 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.SFixed64None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64None 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.SFixed64None 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.SFixed64None 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.SFixed64None 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.SFixed64None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64None) - build.buf.validate.conformance.cases.SFixed64NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64None.class, build.buf.validate.conformance.cases.SFixed64None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64None build() { - build.buf.validate.conformance.cases.SFixed64None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64None buildPartial() { - build.buf.validate.conformance.cases.SFixed64None result = new build.buf.validate.conformance.cases.SFixed64None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64None) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64None other) { - if (other == build.buf.validate.conformance.cases.SFixed64None.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64None) - private static final build.buf.validate.conformance.cases.SFixed64None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64None(); - } - - public static build.buf.validate.conformance.cases.SFixed64None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64None 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.SFixed64None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NoneOrBuilder.java deleted file mode 100644 index c5899151..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64None) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val"]; - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotIn.java deleted file mode 100644 index 4d755ca2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SFixed64NotIn} - */ -public final class SFixed64NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SFixed64NotIn) - SFixed64NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64NotIn.class.getName()); - } - // Use SFixed64NotIn.newBuilder() to construct. - private SFixed64NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SFixed64NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64NotIn.class, build.buf.validate.conformance.cases.SFixed64NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSFixed64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(1, val_); - } - 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.SFixed64NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SFixed64NotIn other = (build.buf.validate.conformance.cases.SFixed64NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SFixed64NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64NotIn 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.SFixed64NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64NotIn 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.SFixed64NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SFixed64NotIn 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.SFixed64NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SFixed64NotIn 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.SFixed64NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SFixed64NotIn 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.SFixed64NotIn 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.SFixed64NotIn 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.SFixed64NotIn 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.SFixed64NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SFixed64NotIn) - build.buf.validate.conformance.cases.SFixed64NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SFixed64NotIn.class, build.buf.validate.conformance.cases.SFixed64NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SFixed64NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SFixed64NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SFixed64NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64NotIn build() { - build.buf.validate.conformance.cases.SFixed64NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SFixed64NotIn buildPartial() { - build.buf.validate.conformance.cases.SFixed64NotIn result = new build.buf.validate.conformance.cases.SFixed64NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SFixed64NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SFixed64NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.SFixed64NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SFixed64NotIn other) { - if (other == build.buf.validate.conformance.cases.SFixed64NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 9: { - val_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 long val_ ; - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SFixed64NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SFixed64NotIn) - private static final build.buf.validate.conformance.cases.SFixed64NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SFixed64NotIn(); - } - - public static build.buf.validate.conformance.cases.SFixed64NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64NotIn 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.SFixed64NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotInOrBuilder.java deleted file mode 100644 index aa67f820..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SFixed64NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SFixed64NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SFixed64NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * sfixed64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Const.java deleted file mode 100644 index 27babb44..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Const.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32Const} - */ -public final class SInt32Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32Const) - SInt32ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32Const.class.getName()); - } - // Use SInt32Const.newBuilder() to construct. - private SInt32Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32Const.class, build.buf.validate.conformance.cases.SInt32Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32Const other = (build.buf.validate.conformance.cases.SInt32Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Const 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.SInt32Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Const 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.SInt32Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Const 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.SInt32Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32Const 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.SInt32Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32Const 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.SInt32Const 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.SInt32Const 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.SInt32Const 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.SInt32Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32Const) - build.buf.validate.conformance.cases.SInt32ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32Const.class, build.buf.validate.conformance.cases.SInt32Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Const build() { - build.buf.validate.conformance.cases.SInt32Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Const buildPartial() { - build.buf.validate.conformance.cases.SInt32Const result = new build.buf.validate.conformance.cases.SInt32Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32Const) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32Const other) { - if (other == build.buf.validate.conformance.cases.SInt32Const.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32Const) - private static final build.buf.validate.conformance.cases.SInt32Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32Const(); - } - - public static build.buf.validate.conformance.cases.SInt32Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32Const 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.SInt32Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ConstOrBuilder.java deleted file mode 100644 index 7265957e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32Const) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTE.java deleted file mode 100644 index 959c2ff2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32ExGTELTE} - */ -public final class SInt32ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32ExGTELTE) - SInt32ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32ExGTELTE.class.getName()); - } - // Use SInt32ExGTELTE.newBuilder() to construct. - private SInt32ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32ExGTELTE.class, build.buf.validate.conformance.cases.SInt32ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32ExGTELTE other = (build.buf.validate.conformance.cases.SInt32ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32ExGTELTE 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.SInt32ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32ExGTELTE 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.SInt32ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32ExGTELTE 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.SInt32ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32ExGTELTE 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.SInt32ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32ExGTELTE 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.SInt32ExGTELTE 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.SInt32ExGTELTE 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.SInt32ExGTELTE 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.SInt32ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32ExGTELTE) - build.buf.validate.conformance.cases.SInt32ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32ExGTELTE.class, build.buf.validate.conformance.cases.SInt32ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32ExGTELTE build() { - build.buf.validate.conformance.cases.SInt32ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.SInt32ExGTELTE result = new build.buf.validate.conformance.cases.SInt32ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.SInt32ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32ExGTELTE) - private static final build.buf.validate.conformance.cases.SInt32ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.SInt32ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32ExGTELTE 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.SInt32ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTEOrBuilder.java deleted file mode 100644 index ca3eb9b9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGT.java deleted file mode 100644 index 58a39185..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32ExLTGT} - */ -public final class SInt32ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32ExLTGT) - SInt32ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32ExLTGT.class.getName()); - } - // Use SInt32ExLTGT.newBuilder() to construct. - private SInt32ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32ExLTGT.class, build.buf.validate.conformance.cases.SInt32ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32ExLTGT other = (build.buf.validate.conformance.cases.SInt32ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32ExLTGT 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.SInt32ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32ExLTGT 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.SInt32ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32ExLTGT 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.SInt32ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32ExLTGT 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.SInt32ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32ExLTGT 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.SInt32ExLTGT 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.SInt32ExLTGT 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.SInt32ExLTGT 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.SInt32ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32ExLTGT) - build.buf.validate.conformance.cases.SInt32ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32ExLTGT.class, build.buf.validate.conformance.cases.SInt32ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32ExLTGT build() { - build.buf.validate.conformance.cases.SInt32ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32ExLTGT buildPartial() { - build.buf.validate.conformance.cases.SInt32ExLTGT result = new build.buf.validate.conformance.cases.SInt32ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32ExLTGT other) { - if (other == build.buf.validate.conformance.cases.SInt32ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32ExLTGT) - private static final build.buf.validate.conformance.cases.SInt32ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32ExLTGT(); - } - - public static build.buf.validate.conformance.cases.SInt32ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32ExLTGT 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.SInt32ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGTOrBuilder.java deleted file mode 100644 index 180309ea..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Example.java deleted file mode 100644 index ad01ed1b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Example.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32Example} - */ -public final class SInt32Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32Example) - SInt32ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32Example.class.getName()); - } - // Use SInt32Example.newBuilder() to construct. - private SInt32Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32Example.class, build.buf.validate.conformance.cases.SInt32Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32Example other = (build.buf.validate.conformance.cases.SInt32Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Example 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.SInt32Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Example 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.SInt32Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Example 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.SInt32Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32Example 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.SInt32Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32Example 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.SInt32Example 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.SInt32Example 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.SInt32Example 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.SInt32Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32Example) - build.buf.validate.conformance.cases.SInt32ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32Example.class, build.buf.validate.conformance.cases.SInt32Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Example build() { - build.buf.validate.conformance.cases.SInt32Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Example buildPartial() { - build.buf.validate.conformance.cases.SInt32Example result = new build.buf.validate.conformance.cases.SInt32Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32Example) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32Example other) { - if (other == build.buf.validate.conformance.cases.SInt32Example.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32Example) - private static final build.buf.validate.conformance.cases.SInt32Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32Example(); - } - - public static build.buf.validate.conformance.cases.SInt32Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32Example 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.SInt32Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExampleOrBuilder.java deleted file mode 100644 index 5f68f4e9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32Example) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GT.java deleted file mode 100644 index 51e1b117..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32GT} - */ -public final class SInt32GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32GT) - SInt32GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32GT.class.getName()); - } - // Use SInt32GT.newBuilder() to construct. - private SInt32GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GT.class, build.buf.validate.conformance.cases.SInt32GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32GT other = (build.buf.validate.conformance.cases.SInt32GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GT 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.SInt32GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GT 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.SInt32GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GT 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.SInt32GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32GT 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.SInt32GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32GT 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.SInt32GT 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.SInt32GT 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.SInt32GT 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.SInt32GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32GT) - build.buf.validate.conformance.cases.SInt32GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GT.class, build.buf.validate.conformance.cases.SInt32GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GT build() { - build.buf.validate.conformance.cases.SInt32GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GT buildPartial() { - build.buf.validate.conformance.cases.SInt32GT result = new build.buf.validate.conformance.cases.SInt32GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32GT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32GT other) { - if (other == build.buf.validate.conformance.cases.SInt32GT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32GT) - private static final build.buf.validate.conformance.cases.SInt32GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32GT(); - } - - public static build.buf.validate.conformance.cases.SInt32GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32GT 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.SInt32GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTE.java deleted file mode 100644 index 9f8daadd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32GTE} - */ -public final class SInt32GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32GTE) - SInt32GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32GTE.class.getName()); - } - // Use SInt32GTE.newBuilder() to construct. - private SInt32GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GTE.class, build.buf.validate.conformance.cases.SInt32GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32GTE other = (build.buf.validate.conformance.cases.SInt32GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTE 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.SInt32GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTE 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.SInt32GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTE 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.SInt32GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32GTE 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.SInt32GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32GTE 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.SInt32GTE 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.SInt32GTE 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.SInt32GTE 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.SInt32GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32GTE) - build.buf.validate.conformance.cases.SInt32GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GTE.class, build.buf.validate.conformance.cases.SInt32GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTE build() { - build.buf.validate.conformance.cases.SInt32GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTE buildPartial() { - build.buf.validate.conformance.cases.SInt32GTE result = new build.buf.validate.conformance.cases.SInt32GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32GTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32GTE other) { - if (other == build.buf.validate.conformance.cases.SInt32GTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32GTE) - private static final build.buf.validate.conformance.cases.SInt32GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32GTE(); - } - - public static build.buf.validate.conformance.cases.SInt32GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32GTE 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.SInt32GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTE.java deleted file mode 100644 index fbd852ed..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32GTELTE} - */ -public final class SInt32GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32GTELTE) - SInt32GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32GTELTE.class.getName()); - } - // Use SInt32GTELTE.newBuilder() to construct. - private SInt32GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GTELTE.class, build.buf.validate.conformance.cases.SInt32GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32GTELTE other = (build.buf.validate.conformance.cases.SInt32GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTELTE 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.SInt32GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTELTE 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.SInt32GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTELTE 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.SInt32GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32GTELTE 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.SInt32GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32GTELTE 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.SInt32GTELTE 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.SInt32GTELTE 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.SInt32GTELTE 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.SInt32GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32GTELTE) - build.buf.validate.conformance.cases.SInt32GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GTELTE.class, build.buf.validate.conformance.cases.SInt32GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTELTE build() { - build.buf.validate.conformance.cases.SInt32GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTELTE buildPartial() { - build.buf.validate.conformance.cases.SInt32GTELTE result = new build.buf.validate.conformance.cases.SInt32GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32GTELTE other) { - if (other == build.buf.validate.conformance.cases.SInt32GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32GTELTE) - private static final build.buf.validate.conformance.cases.SInt32GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32GTELTE(); - } - - public static build.buf.validate.conformance.cases.SInt32GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32GTELTE 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.SInt32GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTEOrBuilder.java deleted file mode 100644 index 442911ea..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTEOrBuilder.java deleted file mode 100644 index a188214d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLT.java deleted file mode 100644 index 30e6720f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32GTLT} - */ -public final class SInt32GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32GTLT) - SInt32GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32GTLT.class.getName()); - } - // Use SInt32GTLT.newBuilder() to construct. - private SInt32GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GTLT.class, build.buf.validate.conformance.cases.SInt32GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32GTLT other = (build.buf.validate.conformance.cases.SInt32GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTLT 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.SInt32GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTLT 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.SInt32GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32GTLT 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.SInt32GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32GTLT 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.SInt32GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32GTLT 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.SInt32GTLT 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.SInt32GTLT 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.SInt32GTLT 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.SInt32GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32GTLT) - build.buf.validate.conformance.cases.SInt32GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32GTLT.class, build.buf.validate.conformance.cases.SInt32GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTLT build() { - build.buf.validate.conformance.cases.SInt32GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32GTLT buildPartial() { - build.buf.validate.conformance.cases.SInt32GTLT result = new build.buf.validate.conformance.cases.SInt32GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32GTLT other) { - if (other == build.buf.validate.conformance.cases.SInt32GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32GTLT) - private static final build.buf.validate.conformance.cases.SInt32GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32GTLT(); - } - - public static build.buf.validate.conformance.cases.SInt32GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32GTLT 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.SInt32GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLTOrBuilder.java deleted file mode 100644 index 1f3ac463..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTOrBuilder.java deleted file mode 100644 index 5dd14892..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32GT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Ignore.java deleted file mode 100644 index 8f255608..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32Ignore.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32Ignore} - */ -public final class SInt32Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32Ignore) - SInt32IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32Ignore.class.getName()); - } - // Use SInt32Ignore.newBuilder() to construct. - private SInt32Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32Ignore.class, build.buf.validate.conformance.cases.SInt32Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32Ignore other = (build.buf.validate.conformance.cases.SInt32Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Ignore 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.SInt32Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Ignore 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.SInt32Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32Ignore 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.SInt32Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32Ignore 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.SInt32Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32Ignore 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.SInt32Ignore 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.SInt32Ignore 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.SInt32Ignore 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.SInt32Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32Ignore) - build.buf.validate.conformance.cases.SInt32IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32Ignore.class, build.buf.validate.conformance.cases.SInt32Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Ignore build() { - build.buf.validate.conformance.cases.SInt32Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32Ignore buildPartial() { - build.buf.validate.conformance.cases.SInt32Ignore result = new build.buf.validate.conformance.cases.SInt32Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32Ignore other) { - if (other == build.buf.validate.conformance.cases.SInt32Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32Ignore) - private static final build.buf.validate.conformance.cases.SInt32Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32Ignore(); - } - - public static build.buf.validate.conformance.cases.SInt32Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32Ignore 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.SInt32Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IgnoreOrBuilder.java deleted file mode 100644 index 67ace47e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32In.java deleted file mode 100644 index 1f33cc12..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32In.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32In} - */ -public final class SInt32In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32In) - SInt32InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32In.class.getName()); - } - // Use SInt32In.newBuilder() to construct. - private SInt32In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32In.class, build.buf.validate.conformance.cases.SInt32In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32In other = (build.buf.validate.conformance.cases.SInt32In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32In 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.SInt32In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32In 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.SInt32In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32In 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.SInt32In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32In 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.SInt32In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32In 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.SInt32In 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.SInt32In 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.SInt32In 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.SInt32In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32In) - build.buf.validate.conformance.cases.SInt32InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32In.class, build.buf.validate.conformance.cases.SInt32In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32In build() { - build.buf.validate.conformance.cases.SInt32In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32In buildPartial() { - build.buf.validate.conformance.cases.SInt32In result = new build.buf.validate.conformance.cases.SInt32In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32In) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32In other) { - if (other == build.buf.validate.conformance.cases.SInt32In.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32In) - private static final build.buf.validate.conformance.cases.SInt32In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32In(); - } - - public static build.buf.validate.conformance.cases.SInt32In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32In 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.SInt32In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32InOrBuilder.java deleted file mode 100644 index ccd62eb4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32In) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectType.java deleted file mode 100644 index 1a206456..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectType.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32IncorrectType} - */ -public final class SInt32IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32IncorrectType) - SInt32IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32IncorrectType.class.getName()); - } - // Use SInt32IncorrectType.newBuilder() to construct. - private SInt32IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32IncorrectType.class, build.buf.validate.conformance.cases.SInt32IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32IncorrectType other = (build.buf.validate.conformance.cases.SInt32IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32IncorrectType 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.SInt32IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32IncorrectType 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.SInt32IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32IncorrectType 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.SInt32IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32IncorrectType 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.SInt32IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32IncorrectType 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.SInt32IncorrectType 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.SInt32IncorrectType 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.SInt32IncorrectType 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.SInt32IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32IncorrectType) - build.buf.validate.conformance.cases.SInt32IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32IncorrectType.class, build.buf.validate.conformance.cases.SInt32IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32IncorrectType build() { - build.buf.validate.conformance.cases.SInt32IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32IncorrectType buildPartial() { - build.buf.validate.conformance.cases.SInt32IncorrectType result = new build.buf.validate.conformance.cases.SInt32IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32IncorrectType other) { - if (other == build.buf.validate.conformance.cases.SInt32IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32IncorrectType) - private static final build.buf.validate.conformance.cases.SInt32IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32IncorrectType(); - } - - public static build.buf.validate.conformance.cases.SInt32IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32IncorrectType 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.SInt32IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectTypeOrBuilder.java deleted file mode 100644 index 64b3ac3d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LT.java deleted file mode 100644 index a8980db2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32LT} - */ -public final class SInt32LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32LT) - SInt32LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32LT.class.getName()); - } - // Use SInt32LT.newBuilder() to construct. - private SInt32LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32LT.class, build.buf.validate.conformance.cases.SInt32LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32LT other = (build.buf.validate.conformance.cases.SInt32LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32LT 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.SInt32LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32LT 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.SInt32LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32LT 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.SInt32LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32LT 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.SInt32LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32LT 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.SInt32LT 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.SInt32LT 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.SInt32LT 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.SInt32LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32LT) - build.buf.validate.conformance.cases.SInt32LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32LT.class, build.buf.validate.conformance.cases.SInt32LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32LT build() { - build.buf.validate.conformance.cases.SInt32LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32LT buildPartial() { - build.buf.validate.conformance.cases.SInt32LT result = new build.buf.validate.conformance.cases.SInt32LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32LT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32LT other) { - if (other == build.buf.validate.conformance.cases.SInt32LT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32LT) - private static final build.buf.validate.conformance.cases.SInt32LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32LT(); - } - - public static build.buf.validate.conformance.cases.SInt32LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32LT 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.SInt32LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTE.java deleted file mode 100644 index 4a6e2c9b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32LTE} - */ -public final class SInt32LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32LTE) - SInt32LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32LTE.class.getName()); - } - // Use SInt32LTE.newBuilder() to construct. - private SInt32LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32LTE.class, build.buf.validate.conformance.cases.SInt32LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32LTE other = (build.buf.validate.conformance.cases.SInt32LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32LTE 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.SInt32LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32LTE 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.SInt32LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32LTE 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.SInt32LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32LTE 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.SInt32LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32LTE 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.SInt32LTE 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.SInt32LTE 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.SInt32LTE 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.SInt32LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32LTE) - build.buf.validate.conformance.cases.SInt32LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32LTE.class, build.buf.validate.conformance.cases.SInt32LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32LTE build() { - build.buf.validate.conformance.cases.SInt32LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32LTE buildPartial() { - build.buf.validate.conformance.cases.SInt32LTE result = new build.buf.validate.conformance.cases.SInt32LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32LTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32LTE other) { - if (other == build.buf.validate.conformance.cases.SInt32LTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32LTE) - private static final build.buf.validate.conformance.cases.SInt32LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32LTE(); - } - - public static build.buf.validate.conformance.cases.SInt32LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32LTE 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.SInt32LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTEOrBuilder.java deleted file mode 100644 index d3f22df0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTOrBuilder.java deleted file mode 100644 index 50be11b0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32LT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32None.java deleted file mode 100644 index 06bb27d4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32None.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32None} - */ -public final class SInt32None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32None) - SInt32NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32None.class.getName()); - } - // Use SInt32None.newBuilder() to construct. - private SInt32None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32None.class, build.buf.validate.conformance.cases.SInt32None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32None other = (build.buf.validate.conformance.cases.SInt32None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32None 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.SInt32None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32None 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.SInt32None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32None 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.SInt32None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32None 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.SInt32None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32None 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.SInt32None 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.SInt32None 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.SInt32None 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.SInt32None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32None) - build.buf.validate.conformance.cases.SInt32NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32None.class, build.buf.validate.conformance.cases.SInt32None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32None build() { - build.buf.validate.conformance.cases.SInt32None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32None buildPartial() { - build.buf.validate.conformance.cases.SInt32None result = new build.buf.validate.conformance.cases.SInt32None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32None) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32None other) { - if (other == build.buf.validate.conformance.cases.SInt32None.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32None) - private static final build.buf.validate.conformance.cases.SInt32None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32None(); - } - - public static build.buf.validate.conformance.cases.SInt32None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32None 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.SInt32None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NoneOrBuilder.java deleted file mode 100644 index 29a29b00..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32None) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val"]; - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotIn.java deleted file mode 100644 index 9333e7f6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotIn.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt32NotIn} - */ -public final class SInt32NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt32NotIn) - SInt32NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32NotIn.class.getName()); - } - // Use SInt32NotIn.newBuilder() to construct. - private SInt32NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt32NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32NotIn.class, build.buf.validate.conformance.cases.SInt32NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeSInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, val_); - } - 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.SInt32NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt32NotIn other = (build.buf.validate.conformance.cases.SInt32NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt32NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32NotIn 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.SInt32NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32NotIn 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.SInt32NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt32NotIn 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.SInt32NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt32NotIn 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.SInt32NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt32NotIn 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.SInt32NotIn 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.SInt32NotIn 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.SInt32NotIn 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.SInt32NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt32NotIn) - build.buf.validate.conformance.cases.SInt32NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt32NotIn.class, build.buf.validate.conformance.cases.SInt32NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt32NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt32NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt32NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32NotIn build() { - build.buf.validate.conformance.cases.SInt32NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt32NotIn buildPartial() { - build.buf.validate.conformance.cases.SInt32NotIn result = new build.buf.validate.conformance.cases.SInt32NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt32NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt32NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.SInt32NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt32NotIn other) { - if (other == build.buf.validate.conformance.cases.SInt32NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt32NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt32NotIn) - private static final build.buf.validate.conformance.cases.SInt32NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt32NotIn(); - } - - public static build.buf.validate.conformance.cases.SInt32NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32NotIn 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.SInt32NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotInOrBuilder.java deleted file mode 100644 index d7f5d149..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt32NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt32NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt32NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * sint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Const.java deleted file mode 100644 index 4122cf52..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Const.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64Const} - */ -public final class SInt64Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64Const) - SInt64ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64Const.class.getName()); - } - // Use SInt64Const.newBuilder() to construct. - private SInt64Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64Const.class, build.buf.validate.conformance.cases.SInt64Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64Const other = (build.buf.validate.conformance.cases.SInt64Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Const 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.SInt64Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Const 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.SInt64Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Const 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.SInt64Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64Const 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.SInt64Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64Const 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.SInt64Const 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.SInt64Const 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.SInt64Const 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.SInt64Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64Const) - build.buf.validate.conformance.cases.SInt64ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64Const.class, build.buf.validate.conformance.cases.SInt64Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Const build() { - build.buf.validate.conformance.cases.SInt64Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Const buildPartial() { - build.buf.validate.conformance.cases.SInt64Const result = new build.buf.validate.conformance.cases.SInt64Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64Const) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64Const other) { - if (other == build.buf.validate.conformance.cases.SInt64Const.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64Const) - private static final build.buf.validate.conformance.cases.SInt64Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64Const(); - } - - public static build.buf.validate.conformance.cases.SInt64Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64Const 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.SInt64Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ConstOrBuilder.java deleted file mode 100644 index c716dfd0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64Const) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTE.java deleted file mode 100644 index a1249596..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64ExGTELTE} - */ -public final class SInt64ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64ExGTELTE) - SInt64ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64ExGTELTE.class.getName()); - } - // Use SInt64ExGTELTE.newBuilder() to construct. - private SInt64ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64ExGTELTE.class, build.buf.validate.conformance.cases.SInt64ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64ExGTELTE other = (build.buf.validate.conformance.cases.SInt64ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64ExGTELTE 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.SInt64ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64ExGTELTE 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.SInt64ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64ExGTELTE 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.SInt64ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64ExGTELTE 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.SInt64ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64ExGTELTE 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.SInt64ExGTELTE 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.SInt64ExGTELTE 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.SInt64ExGTELTE 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.SInt64ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64ExGTELTE) - build.buf.validate.conformance.cases.SInt64ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64ExGTELTE.class, build.buf.validate.conformance.cases.SInt64ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64ExGTELTE build() { - build.buf.validate.conformance.cases.SInt64ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.SInt64ExGTELTE result = new build.buf.validate.conformance.cases.SInt64ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.SInt64ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64ExGTELTE) - private static final build.buf.validate.conformance.cases.SInt64ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.SInt64ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64ExGTELTE 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.SInt64ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTEOrBuilder.java deleted file mode 100644 index f45253cb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGT.java deleted file mode 100644 index d47ef938..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64ExLTGT} - */ -public final class SInt64ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64ExLTGT) - SInt64ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64ExLTGT.class.getName()); - } - // Use SInt64ExLTGT.newBuilder() to construct. - private SInt64ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64ExLTGT.class, build.buf.validate.conformance.cases.SInt64ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64ExLTGT other = (build.buf.validate.conformance.cases.SInt64ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64ExLTGT 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.SInt64ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64ExLTGT 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.SInt64ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64ExLTGT 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.SInt64ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64ExLTGT 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.SInt64ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64ExLTGT 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.SInt64ExLTGT 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.SInt64ExLTGT 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.SInt64ExLTGT 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.SInt64ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64ExLTGT) - build.buf.validate.conformance.cases.SInt64ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64ExLTGT.class, build.buf.validate.conformance.cases.SInt64ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64ExLTGT build() { - build.buf.validate.conformance.cases.SInt64ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64ExLTGT buildPartial() { - build.buf.validate.conformance.cases.SInt64ExLTGT result = new build.buf.validate.conformance.cases.SInt64ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64ExLTGT other) { - if (other == build.buf.validate.conformance.cases.SInt64ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64ExLTGT) - private static final build.buf.validate.conformance.cases.SInt64ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64ExLTGT(); - } - - public static build.buf.validate.conformance.cases.SInt64ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64ExLTGT 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.SInt64ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGTOrBuilder.java deleted file mode 100644 index d426f404..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Example.java deleted file mode 100644 index 41605d5f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Example.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64Example} - */ -public final class SInt64Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64Example) - SInt64ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64Example.class.getName()); - } - // Use SInt64Example.newBuilder() to construct. - private SInt64Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64Example.class, build.buf.validate.conformance.cases.SInt64Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64Example other = (build.buf.validate.conformance.cases.SInt64Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Example 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.SInt64Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Example 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.SInt64Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Example 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.SInt64Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64Example 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.SInt64Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64Example 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.SInt64Example 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.SInt64Example 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.SInt64Example 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.SInt64Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64Example) - build.buf.validate.conformance.cases.SInt64ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64Example.class, build.buf.validate.conformance.cases.SInt64Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Example build() { - build.buf.validate.conformance.cases.SInt64Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Example buildPartial() { - build.buf.validate.conformance.cases.SInt64Example result = new build.buf.validate.conformance.cases.SInt64Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64Example) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64Example other) { - if (other == build.buf.validate.conformance.cases.SInt64Example.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64Example) - private static final build.buf.validate.conformance.cases.SInt64Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64Example(); - } - - public static build.buf.validate.conformance.cases.SInt64Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64Example 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.SInt64Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExampleOrBuilder.java deleted file mode 100644 index bd39137d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64Example) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GT.java deleted file mode 100644 index 73e68708..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64GT} - */ -public final class SInt64GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64GT) - SInt64GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64GT.class.getName()); - } - // Use SInt64GT.newBuilder() to construct. - private SInt64GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GT.class, build.buf.validate.conformance.cases.SInt64GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64GT other = (build.buf.validate.conformance.cases.SInt64GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GT 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.SInt64GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GT 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.SInt64GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GT 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.SInt64GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64GT 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.SInt64GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64GT 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.SInt64GT 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.SInt64GT 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.SInt64GT 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.SInt64GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64GT) - build.buf.validate.conformance.cases.SInt64GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GT.class, build.buf.validate.conformance.cases.SInt64GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GT build() { - build.buf.validate.conformance.cases.SInt64GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GT buildPartial() { - build.buf.validate.conformance.cases.SInt64GT result = new build.buf.validate.conformance.cases.SInt64GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64GT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64GT other) { - if (other == build.buf.validate.conformance.cases.SInt64GT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64GT) - private static final build.buf.validate.conformance.cases.SInt64GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64GT(); - } - - public static build.buf.validate.conformance.cases.SInt64GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64GT 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.SInt64GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTE.java deleted file mode 100644 index 6c482e92..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64GTE} - */ -public final class SInt64GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64GTE) - SInt64GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64GTE.class.getName()); - } - // Use SInt64GTE.newBuilder() to construct. - private SInt64GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GTE.class, build.buf.validate.conformance.cases.SInt64GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64GTE other = (build.buf.validate.conformance.cases.SInt64GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTE 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.SInt64GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTE 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.SInt64GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTE 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.SInt64GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64GTE 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.SInt64GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64GTE 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.SInt64GTE 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.SInt64GTE 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.SInt64GTE 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.SInt64GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64GTE) - build.buf.validate.conformance.cases.SInt64GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GTE.class, build.buf.validate.conformance.cases.SInt64GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTE build() { - build.buf.validate.conformance.cases.SInt64GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTE buildPartial() { - build.buf.validate.conformance.cases.SInt64GTE result = new build.buf.validate.conformance.cases.SInt64GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64GTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64GTE other) { - if (other == build.buf.validate.conformance.cases.SInt64GTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64GTE) - private static final build.buf.validate.conformance.cases.SInt64GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64GTE(); - } - - public static build.buf.validate.conformance.cases.SInt64GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64GTE 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.SInt64GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTE.java deleted file mode 100644 index 2b91ccee..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64GTELTE} - */ -public final class SInt64GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64GTELTE) - SInt64GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64GTELTE.class.getName()); - } - // Use SInt64GTELTE.newBuilder() to construct. - private SInt64GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GTELTE.class, build.buf.validate.conformance.cases.SInt64GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64GTELTE other = (build.buf.validate.conformance.cases.SInt64GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTELTE 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.SInt64GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTELTE 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.SInt64GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTELTE 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.SInt64GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64GTELTE 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.SInt64GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64GTELTE 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.SInt64GTELTE 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.SInt64GTELTE 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.SInt64GTELTE 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.SInt64GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64GTELTE) - build.buf.validate.conformance.cases.SInt64GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GTELTE.class, build.buf.validate.conformance.cases.SInt64GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTELTE build() { - build.buf.validate.conformance.cases.SInt64GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTELTE buildPartial() { - build.buf.validate.conformance.cases.SInt64GTELTE result = new build.buf.validate.conformance.cases.SInt64GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64GTELTE other) { - if (other == build.buf.validate.conformance.cases.SInt64GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64GTELTE) - private static final build.buf.validate.conformance.cases.SInt64GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64GTELTE(); - } - - public static build.buf.validate.conformance.cases.SInt64GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64GTELTE 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.SInt64GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTEOrBuilder.java deleted file mode 100644 index 3293802f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTEOrBuilder.java deleted file mode 100644 index 92bfffd0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLT.java deleted file mode 100644 index 2ac17cd3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64GTLT} - */ -public final class SInt64GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64GTLT) - SInt64GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64GTLT.class.getName()); - } - // Use SInt64GTLT.newBuilder() to construct. - private SInt64GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GTLT.class, build.buf.validate.conformance.cases.SInt64GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64GTLT other = (build.buf.validate.conformance.cases.SInt64GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTLT 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.SInt64GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTLT 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.SInt64GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64GTLT 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.SInt64GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64GTLT 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.SInt64GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64GTLT 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.SInt64GTLT 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.SInt64GTLT 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.SInt64GTLT 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.SInt64GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64GTLT) - build.buf.validate.conformance.cases.SInt64GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64GTLT.class, build.buf.validate.conformance.cases.SInt64GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTLT build() { - build.buf.validate.conformance.cases.SInt64GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64GTLT buildPartial() { - build.buf.validate.conformance.cases.SInt64GTLT result = new build.buf.validate.conformance.cases.SInt64GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64GTLT other) { - if (other == build.buf.validate.conformance.cases.SInt64GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64GTLT) - private static final build.buf.validate.conformance.cases.SInt64GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64GTLT(); - } - - public static build.buf.validate.conformance.cases.SInt64GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64GTLT 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.SInt64GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLTOrBuilder.java deleted file mode 100644 index f25798d6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTOrBuilder.java deleted file mode 100644 index e5c25b1f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64GT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Ignore.java deleted file mode 100644 index 79291375..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64Ignore.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64Ignore} - */ -public final class SInt64Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64Ignore) - SInt64IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64Ignore.class.getName()); - } - // Use SInt64Ignore.newBuilder() to construct. - private SInt64Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64Ignore.class, build.buf.validate.conformance.cases.SInt64Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64Ignore other = (build.buf.validate.conformance.cases.SInt64Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Ignore 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.SInt64Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Ignore 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.SInt64Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64Ignore 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.SInt64Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64Ignore 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.SInt64Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64Ignore 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.SInt64Ignore 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.SInt64Ignore 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.SInt64Ignore 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.SInt64Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64Ignore) - build.buf.validate.conformance.cases.SInt64IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64Ignore.class, build.buf.validate.conformance.cases.SInt64Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Ignore build() { - build.buf.validate.conformance.cases.SInt64Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64Ignore buildPartial() { - build.buf.validate.conformance.cases.SInt64Ignore result = new build.buf.validate.conformance.cases.SInt64Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64Ignore other) { - if (other == build.buf.validate.conformance.cases.SInt64Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64Ignore) - private static final build.buf.validate.conformance.cases.SInt64Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64Ignore(); - } - - public static build.buf.validate.conformance.cases.SInt64Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64Ignore 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.SInt64Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IgnoreOrBuilder.java deleted file mode 100644 index fa0105cd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64In.java deleted file mode 100644 index c82ae3db..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64In.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64In} - */ -public final class SInt64In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64In) - SInt64InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64In.class.getName()); - } - // Use SInt64In.newBuilder() to construct. - private SInt64In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64In.class, build.buf.validate.conformance.cases.SInt64In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64In other = (build.buf.validate.conformance.cases.SInt64In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64In 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.SInt64In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64In 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.SInt64In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64In 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.SInt64In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64In 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.SInt64In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64In 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.SInt64In 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.SInt64In 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.SInt64In 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.SInt64In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64In) - build.buf.validate.conformance.cases.SInt64InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64In.class, build.buf.validate.conformance.cases.SInt64In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64In build() { - build.buf.validate.conformance.cases.SInt64In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64In buildPartial() { - build.buf.validate.conformance.cases.SInt64In result = new build.buf.validate.conformance.cases.SInt64In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64In) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64In other) { - if (other == build.buf.validate.conformance.cases.SInt64In.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64In) - private static final build.buf.validate.conformance.cases.SInt64In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64In(); - } - - public static build.buf.validate.conformance.cases.SInt64In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64In 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.SInt64In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64InOrBuilder.java deleted file mode 100644 index 2e6ebcdf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64In) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectType.java deleted file mode 100644 index c6232a5f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectType.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64IncorrectType} - */ -public final class SInt64IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64IncorrectType) - SInt64IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64IncorrectType.class.getName()); - } - // Use SInt64IncorrectType.newBuilder() to construct. - private SInt64IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64IncorrectType.class, build.buf.validate.conformance.cases.SInt64IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64IncorrectType other = (build.buf.validate.conformance.cases.SInt64IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64IncorrectType 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.SInt64IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64IncorrectType 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.SInt64IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64IncorrectType 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.SInt64IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64IncorrectType 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.SInt64IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64IncorrectType 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.SInt64IncorrectType 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.SInt64IncorrectType 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.SInt64IncorrectType 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.SInt64IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64IncorrectType) - build.buf.validate.conformance.cases.SInt64IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64IncorrectType.class, build.buf.validate.conformance.cases.SInt64IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64IncorrectType build() { - build.buf.validate.conformance.cases.SInt64IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64IncorrectType buildPartial() { - build.buf.validate.conformance.cases.SInt64IncorrectType result = new build.buf.validate.conformance.cases.SInt64IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64IncorrectType other) { - if (other == build.buf.validate.conformance.cases.SInt64IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64IncorrectType) - private static final build.buf.validate.conformance.cases.SInt64IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64IncorrectType(); - } - - public static build.buf.validate.conformance.cases.SInt64IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64IncorrectType 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.SInt64IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectTypeOrBuilder.java deleted file mode 100644 index c8f5ec03..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LT.java deleted file mode 100644 index 4916d1b3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64LT} - */ -public final class SInt64LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64LT) - SInt64LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64LT.class.getName()); - } - // Use SInt64LT.newBuilder() to construct. - private SInt64LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64LT.class, build.buf.validate.conformance.cases.SInt64LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64LT other = (build.buf.validate.conformance.cases.SInt64LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64LT 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.SInt64LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64LT 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.SInt64LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64LT 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.SInt64LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64LT 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.SInt64LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64LT 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.SInt64LT 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.SInt64LT 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.SInt64LT 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.SInt64LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64LT) - build.buf.validate.conformance.cases.SInt64LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64LT.class, build.buf.validate.conformance.cases.SInt64LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64LT build() { - build.buf.validate.conformance.cases.SInt64LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64LT buildPartial() { - build.buf.validate.conformance.cases.SInt64LT result = new build.buf.validate.conformance.cases.SInt64LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64LT) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64LT other) { - if (other == build.buf.validate.conformance.cases.SInt64LT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64LT) - private static final build.buf.validate.conformance.cases.SInt64LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64LT(); - } - - public static build.buf.validate.conformance.cases.SInt64LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64LT 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.SInt64LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTE.java deleted file mode 100644 index d807146a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64LTE} - */ -public final class SInt64LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64LTE) - SInt64LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64LTE.class.getName()); - } - // Use SInt64LTE.newBuilder() to construct. - private SInt64LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64LTE.class, build.buf.validate.conformance.cases.SInt64LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64LTE other = (build.buf.validate.conformance.cases.SInt64LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64LTE 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.SInt64LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64LTE 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.SInt64LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64LTE 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.SInt64LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64LTE 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.SInt64LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64LTE 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.SInt64LTE 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.SInt64LTE 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.SInt64LTE 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.SInt64LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64LTE) - build.buf.validate.conformance.cases.SInt64LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64LTE.class, build.buf.validate.conformance.cases.SInt64LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64LTE build() { - build.buf.validate.conformance.cases.SInt64LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64LTE buildPartial() { - build.buf.validate.conformance.cases.SInt64LTE result = new build.buf.validate.conformance.cases.SInt64LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64LTE) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64LTE other) { - if (other == build.buf.validate.conformance.cases.SInt64LTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64LTE) - private static final build.buf.validate.conformance.cases.SInt64LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64LTE(); - } - - public static build.buf.validate.conformance.cases.SInt64LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64LTE 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.SInt64LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTEOrBuilder.java deleted file mode 100644 index 31997c22..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTOrBuilder.java deleted file mode 100644 index b2c41885..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64LT) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64None.java deleted file mode 100644 index 9b830f67..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64None.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64None} - */ -public final class SInt64None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64None) - SInt64NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64None.class.getName()); - } - // Use SInt64None.newBuilder() to construct. - private SInt64None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64None.class, build.buf.validate.conformance.cases.SInt64None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64None other = (build.buf.validate.conformance.cases.SInt64None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64None 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.SInt64None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64None 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.SInt64None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64None 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.SInt64None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64None 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.SInt64None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64None 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.SInt64None 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.SInt64None 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.SInt64None 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.SInt64None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64None) - build.buf.validate.conformance.cases.SInt64NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64None.class, build.buf.validate.conformance.cases.SInt64None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64None build() { - build.buf.validate.conformance.cases.SInt64None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64None buildPartial() { - build.buf.validate.conformance.cases.SInt64None result = new build.buf.validate.conformance.cases.SInt64None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64None) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64None other) { - if (other == build.buf.validate.conformance.cases.SInt64None.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64None) - private static final build.buf.validate.conformance.cases.SInt64None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64None(); - } - - public static build.buf.validate.conformance.cases.SInt64None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64None 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.SInt64None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NoneOrBuilder.java deleted file mode 100644 index b0dde623..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64None) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val"]; - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotIn.java deleted file mode 100644 index 485f5b01..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.SInt64NotIn} - */ -public final class SInt64NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.SInt64NotIn) - SInt64NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64NotIn.class.getName()); - } - // Use SInt64NotIn.newBuilder() to construct. - private SInt64NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SInt64NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64NotIn.class, build.buf.validate.conformance.cases.SInt64NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeSInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, val_); - } - 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.SInt64NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.SInt64NotIn other = (build.buf.validate.conformance.cases.SInt64NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.SInt64NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64NotIn 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.SInt64NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64NotIn 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.SInt64NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.SInt64NotIn 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.SInt64NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.SInt64NotIn 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.SInt64NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.SInt64NotIn 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.SInt64NotIn 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.SInt64NotIn 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.SInt64NotIn 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.SInt64NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.SInt64NotIn) - build.buf.validate.conformance.cases.SInt64NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.SInt64NotIn.class, build.buf.validate.conformance.cases.SInt64NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.SInt64NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_SInt64NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.SInt64NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64NotIn build() { - build.buf.validate.conformance.cases.SInt64NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.SInt64NotIn buildPartial() { - build.buf.validate.conformance.cases.SInt64NotIn result = new build.buf.validate.conformance.cases.SInt64NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.SInt64NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.SInt64NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.SInt64NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.SInt64NotIn other) { - if (other == build.buf.validate.conformance.cases.SInt64NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.SInt64NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.SInt64NotIn) - private static final build.buf.validate.conformance.cases.SInt64NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.SInt64NotIn(); - } - - public static build.buf.validate.conformance.cases.SInt64NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64NotIn 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.SInt64NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotInOrBuilder.java deleted file mode 100644 index 067d1115..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/SInt64NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface SInt64NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.SInt64NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * sint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} 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 deleted file mode 100644 index 7a75f28b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023} - */ -public final class StandardPredefinedAndCustomRuleEdition2023 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023) - StandardPredefinedAndCustomRuleEdition2023OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StandardPredefinedAndCustomRuleEdition2023.class.getName()); - } - // Use StandardPredefinedAndCustomRuleEdition2023.newBuilder() to construct. - private StandardPredefinedAndCustomRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StandardPredefinedAndCustomRuleEdition2023() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.class, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder.class); - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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.writeInt32(1, a_); - } - 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 - .computeInt32Size(1, a_); - } - 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.StandardPredefinedAndCustomRuleEdition2023)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 other = (build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023) obj; - - if (hasA() != other.hasA()) return false; - if (hasA()) { - if (getA() - != other.getA()) 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 (hasA()) { - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023) - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.class, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - 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_StandardPredefinedAndCustomRuleEdition2023_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 build() { - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 buildPartial() { - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 result = new build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - 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.StandardPredefinedAndCustomRuleEdition2023) { - return mergeFrom((build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 other) { - if (other == build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023.getDefaultInstance()) return this; - if (other.hasA()) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023) - private static final build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023(); - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StandardPredefinedAndCustomRuleEdition2023 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.StandardPredefinedAndCustomRuleEdition2023 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - 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 deleted file mode 100644 index 788e1521..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface StandardPredefinedAndCustomRuleEdition2023OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleEdition2023) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 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) = { ... } - * @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 deleted file mode 100644 index 6adc4d99..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2.java +++ /dev/null @@ -1,456 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2} - */ -public final class StandardPredefinedAndCustomRuleProto2 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2) - StandardPredefinedAndCustomRuleProto2OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StandardPredefinedAndCustomRuleProto2.class.getName()); - } - // Use StandardPredefinedAndCustomRuleProto2.newBuilder() to construct. - private StandardPredefinedAndCustomRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StandardPredefinedAndCustomRuleProto2() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.class, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder.class); - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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.writeInt32(1, a_); - } - 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 - .computeInt32Size(1, a_); - } - 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.StandardPredefinedAndCustomRuleProto2)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 other = (build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2) obj; - - if (hasA() != other.hasA()) return false; - if (hasA()) { - if (getA() - != other.getA()) 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 (hasA()) { - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2) - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.class, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - 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_StandardPredefinedAndCustomRuleProto2_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 build() { - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 buildPartial() { - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 result = new build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - 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.StandardPredefinedAndCustomRuleProto2) { - return mergeFrom((build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 other) { - if (other == build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2.getDefaultInstance()) return this; - if (other.hasA()) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return Whether the a field is set. - */ - @java.lang.Override - public boolean hasA() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2) - private static final build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2(); - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StandardPredefinedAndCustomRuleProto2 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.StandardPredefinedAndCustomRuleProto2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - 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 deleted file mode 100644 index de90eedc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2OrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface StandardPredefinedAndCustomRuleProto2OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto2) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 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) = { ... } - * @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 deleted file mode 100644 index 563f0dc7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3.java +++ /dev/null @@ -1,431 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3} - */ -public final class StandardPredefinedAndCustomRuleProto3 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) - StandardPredefinedAndCustomRuleProto3OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StandardPredefinedAndCustomRuleProto3.class.getName()); - } - // Use StandardPredefinedAndCustomRuleProto3.newBuilder() to construct. - private StandardPredefinedAndCustomRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StandardPredefinedAndCustomRuleProto3() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.class, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - 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.StandardPredefinedAndCustomRuleProto3)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 other = (build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) obj; - - if (getA() - != other.getA()) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.class, build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - 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_StandardPredefinedAndCustomRuleProto3_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 build() { - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 buildPartial() { - build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 result = new build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) { - return mergeFrom((build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 other) { - if (other == build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) - private static final build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3(); - } - - public static build.buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StandardPredefinedAndCustomRuleProto3 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.StandardPredefinedAndCustomRuleProto3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - 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 deleted file mode 100644 index 06b1ba43..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3OrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// 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.2 - -package build.buf.validate.conformance.cases; - -public interface StandardPredefinedAndCustomRuleProto3OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StandardPredefinedAndCustomRuleProto3) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 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/StringAddress.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringAddress.java deleted file mode 100644 index c8a9c260..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringAddress.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringAddress} - */ -public final class StringAddress extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringAddress) - StringAddressOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringAddress.class.getName()); - } - // Use StringAddress.newBuilder() to construct. - private StringAddress(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringAddress() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringAddress_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringAddress_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringAddress.class, build.buf.validate.conformance.cases.StringAddress.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringAddress)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringAddress other = (build.buf.validate.conformance.cases.StringAddress) obj; - - 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(); - 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.StringAddress parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringAddress 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.StringAddress parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringAddress 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.StringAddress parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringAddress 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.StringAddress parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringAddress 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.StringAddress parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringAddress 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.StringAddress 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.StringAddress 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.StringAddress 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.StringAddress} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringAddress) - build.buf.validate.conformance.cases.StringAddressOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringAddress_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringAddress_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringAddress.class, build.buf.validate.conformance.cases.StringAddress.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringAddress.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringAddress_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringAddress getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringAddress.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringAddress build() { - build.buf.validate.conformance.cases.StringAddress result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringAddress buildPartial() { - build.buf.validate.conformance.cases.StringAddress result = new build.buf.validate.conformance.cases.StringAddress(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringAddress result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringAddress) { - return mergeFrom((build.buf.validate.conformance.cases.StringAddress)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringAddress other) { - if (other == build.buf.validate.conformance.cases.StringAddress.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringAddress) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringAddress) - private static final build.buf.validate.conformance.cases.StringAddress DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringAddress(); - } - - public static build.buf.validate.conformance.cases.StringAddress getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringAddress 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.StringAddress getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringAddressOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringAddressOrBuilder.java deleted file mode 100644 index a6913bfc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringAddressOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringAddressOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringAddress) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringConst.java deleted file mode 100644 index 06f48fd2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringConst.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringConst} - */ -public final class StringConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringConst) - StringConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringConst.class.getName()); - } - // Use StringConst.newBuilder() to construct. - private StringConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringConst() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringConst.class, build.buf.validate.conformance.cases.StringConst.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringConst other = (build.buf.validate.conformance.cases.StringConst) obj; - - 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(); - 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.StringConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringConst 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.StringConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringConst 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.StringConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringConst 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.StringConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringConst 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.StringConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringConst 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.StringConst 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.StringConst 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.StringConst 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.StringConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringConst) - build.buf.validate.conformance.cases.StringConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringConst.class, build.buf.validate.conformance.cases.StringConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringConst.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringConst build() { - build.buf.validate.conformance.cases.StringConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringConst buildPartial() { - build.buf.validate.conformance.cases.StringConst result = new build.buf.validate.conformance.cases.StringConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringConst result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringConst) { - return mergeFrom((build.buf.validate.conformance.cases.StringConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringConst other) { - if (other == build.buf.validate.conformance.cases.StringConst.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringConst) - private static final build.buf.validate.conformance.cases.StringConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringConst(); - } - - public static build.buf.validate.conformance.cases.StringConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringConst 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.StringConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringConstOrBuilder.java deleted file mode 100644 index b4e6ae16..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringConstOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringConst) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringContains.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringContains.java deleted file mode 100644 index 33bc3016..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringContains.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringContains} - */ -public final class StringContains extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringContains) - StringContainsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringContains.class.getName()); - } - // Use StringContains.newBuilder() to construct. - private StringContains(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringContains() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringContains_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringContains_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringContains.class, build.buf.validate.conformance.cases.StringContains.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringContains)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringContains other = (build.buf.validate.conformance.cases.StringContains) obj; - - 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(); - 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.StringContains parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringContains 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.StringContains parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringContains 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.StringContains parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringContains 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.StringContains parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringContains 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.StringContains parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringContains 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.StringContains 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.StringContains 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.StringContains 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.StringContains} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringContains) - build.buf.validate.conformance.cases.StringContainsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringContains_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringContains_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringContains.class, build.buf.validate.conformance.cases.StringContains.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringContains.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringContains_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringContains getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringContains.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringContains build() { - build.buf.validate.conformance.cases.StringContains result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringContains buildPartial() { - build.buf.validate.conformance.cases.StringContains result = new build.buf.validate.conformance.cases.StringContains(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringContains result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringContains) { - return mergeFrom((build.buf.validate.conformance.cases.StringContains)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringContains other) { - if (other == build.buf.validate.conformance.cases.StringContains.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringContains) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringContains) - private static final build.buf.validate.conformance.cases.StringContains DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringContains(); - } - - public static build.buf.validate.conformance.cases.StringContains getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringContains 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.StringContains getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringContainsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringContainsOrBuilder.java deleted file mode 100644 index eb1203ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringContainsOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringContainsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringContains) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEmail.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringEmail.java deleted file mode 100644 index 92c1d7d8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEmail.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringEmail} - */ -public final class StringEmail extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringEmail) - StringEmailOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringEmail.class.getName()); - } - // Use StringEmail.newBuilder() to construct. - private StringEmail(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringEmail() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEmail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEmail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringEmail.class, build.buf.validate.conformance.cases.StringEmail.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringEmail)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringEmail other = (build.buf.validate.conformance.cases.StringEmail) obj; - - 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(); - 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.StringEmail parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEmail 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.StringEmail parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEmail 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.StringEmail parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEmail 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.StringEmail parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringEmail 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.StringEmail parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringEmail 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.StringEmail 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.StringEmail 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.StringEmail 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.StringEmail} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringEmail) - build.buf.validate.conformance.cases.StringEmailOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEmail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEmail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringEmail.class, build.buf.validate.conformance.cases.StringEmail.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringEmail.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEmail_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEmail getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringEmail.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEmail build() { - build.buf.validate.conformance.cases.StringEmail result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEmail buildPartial() { - build.buf.validate.conformance.cases.StringEmail result = new build.buf.validate.conformance.cases.StringEmail(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringEmail result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringEmail) { - return mergeFrom((build.buf.validate.conformance.cases.StringEmail)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringEmail other) { - if (other == build.buf.validate.conformance.cases.StringEmail.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringEmail) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringEmail) - private static final build.buf.validate.conformance.cases.StringEmail DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringEmail(); - } - - public static build.buf.validate.conformance.cases.StringEmail getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringEmail 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.StringEmail getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEmailOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringEmailOrBuilder.java deleted file mode 100644 index d65c541e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEmailOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringEmailOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringEmail) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytes.java deleted file mode 100644 index 5d23a290..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytes.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringEqualMinMaxBytes} - */ -public final class StringEqualMinMaxBytes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringEqualMinMaxBytes) - StringEqualMinMaxBytesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringEqualMinMaxBytes.class.getName()); - } - // Use StringEqualMinMaxBytes.newBuilder() to construct. - private StringEqualMinMaxBytes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringEqualMinMaxBytes() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringEqualMinMaxBytes.class, build.buf.validate.conformance.cases.StringEqualMinMaxBytes.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringEqualMinMaxBytes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringEqualMinMaxBytes other = (build.buf.validate.conformance.cases.StringEqualMinMaxBytes) obj; - - 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(); - 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.StringEqualMinMaxBytes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes 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.StringEqualMinMaxBytes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringEqualMinMaxBytes) - build.buf.validate.conformance.cases.StringEqualMinMaxBytesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringEqualMinMaxBytes.class, build.buf.validate.conformance.cases.StringEqualMinMaxBytes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringEqualMinMaxBytes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEqualMinMaxBytes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringEqualMinMaxBytes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEqualMinMaxBytes build() { - build.buf.validate.conformance.cases.StringEqualMinMaxBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEqualMinMaxBytes buildPartial() { - build.buf.validate.conformance.cases.StringEqualMinMaxBytes result = new build.buf.validate.conformance.cases.StringEqualMinMaxBytes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringEqualMinMaxBytes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringEqualMinMaxBytes) { - return mergeFrom((build.buf.validate.conformance.cases.StringEqualMinMaxBytes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringEqualMinMaxBytes other) { - if (other == build.buf.validate.conformance.cases.StringEqualMinMaxBytes.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringEqualMinMaxBytes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringEqualMinMaxBytes) - private static final build.buf.validate.conformance.cases.StringEqualMinMaxBytes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringEqualMinMaxBytes(); - } - - public static build.buf.validate.conformance.cases.StringEqualMinMaxBytes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringEqualMinMaxBytes 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.StringEqualMinMaxBytes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytesOrBuilder.java deleted file mode 100644 index 1d071c79..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxBytesOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringEqualMinMaxBytesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringEqualMinMaxBytes) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLen.java deleted file mode 100644 index 156564e1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringEqualMinMaxLen} - */ -public final class StringEqualMinMaxLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringEqualMinMaxLen) - StringEqualMinMaxLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringEqualMinMaxLen.class.getName()); - } - // Use StringEqualMinMaxLen.newBuilder() to construct. - private StringEqualMinMaxLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringEqualMinMaxLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringEqualMinMaxLen.class, build.buf.validate.conformance.cases.StringEqualMinMaxLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringEqualMinMaxLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringEqualMinMaxLen other = (build.buf.validate.conformance.cases.StringEqualMinMaxLen) obj; - - 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(); - 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.StringEqualMinMaxLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxLen 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.StringEqualMinMaxLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxLen 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.StringEqualMinMaxLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxLen 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.StringEqualMinMaxLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringEqualMinMaxLen 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.StringEqualMinMaxLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringEqualMinMaxLen 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.StringEqualMinMaxLen 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.StringEqualMinMaxLen 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.StringEqualMinMaxLen 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.StringEqualMinMaxLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringEqualMinMaxLen) - build.buf.validate.conformance.cases.StringEqualMinMaxLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringEqualMinMaxLen.class, build.buf.validate.conformance.cases.StringEqualMinMaxLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringEqualMinMaxLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEqualMinMaxLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringEqualMinMaxLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEqualMinMaxLen build() { - build.buf.validate.conformance.cases.StringEqualMinMaxLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringEqualMinMaxLen buildPartial() { - build.buf.validate.conformance.cases.StringEqualMinMaxLen result = new build.buf.validate.conformance.cases.StringEqualMinMaxLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringEqualMinMaxLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringEqualMinMaxLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringEqualMinMaxLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringEqualMinMaxLen other) { - if (other == build.buf.validate.conformance.cases.StringEqualMinMaxLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringEqualMinMaxLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringEqualMinMaxLen) - private static final build.buf.validate.conformance.cases.StringEqualMinMaxLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringEqualMinMaxLen(); - } - - public static build.buf.validate.conformance.cases.StringEqualMinMaxLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringEqualMinMaxLen 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.StringEqualMinMaxLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLenOrBuilder.java deleted file mode 100644 index 69344ac3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringEqualMinMaxLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringEqualMinMaxLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringEqualMinMaxLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringExample.java deleted file mode 100644 index 5359e2eb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringExample.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringExample} - */ -public final class StringExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringExample) - StringExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringExample.class.getName()); - } - // Use StringExample.newBuilder() to construct. - private StringExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringExample() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringExample.class, build.buf.validate.conformance.cases.StringExample.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringExample other = (build.buf.validate.conformance.cases.StringExample) obj; - - 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(); - 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.StringExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringExample 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.StringExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringExample 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.StringExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringExample 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.StringExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringExample 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.StringExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringExample 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.StringExample 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.StringExample 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.StringExample 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.StringExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringExample) - build.buf.validate.conformance.cases.StringExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringExample.class, build.buf.validate.conformance.cases.StringExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringExample.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringExample build() { - build.buf.validate.conformance.cases.StringExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringExample buildPartial() { - build.buf.validate.conformance.cases.StringExample result = new build.buf.validate.conformance.cases.StringExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringExample result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringExample) { - return mergeFrom((build.buf.validate.conformance.cases.StringExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringExample other) { - if (other == build.buf.validate.conformance.cases.StringExample.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringExample) - private static final build.buf.validate.conformance.cases.StringExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringExample(); - } - - public static build.buf.validate.conformance.cases.StringExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringExample 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.StringExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringExampleOrBuilder.java deleted file mode 100644 index 783cddca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringExampleOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringExample) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPort.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPort.java deleted file mode 100644 index 0a8fd97c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPort.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHostAndOptionalPort} - */ -public final class StringHostAndOptionalPort extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHostAndOptionalPort) - StringHostAndOptionalPortOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHostAndOptionalPort.class.getName()); - } - // Use StringHostAndOptionalPort.newBuilder() to construct. - private StringHostAndOptionalPort(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHostAndOptionalPort() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHostAndOptionalPort.class, build.buf.validate.conformance.cases.StringHostAndOptionalPort.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHostAndOptionalPort)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHostAndOptionalPort other = (build.buf.validate.conformance.cases.StringHostAndOptionalPort) obj; - - 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(); - 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.StringHostAndOptionalPort parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostAndOptionalPort 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.StringHostAndOptionalPort parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostAndOptionalPort 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.StringHostAndOptionalPort parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostAndOptionalPort 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.StringHostAndOptionalPort parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHostAndOptionalPort 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.StringHostAndOptionalPort parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHostAndOptionalPort 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.StringHostAndOptionalPort 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.StringHostAndOptionalPort 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.StringHostAndOptionalPort 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.StringHostAndOptionalPort} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHostAndOptionalPort) - build.buf.validate.conformance.cases.StringHostAndOptionalPortOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHostAndOptionalPort.class, build.buf.validate.conformance.cases.StringHostAndOptionalPort.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHostAndOptionalPort.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostAndOptionalPort getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHostAndOptionalPort.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostAndOptionalPort build() { - build.buf.validate.conformance.cases.StringHostAndOptionalPort result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostAndOptionalPort buildPartial() { - build.buf.validate.conformance.cases.StringHostAndOptionalPort result = new build.buf.validate.conformance.cases.StringHostAndOptionalPort(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHostAndOptionalPort result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHostAndOptionalPort) { - return mergeFrom((build.buf.validate.conformance.cases.StringHostAndOptionalPort)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHostAndOptionalPort other) { - if (other == build.buf.validate.conformance.cases.StringHostAndOptionalPort.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHostAndOptionalPort) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHostAndOptionalPort) - private static final build.buf.validate.conformance.cases.StringHostAndOptionalPort DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHostAndOptionalPort(); - } - - public static build.buf.validate.conformance.cases.StringHostAndOptionalPort getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHostAndOptionalPort 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.StringHostAndOptionalPort getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPortOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPortOrBuilder.java deleted file mode 100644 index d9c57782..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndOptionalPortOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHostAndOptionalPortOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHostAndOptionalPort) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPort.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPort.java deleted file mode 100644 index fae4f28e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPort.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHostAndPort} - */ -public final class StringHostAndPort extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHostAndPort) - StringHostAndPortOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHostAndPort.class.getName()); - } - // Use StringHostAndPort.newBuilder() to construct. - private StringHostAndPort(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHostAndPort() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndPort_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndPort_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHostAndPort.class, build.buf.validate.conformance.cases.StringHostAndPort.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHostAndPort)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHostAndPort other = (build.buf.validate.conformance.cases.StringHostAndPort) obj; - - 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(); - 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.StringHostAndPort parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostAndPort 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.StringHostAndPort parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostAndPort 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.StringHostAndPort parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostAndPort 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.StringHostAndPort parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHostAndPort 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.StringHostAndPort parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHostAndPort 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.StringHostAndPort 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.StringHostAndPort 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.StringHostAndPort 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.StringHostAndPort} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHostAndPort) - build.buf.validate.conformance.cases.StringHostAndPortOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndPort_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndPort_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHostAndPort.class, build.buf.validate.conformance.cases.StringHostAndPort.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHostAndPort.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostAndPort_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostAndPort getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHostAndPort.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostAndPort build() { - build.buf.validate.conformance.cases.StringHostAndPort result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostAndPort buildPartial() { - build.buf.validate.conformance.cases.StringHostAndPort result = new build.buf.validate.conformance.cases.StringHostAndPort(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHostAndPort result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHostAndPort) { - return mergeFrom((build.buf.validate.conformance.cases.StringHostAndPort)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHostAndPort other) { - if (other == build.buf.validate.conformance.cases.StringHostAndPort.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHostAndPort) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHostAndPort) - private static final build.buf.validate.conformance.cases.StringHostAndPort DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHostAndPort(); - } - - public static build.buf.validate.conformance.cases.StringHostAndPort getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHostAndPort 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.StringHostAndPort getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPortOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPortOrBuilder.java deleted file mode 100644 index b407e62a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostAndPortOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHostAndPortOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHostAndPort) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostname.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostname.java deleted file mode 100644 index 825565b2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostname.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHostname} - */ -public final class StringHostname extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHostname) - StringHostnameOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHostname.class.getName()); - } - // Use StringHostname.newBuilder() to construct. - private StringHostname(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHostname() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostname_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostname_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHostname.class, build.buf.validate.conformance.cases.StringHostname.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHostname)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHostname other = (build.buf.validate.conformance.cases.StringHostname) obj; - - 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(); - 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.StringHostname parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostname 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.StringHostname parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostname 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.StringHostname parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHostname 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.StringHostname parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHostname 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.StringHostname parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHostname 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.StringHostname 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.StringHostname 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.StringHostname 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.StringHostname} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHostname) - build.buf.validate.conformance.cases.StringHostnameOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostname_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostname_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHostname.class, build.buf.validate.conformance.cases.StringHostname.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHostname.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHostname_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostname getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHostname.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostname build() { - build.buf.validate.conformance.cases.StringHostname result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHostname buildPartial() { - build.buf.validate.conformance.cases.StringHostname result = new build.buf.validate.conformance.cases.StringHostname(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHostname result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHostname) { - return mergeFrom((build.buf.validate.conformance.cases.StringHostname)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHostname other) { - if (other == build.buf.validate.conformance.cases.StringHostname.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHostname) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHostname) - private static final build.buf.validate.conformance.cases.StringHostname DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHostname(); - } - - public static build.buf.validate.conformance.cases.StringHostname getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHostname 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.StringHostname getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostnameOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostnameOrBuilder.java deleted file mode 100644 index 3f860e22..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHostnameOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHostnameOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHostname) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderName.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderName.java deleted file mode 100644 index 4e17b8b6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderName.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHttpHeaderName} - */ -public final class StringHttpHeaderName extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHttpHeaderName) - StringHttpHeaderNameOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHttpHeaderName.class.getName()); - } - // Use StringHttpHeaderName.newBuilder() to construct. - private StringHttpHeaderName(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHttpHeaderName() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderName_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderName_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderName.class, build.buf.validate.conformance.cases.StringHttpHeaderName.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHttpHeaderName)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHttpHeaderName other = (build.buf.validate.conformance.cases.StringHttpHeaderName) obj; - - 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(); - 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.StringHttpHeaderName parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderName 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.StringHttpHeaderName parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderName 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.StringHttpHeaderName parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderName 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.StringHttpHeaderName parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderName 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.StringHttpHeaderName parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderName 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.StringHttpHeaderName 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.StringHttpHeaderName 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.StringHttpHeaderName 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.StringHttpHeaderName} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHttpHeaderName) - build.buf.validate.conformance.cases.StringHttpHeaderNameOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderName_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderName_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderName.class, build.buf.validate.conformance.cases.StringHttpHeaderName.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHttpHeaderName.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderName_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderName getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHttpHeaderName.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderName build() { - build.buf.validate.conformance.cases.StringHttpHeaderName result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderName buildPartial() { - build.buf.validate.conformance.cases.StringHttpHeaderName result = new build.buf.validate.conformance.cases.StringHttpHeaderName(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHttpHeaderName result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHttpHeaderName) { - return mergeFrom((build.buf.validate.conformance.cases.StringHttpHeaderName)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHttpHeaderName other) { - if (other == build.buf.validate.conformance.cases.StringHttpHeaderName.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHttpHeaderName) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHttpHeaderName) - private static final build.buf.validate.conformance.cases.StringHttpHeaderName DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHttpHeaderName(); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderName getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHttpHeaderName 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.StringHttpHeaderName getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLoose.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLoose.java deleted file mode 100644 index 91589ff0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLoose.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHttpHeaderNameLoose} - */ -public final class StringHttpHeaderNameLoose extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHttpHeaderNameLoose) - StringHttpHeaderNameLooseOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHttpHeaderNameLoose.class.getName()); - } - // Use StringHttpHeaderNameLoose.newBuilder() to construct. - private StringHttpHeaderNameLoose(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHttpHeaderNameLoose() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.class, build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHttpHeaderNameLoose)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHttpHeaderNameLoose other = (build.buf.validate.conformance.cases.StringHttpHeaderNameLoose) obj; - - 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(); - 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.StringHttpHeaderNameLoose parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHttpHeaderNameLoose) - build.buf.validate.conformance.cases.StringHttpHeaderNameLooseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.class, build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderNameLoose getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderNameLoose build() { - build.buf.validate.conformance.cases.StringHttpHeaderNameLoose result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderNameLoose buildPartial() { - build.buf.validate.conformance.cases.StringHttpHeaderNameLoose result = new build.buf.validate.conformance.cases.StringHttpHeaderNameLoose(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHttpHeaderNameLoose result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHttpHeaderNameLoose) { - return mergeFrom((build.buf.validate.conformance.cases.StringHttpHeaderNameLoose)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHttpHeaderNameLoose other) { - if (other == build.buf.validate.conformance.cases.StringHttpHeaderNameLoose.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHttpHeaderNameLoose) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHttpHeaderNameLoose) - private static final build.buf.validate.conformance.cases.StringHttpHeaderNameLoose DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHttpHeaderNameLoose(); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderNameLoose getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHttpHeaderNameLoose 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.StringHttpHeaderNameLoose getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLooseOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLooseOrBuilder.java deleted file mode 100644 index 4a2db0bb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameLooseOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHttpHeaderNameLooseOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHttpHeaderNameLoose) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameOrBuilder.java deleted file mode 100644 index 719ccc8f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderNameOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHttpHeaderNameOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHttpHeaderName) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValue.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValue.java deleted file mode 100644 index 3650675c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValue.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHttpHeaderValue} - */ -public final class StringHttpHeaderValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHttpHeaderValue) - StringHttpHeaderValueOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHttpHeaderValue.class.getName()); - } - // Use StringHttpHeaderValue.newBuilder() to construct. - private StringHttpHeaderValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHttpHeaderValue() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderValue.class, build.buf.validate.conformance.cases.StringHttpHeaderValue.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHttpHeaderValue)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHttpHeaderValue other = (build.buf.validate.conformance.cases.StringHttpHeaderValue) obj; - - 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(); - 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.StringHttpHeaderValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValue 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.StringHttpHeaderValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValue 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.StringHttpHeaderValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValue 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.StringHttpHeaderValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValue 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.StringHttpHeaderValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderValue 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.StringHttpHeaderValue 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.StringHttpHeaderValue 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.StringHttpHeaderValue 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.StringHttpHeaderValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHttpHeaderValue) - build.buf.validate.conformance.cases.StringHttpHeaderValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderValue.class, build.buf.validate.conformance.cases.StringHttpHeaderValue.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHttpHeaderValue.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderValue getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHttpHeaderValue.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderValue build() { - build.buf.validate.conformance.cases.StringHttpHeaderValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderValue buildPartial() { - build.buf.validate.conformance.cases.StringHttpHeaderValue result = new build.buf.validate.conformance.cases.StringHttpHeaderValue(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHttpHeaderValue result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHttpHeaderValue) { - return mergeFrom((build.buf.validate.conformance.cases.StringHttpHeaderValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHttpHeaderValue other) { - if (other == build.buf.validate.conformance.cases.StringHttpHeaderValue.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHttpHeaderValue) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHttpHeaderValue) - private static final build.buf.validate.conformance.cases.StringHttpHeaderValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHttpHeaderValue(); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHttpHeaderValue 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.StringHttpHeaderValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLoose.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLoose.java deleted file mode 100644 index f5337824..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLoose.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringHttpHeaderValueLoose} - */ -public final class StringHttpHeaderValueLoose extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringHttpHeaderValueLoose) - StringHttpHeaderValueLooseOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringHttpHeaderValueLoose.class.getName()); - } - // Use StringHttpHeaderValueLoose.newBuilder() to construct. - private StringHttpHeaderValueLoose(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringHttpHeaderValueLoose() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.class, build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringHttpHeaderValueLoose)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringHttpHeaderValueLoose other = (build.buf.validate.conformance.cases.StringHttpHeaderValueLoose) obj; - - 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(); - 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.StringHttpHeaderValueLoose parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringHttpHeaderValueLoose) - build.buf.validate.conformance.cases.StringHttpHeaderValueLooseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.class, build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderValueLoose getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderValueLoose build() { - build.buf.validate.conformance.cases.StringHttpHeaderValueLoose result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringHttpHeaderValueLoose buildPartial() { - build.buf.validate.conformance.cases.StringHttpHeaderValueLoose result = new build.buf.validate.conformance.cases.StringHttpHeaderValueLoose(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringHttpHeaderValueLoose result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringHttpHeaderValueLoose) { - return mergeFrom((build.buf.validate.conformance.cases.StringHttpHeaderValueLoose)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringHttpHeaderValueLoose other) { - if (other == build.buf.validate.conformance.cases.StringHttpHeaderValueLoose.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringHttpHeaderValueLoose) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringHttpHeaderValueLoose) - private static final build.buf.validate.conformance.cases.StringHttpHeaderValueLoose DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringHttpHeaderValueLoose(); - } - - public static build.buf.validate.conformance.cases.StringHttpHeaderValueLoose getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringHttpHeaderValueLoose 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.StringHttpHeaderValueLoose getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLooseOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLooseOrBuilder.java deleted file mode 100644 index a38f7d6d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueLooseOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHttpHeaderValueLooseOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHttpHeaderValueLoose) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueOrBuilder.java deleted file mode 100644 index 46ebe9fb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringHttpHeaderValueOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringHttpHeaderValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringHttpHeaderValue) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIP.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIP.java deleted file mode 100644 index 0a859f86..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIP.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIP} - */ -public final class StringIP extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIP) - StringIPOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIP.class.getName()); - } - // Use StringIP.newBuilder() to construct. - private StringIP(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIP() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIP.class, build.buf.validate.conformance.cases.StringIP.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIP)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIP other = (build.buf.validate.conformance.cases.StringIP) obj; - - 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(); - 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.StringIP parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIP 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.StringIP parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIP 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.StringIP parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIP 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.StringIP parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIP 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.StringIP parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIP 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.StringIP 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.StringIP 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.StringIP 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.StringIP} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIP) - build.buf.validate.conformance.cases.StringIPOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIP.class, build.buf.validate.conformance.cases.StringIP.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIP.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIP_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIP getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIP.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIP build() { - build.buf.validate.conformance.cases.StringIP result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIP buildPartial() { - build.buf.validate.conformance.cases.StringIP result = new build.buf.validate.conformance.cases.StringIP(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIP result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIP) { - return mergeFrom((build.buf.validate.conformance.cases.StringIP)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIP other) { - if (other == build.buf.validate.conformance.cases.StringIP.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIP) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIP) - private static final build.buf.validate.conformance.cases.StringIP DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIP(); - } - - public static build.buf.validate.conformance.cases.StringIP getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIP 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.StringIP getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPOrBuilder.java deleted file mode 100644 index 2f8f6fe2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIP) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefix.java deleted file mode 100644 index 0357fe60..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPPrefix} - */ -public final class StringIPPrefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPPrefix) - StringIPPrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPPrefix.class.getName()); - } - // Use StringIPPrefix.newBuilder() to construct. - private StringIPPrefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPPrefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPPrefix.class, build.buf.validate.conformance.cases.StringIPPrefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPPrefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPPrefix other = (build.buf.validate.conformance.cases.StringIPPrefix) obj; - - 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(); - 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.StringIPPrefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPPrefix 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.StringIPPrefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPPrefix 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.StringIPPrefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPPrefix 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.StringIPPrefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPPrefix 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.StringIPPrefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPPrefix 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.StringIPPrefix 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.StringIPPrefix 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.StringIPPrefix 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.StringIPPrefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPPrefix) - build.buf.validate.conformance.cases.StringIPPrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPPrefix.class, build.buf.validate.conformance.cases.StringIPPrefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPPrefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPPrefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPPrefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPPrefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPPrefix build() { - build.buf.validate.conformance.cases.StringIPPrefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPPrefix buildPartial() { - build.buf.validate.conformance.cases.StringIPPrefix result = new build.buf.validate.conformance.cases.StringIPPrefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPPrefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPPrefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPPrefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPPrefix other) { - if (other == build.buf.validate.conformance.cases.StringIPPrefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPPrefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPPrefix) - private static final build.buf.validate.conformance.cases.StringIPPrefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPPrefix(); - } - - public static build.buf.validate.conformance.cases.StringIPPrefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPPrefix 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.StringIPPrefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefixOrBuilder.java deleted file mode 100644 index 9792eb81..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPPrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPPrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPPrefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLen.java deleted file mode 100644 index 17579e76..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPWithPrefixLen} - */ -public final class StringIPWithPrefixLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPWithPrefixLen) - StringIPWithPrefixLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPWithPrefixLen.class.getName()); - } - // Use StringIPWithPrefixLen.newBuilder() to construct. - private StringIPWithPrefixLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPWithPrefixLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPWithPrefixLen.class, build.buf.validate.conformance.cases.StringIPWithPrefixLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPWithPrefixLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPWithPrefixLen other = (build.buf.validate.conformance.cases.StringIPWithPrefixLen) obj; - - 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(); - 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.StringIPWithPrefixLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPWithPrefixLen 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.StringIPWithPrefixLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPWithPrefixLen 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.StringIPWithPrefixLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPWithPrefixLen 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.StringIPWithPrefixLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPWithPrefixLen 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.StringIPWithPrefixLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPWithPrefixLen 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.StringIPWithPrefixLen 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.StringIPWithPrefixLen 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.StringIPWithPrefixLen 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.StringIPWithPrefixLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPWithPrefixLen) - build.buf.validate.conformance.cases.StringIPWithPrefixLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPWithPrefixLen.class, build.buf.validate.conformance.cases.StringIPWithPrefixLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPWithPrefixLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPWithPrefixLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPWithPrefixLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPWithPrefixLen build() { - build.buf.validate.conformance.cases.StringIPWithPrefixLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPWithPrefixLen buildPartial() { - build.buf.validate.conformance.cases.StringIPWithPrefixLen result = new build.buf.validate.conformance.cases.StringIPWithPrefixLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPWithPrefixLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPWithPrefixLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPWithPrefixLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPWithPrefixLen other) { - if (other == build.buf.validate.conformance.cases.StringIPWithPrefixLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPWithPrefixLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPWithPrefixLen) - private static final build.buf.validate.conformance.cases.StringIPWithPrefixLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPWithPrefixLen(); - } - - public static build.buf.validate.conformance.cases.StringIPWithPrefixLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPWithPrefixLen 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.StringIPWithPrefixLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLenOrBuilder.java deleted file mode 100644 index 54cb02ca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPWithPrefixLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPWithPrefixLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPWithPrefixLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4.java deleted file mode 100644 index f3a5716e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPv4} - */ -public final class StringIPv4 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPv4) - StringIPv4OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPv4.class.getName()); - } - // Use StringIPv4.newBuilder() to construct. - private StringIPv4(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPv4() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv4.class, build.buf.validate.conformance.cases.StringIPv4.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPv4)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPv4 other = (build.buf.validate.conformance.cases.StringIPv4) obj; - - 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(); - 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.StringIPv4 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4 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.StringIPv4 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4 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.StringIPv4 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4 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.StringIPv4 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPv4 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.StringIPv4 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPv4 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.StringIPv4 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.StringIPv4 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.StringIPv4 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.StringIPv4} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPv4) - build.buf.validate.conformance.cases.StringIPv4OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv4.class, build.buf.validate.conformance.cases.StringIPv4.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPv4.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPv4.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4 build() { - build.buf.validate.conformance.cases.StringIPv4 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4 buildPartial() { - build.buf.validate.conformance.cases.StringIPv4 result = new build.buf.validate.conformance.cases.StringIPv4(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPv4 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPv4) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPv4)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPv4 other) { - if (other == build.buf.validate.conformance.cases.StringIPv4.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPv4) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPv4) - private static final build.buf.validate.conformance.cases.StringIPv4 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPv4(); - } - - public static build.buf.validate.conformance.cases.StringIPv4 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPv4 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.StringIPv4 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4OrBuilder.java deleted file mode 100644 index b95a7144..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4OrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPv4OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPv4) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4Prefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4Prefix.java deleted file mode 100644 index d4b1db50..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4Prefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPv4Prefix} - */ -public final class StringIPv4Prefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPv4Prefix) - StringIPv4PrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPv4Prefix.class.getName()); - } - // Use StringIPv4Prefix.newBuilder() to construct. - private StringIPv4Prefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPv4Prefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv4Prefix.class, build.buf.validate.conformance.cases.StringIPv4Prefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPv4Prefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPv4Prefix other = (build.buf.validate.conformance.cases.StringIPv4Prefix) obj; - - 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(); - 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.StringIPv4Prefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4Prefix 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.StringIPv4Prefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4Prefix 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.StringIPv4Prefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4Prefix 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.StringIPv4Prefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPv4Prefix 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.StringIPv4Prefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPv4Prefix 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.StringIPv4Prefix 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.StringIPv4Prefix 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.StringIPv4Prefix 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.StringIPv4Prefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPv4Prefix) - build.buf.validate.conformance.cases.StringIPv4PrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv4Prefix.class, build.buf.validate.conformance.cases.StringIPv4Prefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPv4Prefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4Prefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4Prefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPv4Prefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4Prefix build() { - build.buf.validate.conformance.cases.StringIPv4Prefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4Prefix buildPartial() { - build.buf.validate.conformance.cases.StringIPv4Prefix result = new build.buf.validate.conformance.cases.StringIPv4Prefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPv4Prefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPv4Prefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPv4Prefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPv4Prefix other) { - if (other == build.buf.validate.conformance.cases.StringIPv4Prefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPv4Prefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPv4Prefix) - private static final build.buf.validate.conformance.cases.StringIPv4Prefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPv4Prefix(); - } - - public static build.buf.validate.conformance.cases.StringIPv4Prefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPv4Prefix 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.StringIPv4Prefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4PrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4PrefixOrBuilder.java deleted file mode 100644 index 0bc3bf07..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4PrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPv4PrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPv4Prefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLen.java deleted file mode 100644 index 6180c63a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPv4WithPrefixLen} - */ -public final class StringIPv4WithPrefixLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPv4WithPrefixLen) - StringIPv4WithPrefixLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPv4WithPrefixLen.class.getName()); - } - // Use StringIPv4WithPrefixLen.newBuilder() to construct. - private StringIPv4WithPrefixLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPv4WithPrefixLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.class, build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPv4WithPrefixLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPv4WithPrefixLen other = (build.buf.validate.conformance.cases.StringIPv4WithPrefixLen) obj; - - 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(); - 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.StringIPv4WithPrefixLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPv4WithPrefixLen) - build.buf.validate.conformance.cases.StringIPv4WithPrefixLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.class, build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4WithPrefixLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4WithPrefixLen build() { - build.buf.validate.conformance.cases.StringIPv4WithPrefixLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv4WithPrefixLen buildPartial() { - build.buf.validate.conformance.cases.StringIPv4WithPrefixLen result = new build.buf.validate.conformance.cases.StringIPv4WithPrefixLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPv4WithPrefixLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPv4WithPrefixLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPv4WithPrefixLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPv4WithPrefixLen other) { - if (other == build.buf.validate.conformance.cases.StringIPv4WithPrefixLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPv4WithPrefixLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPv4WithPrefixLen) - private static final build.buf.validate.conformance.cases.StringIPv4WithPrefixLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPv4WithPrefixLen(); - } - - public static build.buf.validate.conformance.cases.StringIPv4WithPrefixLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPv4WithPrefixLen 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.StringIPv4WithPrefixLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLenOrBuilder.java deleted file mode 100644 index 71f02f66..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv4WithPrefixLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPv4WithPrefixLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPv4WithPrefixLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6.java deleted file mode 100644 index 16526339..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPv6} - */ -public final class StringIPv6 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPv6) - StringIPv6OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPv6.class.getName()); - } - // Use StringIPv6.newBuilder() to construct. - private StringIPv6(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPv6() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv6.class, build.buf.validate.conformance.cases.StringIPv6.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPv6)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPv6 other = (build.buf.validate.conformance.cases.StringIPv6) obj; - - 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(); - 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.StringIPv6 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6 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.StringIPv6 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6 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.StringIPv6 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6 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.StringIPv6 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPv6 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.StringIPv6 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPv6 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.StringIPv6 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.StringIPv6 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.StringIPv6 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.StringIPv6} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPv6) - build.buf.validate.conformance.cases.StringIPv6OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv6.class, build.buf.validate.conformance.cases.StringIPv6.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPv6.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPv6.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6 build() { - build.buf.validate.conformance.cases.StringIPv6 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6 buildPartial() { - build.buf.validate.conformance.cases.StringIPv6 result = new build.buf.validate.conformance.cases.StringIPv6(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPv6 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPv6) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPv6)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPv6 other) { - if (other == build.buf.validate.conformance.cases.StringIPv6.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPv6) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPv6) - private static final build.buf.validate.conformance.cases.StringIPv6 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPv6(); - } - - public static build.buf.validate.conformance.cases.StringIPv6 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPv6 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.StringIPv6 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6OrBuilder.java deleted file mode 100644 index 6fe887d3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6OrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPv6OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPv6) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6Prefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6Prefix.java deleted file mode 100644 index 58876391..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6Prefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPv6Prefix} - */ -public final class StringIPv6Prefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPv6Prefix) - StringIPv6PrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPv6Prefix.class.getName()); - } - // Use StringIPv6Prefix.newBuilder() to construct. - private StringIPv6Prefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPv6Prefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv6Prefix.class, build.buf.validate.conformance.cases.StringIPv6Prefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPv6Prefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPv6Prefix other = (build.buf.validate.conformance.cases.StringIPv6Prefix) obj; - - 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(); - 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.StringIPv6Prefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6Prefix 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.StringIPv6Prefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6Prefix 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.StringIPv6Prefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6Prefix 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.StringIPv6Prefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPv6Prefix 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.StringIPv6Prefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPv6Prefix 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.StringIPv6Prefix 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.StringIPv6Prefix 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.StringIPv6Prefix 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.StringIPv6Prefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPv6Prefix) - build.buf.validate.conformance.cases.StringIPv6PrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv6Prefix.class, build.buf.validate.conformance.cases.StringIPv6Prefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPv6Prefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6Prefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6Prefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPv6Prefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6Prefix build() { - build.buf.validate.conformance.cases.StringIPv6Prefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6Prefix buildPartial() { - build.buf.validate.conformance.cases.StringIPv6Prefix result = new build.buf.validate.conformance.cases.StringIPv6Prefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPv6Prefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPv6Prefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPv6Prefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPv6Prefix other) { - if (other == build.buf.validate.conformance.cases.StringIPv6Prefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPv6Prefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPv6Prefix) - private static final build.buf.validate.conformance.cases.StringIPv6Prefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPv6Prefix(); - } - - public static build.buf.validate.conformance.cases.StringIPv6Prefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPv6Prefix 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.StringIPv6Prefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6PrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6PrefixOrBuilder.java deleted file mode 100644 index 4af40be9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6PrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPv6PrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPv6Prefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLen.java deleted file mode 100644 index fcde1ae5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIPv6WithPrefixLen} - */ -public final class StringIPv6WithPrefixLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIPv6WithPrefixLen) - StringIPv6WithPrefixLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIPv6WithPrefixLen.class.getName()); - } - // Use StringIPv6WithPrefixLen.newBuilder() to construct. - private StringIPv6WithPrefixLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIPv6WithPrefixLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.class, build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIPv6WithPrefixLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIPv6WithPrefixLen other = (build.buf.validate.conformance.cases.StringIPv6WithPrefixLen) obj; - - 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(); - 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.StringIPv6WithPrefixLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIPv6WithPrefixLen) - build.buf.validate.conformance.cases.StringIPv6WithPrefixLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.class, build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6WithPrefixLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6WithPrefixLen build() { - build.buf.validate.conformance.cases.StringIPv6WithPrefixLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIPv6WithPrefixLen buildPartial() { - build.buf.validate.conformance.cases.StringIPv6WithPrefixLen result = new build.buf.validate.conformance.cases.StringIPv6WithPrefixLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIPv6WithPrefixLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIPv6WithPrefixLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringIPv6WithPrefixLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIPv6WithPrefixLen other) { - if (other == build.buf.validate.conformance.cases.StringIPv6WithPrefixLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIPv6WithPrefixLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIPv6WithPrefixLen) - private static final build.buf.validate.conformance.cases.StringIPv6WithPrefixLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIPv6WithPrefixLen(); - } - - public static build.buf.validate.conformance.cases.StringIPv6WithPrefixLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIPv6WithPrefixLen 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.StringIPv6WithPrefixLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLenOrBuilder.java deleted file mode 100644 index 9dc4c7bd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIPv6WithPrefixLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringIPv6WithPrefixLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIPv6WithPrefixLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringIn.java deleted file mode 100644 index 9d5baa93..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringIn.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringIn} - */ -public final class StringIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringIn) - StringInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringIn.class.getName()); - } - // Use StringIn.newBuilder() to construct. - private StringIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringIn() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIn.class, build.buf.validate.conformance.cases.StringIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringIn other = (build.buf.validate.conformance.cases.StringIn) obj; - - 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(); - 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.StringIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIn 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.StringIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIn 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.StringIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringIn 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.StringIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringIn 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.StringIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringIn 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.StringIn 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.StringIn 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.StringIn 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.StringIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringIn) - build.buf.validate.conformance.cases.StringInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringIn.class, build.buf.validate.conformance.cases.StringIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIn build() { - build.buf.validate.conformance.cases.StringIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringIn buildPartial() { - build.buf.validate.conformance.cases.StringIn result = new build.buf.validate.conformance.cases.StringIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringIn) { - return mergeFrom((build.buf.validate.conformance.cases.StringIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringIn other) { - if (other == build.buf.validate.conformance.cases.StringIn.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringIn) - private static final build.buf.validate.conformance.cases.StringIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringIn(); - } - - public static build.buf.validate.conformance.cases.StringIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringIn 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.StringIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneof.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneof.java deleted file mode 100644 index e90f8395..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneof.java +++ /dev/null @@ -1,613 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringInOneof} - */ -public final class StringInOneof extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringInOneof) - StringInOneofOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringInOneof.class.getName()); - } - // Use StringInOneof.newBuilder() to construct. - private StringInOneof(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringInOneof() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringInOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringInOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringInOneof.class, build.buf.validate.conformance.cases.StringInOneof.Builder.class); - } - - private int fooCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object foo_; - public enum FooCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BAR(1), - FOO_NOT_SET(0); - private final int value; - private FooCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static FooCase valueOf(int value) { - return forNumber(value); - } - - public static FooCase forNumber(int value) { - switch (value) { - case 1: return BAR; - case 0: return FOO_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public FooCase - getFooCase() { - return FooCase.forNumber( - fooCase_); - } - - public static final int BAR_FIELD_NUMBER = 1; - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return Whether the bar field is set. - */ - public boolean hasBar() { - return fooCase_ == 1; - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return The bar. - */ - public java.lang.String getBar() { - java.lang.Object ref = ""; - if (fooCase_ == 1) { - ref = foo_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (fooCase_ == 1) { - foo_ = s; - } - return s; - } - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return The bytes for bar. - */ - public com.google.protobuf.ByteString - getBarBytes() { - java.lang.Object ref = ""; - if (fooCase_ == 1) { - ref = foo_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (fooCase_ == 1) { - foo_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (fooCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, foo_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fooCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, foo_); - } - 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.StringInOneof)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringInOneof other = (build.buf.validate.conformance.cases.StringInOneof) obj; - - if (!getFooCase().equals(other.getFooCase())) return false; - switch (fooCase_) { - case 1: - if (!getBar() - .equals(other.getBar())) return false; - break; - case 0: - default: - } - 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(); - switch (fooCase_) { - case 1: - hash = (37 * hash) + BAR_FIELD_NUMBER; - hash = (53 * hash) + getBar().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.StringInOneof parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringInOneof 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.StringInOneof parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringInOneof 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.StringInOneof parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringInOneof 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.StringInOneof parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringInOneof 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.StringInOneof parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringInOneof 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.StringInOneof 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.StringInOneof 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.StringInOneof 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.StringInOneof} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringInOneof) - build.buf.validate.conformance.cases.StringInOneofOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringInOneof_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringInOneof_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringInOneof.class, build.buf.validate.conformance.cases.StringInOneof.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringInOneof.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fooCase_ = 0; - foo_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringInOneof_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringInOneof getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringInOneof.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringInOneof build() { - build.buf.validate.conformance.cases.StringInOneof result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringInOneof buildPartial() { - build.buf.validate.conformance.cases.StringInOneof result = new build.buf.validate.conformance.cases.StringInOneof(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringInOneof result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.cases.StringInOneof result) { - result.fooCase_ = fooCase_; - result.foo_ = this.foo_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringInOneof) { - return mergeFrom((build.buf.validate.conformance.cases.StringInOneof)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringInOneof other) { - if (other == build.buf.validate.conformance.cases.StringInOneof.getDefaultInstance()) return this; - switch (other.getFooCase()) { - case BAR: { - fooCase_ = 1; - foo_ = other.foo_; - onChanged(); - break; - } - case FOO_NOT_SET: { - break; - } - } - 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: { - java.lang.String s = input.readStringRequireUtf8(); - fooCase_ = 1; - foo_ = s; - 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 fooCase_ = 0; - private java.lang.Object foo_; - public FooCase - getFooCase() { - return FooCase.forNumber( - fooCase_); - } - - public Builder clearFoo() { - fooCase_ = 0; - foo_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return Whether the bar field is set. - */ - @java.lang.Override - public boolean hasBar() { - return fooCase_ == 1; - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return The bar. - */ - @java.lang.Override - public java.lang.String getBar() { - java.lang.Object ref = ""; - if (fooCase_ == 1) { - ref = foo_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (fooCase_ == 1) { - foo_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return The bytes for bar. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBarBytes() { - java.lang.Object ref = ""; - if (fooCase_ == 1) { - ref = foo_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (fooCase_ == 1) { - foo_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @param value The bar to set. - * @return This builder for chaining. - */ - public Builder setBar( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fooCase_ = 1; - foo_ = value; - onChanged(); - return this; - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearBar() { - if (fooCase_ == 1) { - fooCase_ = 0; - foo_ = null; - onChanged(); - } - return this; - } - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @param value The bytes for bar to set. - * @return This builder for chaining. - */ - public Builder setBarBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fooCase_ = 1; - foo_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringInOneof) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringInOneof) - private static final build.buf.validate.conformance.cases.StringInOneof DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringInOneof(); - } - - public static build.buf.validate.conformance.cases.StringInOneof getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringInOneof 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.StringInOneof getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneofOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneofOrBuilder.java deleted file mode 100644 index c7bb4139..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOneofOrBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringInOneofOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringInOneof) - com.google.protobuf.MessageOrBuilder { - - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return Whether the bar field is set. - */ - boolean hasBar(); - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return The bar. - */ - java.lang.String getBar(); - /** - * string bar = 1 [json_name = "bar", (.buf.validate.field) = { ... } - * @return The bytes for bar. - */ - com.google.protobuf.ByteString - getBarBytes(); - - build.buf.validate.conformance.cases.StringInOneof.FooCase getFooCase(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOrBuilder.java deleted file mode 100644 index f393bb1f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringInOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringIn) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringLen.java deleted file mode 100644 index d5f34d9e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringLen} - */ -public final class StringLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringLen) - StringLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringLen.class.getName()); - } - // Use StringLen.newBuilder() to construct. - private StringLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringLen.class, build.buf.validate.conformance.cases.StringLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringLen other = (build.buf.validate.conformance.cases.StringLen) obj; - - 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(); - 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.StringLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringLen 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.StringLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringLen 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.StringLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringLen 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.StringLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringLen 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.StringLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringLen 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.StringLen 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.StringLen 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.StringLen 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.StringLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringLen) - build.buf.validate.conformance.cases.StringLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringLen.class, build.buf.validate.conformance.cases.StringLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringLen build() { - build.buf.validate.conformance.cases.StringLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringLen buildPartial() { - build.buf.validate.conformance.cases.StringLen result = new build.buf.validate.conformance.cases.StringLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringLen other) { - if (other == build.buf.validate.conformance.cases.StringLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringLen) - private static final build.buf.validate.conformance.cases.StringLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringLen(); - } - - public static build.buf.validate.conformance.cases.StringLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringLen 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.StringLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytes.java deleted file mode 100644 index 6b34bf21..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytes.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringLenBytes} - */ -public final class StringLenBytes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringLenBytes) - StringLenBytesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringLenBytes.class.getName()); - } - // Use StringLenBytes.newBuilder() to construct. - private StringLenBytes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringLenBytes() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLenBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLenBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringLenBytes.class, build.buf.validate.conformance.cases.StringLenBytes.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringLenBytes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringLenBytes other = (build.buf.validate.conformance.cases.StringLenBytes) obj; - - 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(); - 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.StringLenBytes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringLenBytes 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.StringLenBytes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringLenBytes 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.StringLenBytes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringLenBytes 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.StringLenBytes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringLenBytes 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.StringLenBytes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringLenBytes 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.StringLenBytes 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.StringLenBytes 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.StringLenBytes 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.StringLenBytes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringLenBytes) - build.buf.validate.conformance.cases.StringLenBytesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLenBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLenBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringLenBytes.class, build.buf.validate.conformance.cases.StringLenBytes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringLenBytes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringLenBytes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringLenBytes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringLenBytes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringLenBytes build() { - build.buf.validate.conformance.cases.StringLenBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringLenBytes buildPartial() { - build.buf.validate.conformance.cases.StringLenBytes result = new build.buf.validate.conformance.cases.StringLenBytes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringLenBytes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringLenBytes) { - return mergeFrom((build.buf.validate.conformance.cases.StringLenBytes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringLenBytes other) { - if (other == build.buf.validate.conformance.cases.StringLenBytes.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringLenBytes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringLenBytes) - private static final build.buf.validate.conformance.cases.StringLenBytes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringLenBytes(); - } - - public static build.buf.validate.conformance.cases.StringLenBytes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringLenBytes 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.StringLenBytes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytesOrBuilder.java deleted file mode 100644 index b51ef40e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenBytesOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringLenBytesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringLenBytes) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenOrBuilder.java deleted file mode 100644 index f5eee1cb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytes.java deleted file mode 100644 index e16dfce0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytes.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringMaxBytes} - */ -public final class StringMaxBytes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringMaxBytes) - StringMaxBytesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringMaxBytes.class.getName()); - } - // Use StringMaxBytes.newBuilder() to construct. - private StringMaxBytes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringMaxBytes() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMaxBytes.class, build.buf.validate.conformance.cases.StringMaxBytes.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringMaxBytes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringMaxBytes other = (build.buf.validate.conformance.cases.StringMaxBytes) obj; - - 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(); - 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.StringMaxBytes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMaxBytes 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.StringMaxBytes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMaxBytes 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.StringMaxBytes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMaxBytes 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.StringMaxBytes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringMaxBytes 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.StringMaxBytes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringMaxBytes 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.StringMaxBytes 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.StringMaxBytes 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.StringMaxBytes 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.StringMaxBytes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringMaxBytes) - build.buf.validate.conformance.cases.StringMaxBytesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMaxBytes.class, build.buf.validate.conformance.cases.StringMaxBytes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringMaxBytes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxBytes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMaxBytes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringMaxBytes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMaxBytes build() { - build.buf.validate.conformance.cases.StringMaxBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMaxBytes buildPartial() { - build.buf.validate.conformance.cases.StringMaxBytes result = new build.buf.validate.conformance.cases.StringMaxBytes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringMaxBytes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringMaxBytes) { - return mergeFrom((build.buf.validate.conformance.cases.StringMaxBytes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringMaxBytes other) { - if (other == build.buf.validate.conformance.cases.StringMaxBytes.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringMaxBytes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringMaxBytes) - private static final build.buf.validate.conformance.cases.StringMaxBytes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringMaxBytes(); - } - - public static build.buf.validate.conformance.cases.StringMaxBytes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringMaxBytes 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.StringMaxBytes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytesOrBuilder.java deleted file mode 100644 index 55b8cbf5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxBytesOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringMaxBytesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringMaxBytes) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLen.java deleted file mode 100644 index f8a44f6f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringMaxLen} - */ -public final class StringMaxLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringMaxLen) - StringMaxLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringMaxLen.class.getName()); - } - // Use StringMaxLen.newBuilder() to construct. - private StringMaxLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringMaxLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMaxLen.class, build.buf.validate.conformance.cases.StringMaxLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringMaxLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringMaxLen other = (build.buf.validate.conformance.cases.StringMaxLen) obj; - - 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(); - 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.StringMaxLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMaxLen 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.StringMaxLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMaxLen 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.StringMaxLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMaxLen 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.StringMaxLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringMaxLen 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.StringMaxLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringMaxLen 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.StringMaxLen 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.StringMaxLen 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.StringMaxLen 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.StringMaxLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringMaxLen) - build.buf.validate.conformance.cases.StringMaxLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMaxLen.class, build.buf.validate.conformance.cases.StringMaxLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringMaxLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMaxLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMaxLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringMaxLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMaxLen build() { - build.buf.validate.conformance.cases.StringMaxLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMaxLen buildPartial() { - build.buf.validate.conformance.cases.StringMaxLen result = new build.buf.validate.conformance.cases.StringMaxLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringMaxLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringMaxLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringMaxLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringMaxLen other) { - if (other == build.buf.validate.conformance.cases.StringMaxLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringMaxLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringMaxLen) - private static final build.buf.validate.conformance.cases.StringMaxLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringMaxLen(); - } - - public static build.buf.validate.conformance.cases.StringMaxLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringMaxLen 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.StringMaxLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLenOrBuilder.java deleted file mode 100644 index fe2bdf95..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMaxLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringMaxLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringMaxLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytes.java deleted file mode 100644 index 39459760..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytes.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringMinBytes} - */ -public final class StringMinBytes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringMinBytes) - StringMinBytesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringMinBytes.class.getName()); - } - // Use StringMinBytes.newBuilder() to construct. - private StringMinBytes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringMinBytes() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinBytes.class, build.buf.validate.conformance.cases.StringMinBytes.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringMinBytes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringMinBytes other = (build.buf.validate.conformance.cases.StringMinBytes) obj; - - 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(); - 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.StringMinBytes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinBytes 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.StringMinBytes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinBytes 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.StringMinBytes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinBytes 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.StringMinBytes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringMinBytes 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.StringMinBytes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringMinBytes 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.StringMinBytes 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.StringMinBytes 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.StringMinBytes 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.StringMinBytes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringMinBytes) - build.buf.validate.conformance.cases.StringMinBytesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinBytes.class, build.buf.validate.conformance.cases.StringMinBytes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringMinBytes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinBytes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinBytes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringMinBytes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinBytes build() { - build.buf.validate.conformance.cases.StringMinBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinBytes buildPartial() { - build.buf.validate.conformance.cases.StringMinBytes result = new build.buf.validate.conformance.cases.StringMinBytes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringMinBytes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringMinBytes) { - return mergeFrom((build.buf.validate.conformance.cases.StringMinBytes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringMinBytes other) { - if (other == build.buf.validate.conformance.cases.StringMinBytes.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringMinBytes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringMinBytes) - private static final build.buf.validate.conformance.cases.StringMinBytes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringMinBytes(); - } - - public static build.buf.validate.conformance.cases.StringMinBytes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringMinBytes 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.StringMinBytes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytesOrBuilder.java deleted file mode 100644 index 6a3effa8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinBytesOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringMinBytesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringMinBytes) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLen.java deleted file mode 100644 index 4d3ebc57..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringMinLen} - */ -public final class StringMinLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringMinLen) - StringMinLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringMinLen.class.getName()); - } - // Use StringMinLen.newBuilder() to construct. - private StringMinLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringMinLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinLen.class, build.buf.validate.conformance.cases.StringMinLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringMinLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringMinLen other = (build.buf.validate.conformance.cases.StringMinLen) obj; - - 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(); - 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.StringMinLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinLen 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.StringMinLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinLen 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.StringMinLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinLen 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.StringMinLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringMinLen 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.StringMinLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringMinLen 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.StringMinLen 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.StringMinLen 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.StringMinLen 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.StringMinLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringMinLen) - build.buf.validate.conformance.cases.StringMinLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinLen.class, build.buf.validate.conformance.cases.StringMinLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringMinLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringMinLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinLen build() { - build.buf.validate.conformance.cases.StringMinLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinLen buildPartial() { - build.buf.validate.conformance.cases.StringMinLen result = new build.buf.validate.conformance.cases.StringMinLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringMinLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringMinLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringMinLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringMinLen other) { - if (other == build.buf.validate.conformance.cases.StringMinLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringMinLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringMinLen) - private static final build.buf.validate.conformance.cases.StringMinLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringMinLen(); - } - - public static build.buf.validate.conformance.cases.StringMinLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringMinLen 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.StringMinLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLenOrBuilder.java deleted file mode 100644 index 88154650..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringMinLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringMinLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytes.java deleted file mode 100644 index ffedc2ec..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytes.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringMinMaxBytes} - */ -public final class StringMinMaxBytes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringMinMaxBytes) - StringMinMaxBytesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringMinMaxBytes.class.getName()); - } - // Use StringMinMaxBytes.newBuilder() to construct. - private StringMinMaxBytes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringMinMaxBytes() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinMaxBytes.class, build.buf.validate.conformance.cases.StringMinMaxBytes.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringMinMaxBytes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringMinMaxBytes other = (build.buf.validate.conformance.cases.StringMinMaxBytes) obj; - - 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(); - 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.StringMinMaxBytes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinMaxBytes 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.StringMinMaxBytes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinMaxBytes 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.StringMinMaxBytes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinMaxBytes 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.StringMinMaxBytes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringMinMaxBytes 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.StringMinMaxBytes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringMinMaxBytes 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.StringMinMaxBytes 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.StringMinMaxBytes 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.StringMinMaxBytes 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.StringMinMaxBytes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringMinMaxBytes) - build.buf.validate.conformance.cases.StringMinMaxBytesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinMaxBytes.class, build.buf.validate.conformance.cases.StringMinMaxBytes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringMinMaxBytes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxBytes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinMaxBytes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringMinMaxBytes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinMaxBytes build() { - build.buf.validate.conformance.cases.StringMinMaxBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinMaxBytes buildPartial() { - build.buf.validate.conformance.cases.StringMinMaxBytes result = new build.buf.validate.conformance.cases.StringMinMaxBytes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringMinMaxBytes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringMinMaxBytes) { - return mergeFrom((build.buf.validate.conformance.cases.StringMinMaxBytes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringMinMaxBytes other) { - if (other == build.buf.validate.conformance.cases.StringMinMaxBytes.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringMinMaxBytes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringMinMaxBytes) - private static final build.buf.validate.conformance.cases.StringMinMaxBytes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringMinMaxBytes(); - } - - public static build.buf.validate.conformance.cases.StringMinMaxBytes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringMinMaxBytes 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.StringMinMaxBytes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytesOrBuilder.java deleted file mode 100644 index 48d96954..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxBytesOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringMinMaxBytesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringMinMaxBytes) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLen.java deleted file mode 100644 index 5894f6f3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringMinMaxLen} - */ -public final class StringMinMaxLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringMinMaxLen) - StringMinMaxLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringMinMaxLen.class.getName()); - } - // Use StringMinMaxLen.newBuilder() to construct. - private StringMinMaxLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringMinMaxLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinMaxLen.class, build.buf.validate.conformance.cases.StringMinMaxLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringMinMaxLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringMinMaxLen other = (build.buf.validate.conformance.cases.StringMinMaxLen) obj; - - 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(); - 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.StringMinMaxLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinMaxLen 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.StringMinMaxLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinMaxLen 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.StringMinMaxLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringMinMaxLen 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.StringMinMaxLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringMinMaxLen 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.StringMinMaxLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringMinMaxLen 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.StringMinMaxLen 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.StringMinMaxLen 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.StringMinMaxLen 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.StringMinMaxLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringMinMaxLen) - build.buf.validate.conformance.cases.StringMinMaxLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringMinMaxLen.class, build.buf.validate.conformance.cases.StringMinMaxLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringMinMaxLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringMinMaxLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinMaxLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringMinMaxLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinMaxLen build() { - build.buf.validate.conformance.cases.StringMinMaxLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringMinMaxLen buildPartial() { - build.buf.validate.conformance.cases.StringMinMaxLen result = new build.buf.validate.conformance.cases.StringMinMaxLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringMinMaxLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringMinMaxLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringMinMaxLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringMinMaxLen other) { - if (other == build.buf.validate.conformance.cases.StringMinMaxLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringMinMaxLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringMinMaxLen) - private static final build.buf.validate.conformance.cases.StringMinMaxLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringMinMaxLen(); - } - - public static build.buf.validate.conformance.cases.StringMinMaxLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringMinMaxLen 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.StringMinMaxLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLenOrBuilder.java deleted file mode 100644 index 4d645a4a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringMinMaxLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringMinMaxLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringMinMaxLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNone.java deleted file mode 100644 index ccad2692..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNone.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNone} - */ -public final class StringNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNone) - StringNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNone.class.getName()); - } - // Use StringNone.newBuilder() to construct. - private StringNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNone() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNone.class, build.buf.validate.conformance.cases.StringNone.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNone other = (build.buf.validate.conformance.cases.StringNone) obj; - - 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(); - 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.StringNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNone 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.StringNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNone 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.StringNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNone 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.StringNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNone 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.StringNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNone 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.StringNone 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.StringNone 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.StringNone 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.StringNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNone) - build.buf.validate.conformance.cases.StringNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNone.class, build.buf.validate.conformance.cases.StringNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNone.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNone build() { - build.buf.validate.conformance.cases.StringNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNone buildPartial() { - build.buf.validate.conformance.cases.StringNone result = new build.buf.validate.conformance.cases.StringNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNone) { - return mergeFrom((build.buf.validate.conformance.cases.StringNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNone other) { - if (other == build.buf.validate.conformance.cases.StringNone.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val"]; - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNone) - private static final build.buf.validate.conformance.cases.StringNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNone(); - } - - public static build.buf.validate.conformance.cases.StringNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNone 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.StringNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNoneOrBuilder.java deleted file mode 100644 index 849c0058..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNoneOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNone) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val"]; - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val"]; - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddress.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddress.java deleted file mode 100644 index 5a1457b6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddress.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotAddress} - */ -public final class StringNotAddress extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotAddress) - StringNotAddressOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotAddress.class.getName()); - } - // Use StringNotAddress.newBuilder() to construct. - private StringNotAddress(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotAddress() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotAddress_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotAddress_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotAddress.class, build.buf.validate.conformance.cases.StringNotAddress.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotAddress)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotAddress other = (build.buf.validate.conformance.cases.StringNotAddress) obj; - - 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(); - 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.StringNotAddress parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotAddress 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.StringNotAddress parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotAddress 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.StringNotAddress parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotAddress 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.StringNotAddress parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotAddress 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.StringNotAddress parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotAddress 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.StringNotAddress 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.StringNotAddress 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.StringNotAddress 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.StringNotAddress} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotAddress) - build.buf.validate.conformance.cases.StringNotAddressOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotAddress_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotAddress_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotAddress.class, build.buf.validate.conformance.cases.StringNotAddress.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotAddress.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotAddress_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotAddress getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotAddress.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotAddress build() { - build.buf.validate.conformance.cases.StringNotAddress result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotAddress buildPartial() { - build.buf.validate.conformance.cases.StringNotAddress result = new build.buf.validate.conformance.cases.StringNotAddress(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotAddress result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotAddress) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotAddress)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotAddress other) { - if (other == build.buf.validate.conformance.cases.StringNotAddress.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotAddress) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotAddress) - private static final build.buf.validate.conformance.cases.StringNotAddress DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotAddress(); - } - - public static build.buf.validate.conformance.cases.StringNotAddress getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotAddress 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.StringNotAddress getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddressOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddressOrBuilder.java deleted file mode 100644 index 16680dbd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotAddressOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotAddressOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotAddress) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContains.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContains.java deleted file mode 100644 index 1dee8bad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContains.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotContains} - */ -public final class StringNotContains extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotContains) - StringNotContainsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotContains.class.getName()); - } - // Use StringNotContains.newBuilder() to construct. - private StringNotContains(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotContains() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotContains_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotContains_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotContains.class, build.buf.validate.conformance.cases.StringNotContains.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotContains)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotContains other = (build.buf.validate.conformance.cases.StringNotContains) obj; - - 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(); - 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.StringNotContains parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotContains 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.StringNotContains parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotContains 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.StringNotContains parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotContains 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.StringNotContains parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotContains 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.StringNotContains parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotContains 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.StringNotContains 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.StringNotContains 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.StringNotContains 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.StringNotContains} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotContains) - build.buf.validate.conformance.cases.StringNotContainsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotContains_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotContains_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotContains.class, build.buf.validate.conformance.cases.StringNotContains.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotContains.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotContains_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotContains getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotContains.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotContains build() { - build.buf.validate.conformance.cases.StringNotContains result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotContains buildPartial() { - build.buf.validate.conformance.cases.StringNotContains result = new build.buf.validate.conformance.cases.StringNotContains(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotContains result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotContains) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotContains)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotContains other) { - if (other == build.buf.validate.conformance.cases.StringNotContains.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotContains) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotContains) - private static final build.buf.validate.conformance.cases.StringNotContains DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotContains(); - } - - public static build.buf.validate.conformance.cases.StringNotContains getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotContains 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.StringNotContains getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContainsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContainsOrBuilder.java deleted file mode 100644 index 706264e9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotContainsOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotContainsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotContains) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmail.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmail.java deleted file mode 100644 index d8659ce8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmail.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotEmail} - */ -public final class StringNotEmail extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotEmail) - StringNotEmailOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotEmail.class.getName()); - } - // Use StringNotEmail.newBuilder() to construct. - private StringNotEmail(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotEmail() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotEmail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotEmail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotEmail.class, build.buf.validate.conformance.cases.StringNotEmail.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotEmail)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotEmail other = (build.buf.validate.conformance.cases.StringNotEmail) obj; - - 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(); - 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.StringNotEmail parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotEmail 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.StringNotEmail parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotEmail 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.StringNotEmail parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotEmail 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.StringNotEmail parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotEmail 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.StringNotEmail parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotEmail 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.StringNotEmail 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.StringNotEmail 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.StringNotEmail 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.StringNotEmail} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotEmail) - build.buf.validate.conformance.cases.StringNotEmailOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotEmail_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotEmail_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotEmail.class, build.buf.validate.conformance.cases.StringNotEmail.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotEmail.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotEmail_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotEmail getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotEmail.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotEmail build() { - build.buf.validate.conformance.cases.StringNotEmail result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotEmail buildPartial() { - build.buf.validate.conformance.cases.StringNotEmail result = new build.buf.validate.conformance.cases.StringNotEmail(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotEmail result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotEmail) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotEmail)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotEmail other) { - if (other == build.buf.validate.conformance.cases.StringNotEmail.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotEmail) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotEmail) - private static final build.buf.validate.conformance.cases.StringNotEmail DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotEmail(); - } - - public static build.buf.validate.conformance.cases.StringNotEmail getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotEmail 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.StringNotEmail getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmailOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmailOrBuilder.java deleted file mode 100644 index fc3d1faf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotEmailOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotEmailOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotEmail) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostname.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostname.java deleted file mode 100644 index 53f5aeca..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostname.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotHostname} - */ -public final class StringNotHostname extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotHostname) - StringNotHostnameOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotHostname.class.getName()); - } - // Use StringNotHostname.newBuilder() to construct. - private StringNotHostname(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotHostname() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotHostname_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotHostname_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotHostname.class, build.buf.validate.conformance.cases.StringNotHostname.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotHostname)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotHostname other = (build.buf.validate.conformance.cases.StringNotHostname) obj; - - 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(); - 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.StringNotHostname parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotHostname 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.StringNotHostname parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotHostname 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.StringNotHostname parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotHostname 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.StringNotHostname parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotHostname 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.StringNotHostname parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotHostname 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.StringNotHostname 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.StringNotHostname 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.StringNotHostname 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.StringNotHostname} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotHostname) - build.buf.validate.conformance.cases.StringNotHostnameOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotHostname_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotHostname_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotHostname.class, build.buf.validate.conformance.cases.StringNotHostname.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotHostname.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotHostname_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotHostname getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotHostname.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotHostname build() { - build.buf.validate.conformance.cases.StringNotHostname result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotHostname buildPartial() { - build.buf.validate.conformance.cases.StringNotHostname result = new build.buf.validate.conformance.cases.StringNotHostname(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotHostname result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotHostname) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotHostname)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotHostname other) { - if (other == build.buf.validate.conformance.cases.StringNotHostname.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotHostname) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotHostname) - private static final build.buf.validate.conformance.cases.StringNotHostname DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotHostname(); - } - - public static build.buf.validate.conformance.cases.StringNotHostname getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotHostname 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.StringNotHostname getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostnameOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostnameOrBuilder.java deleted file mode 100644 index 1b9cd8fe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotHostnameOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotHostnameOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotHostname) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIP.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIP.java deleted file mode 100644 index da4d97b6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIP.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIP} - */ -public final class StringNotIP extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIP) - StringNotIPOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIP.class.getName()); - } - // Use StringNotIP.newBuilder() to construct. - private StringNotIP(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIP() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIP.class, build.buf.validate.conformance.cases.StringNotIP.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIP)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIP other = (build.buf.validate.conformance.cases.StringNotIP) obj; - - 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(); - 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.StringNotIP parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIP 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.StringNotIP parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIP 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.StringNotIP parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIP 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.StringNotIP parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIP 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.StringNotIP parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIP 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.StringNotIP 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.StringNotIP 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.StringNotIP 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.StringNotIP} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIP) - build.buf.validate.conformance.cases.StringNotIPOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIP_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIP_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIP.class, build.buf.validate.conformance.cases.StringNotIP.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIP.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIP_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIP getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIP.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIP build() { - build.buf.validate.conformance.cases.StringNotIP result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIP buildPartial() { - build.buf.validate.conformance.cases.StringNotIP result = new build.buf.validate.conformance.cases.StringNotIP(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIP result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIP) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIP)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIP other) { - if (other == build.buf.validate.conformance.cases.StringNotIP.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIP) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIP) - private static final build.buf.validate.conformance.cases.StringNotIP DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIP(); - } - - public static build.buf.validate.conformance.cases.StringNotIP getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIP 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.StringNotIP getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPOrBuilder.java deleted file mode 100644 index e29324cb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIP) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefix.java deleted file mode 100644 index a3a930f3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPPrefix} - */ -public final class StringNotIPPrefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPPrefix) - StringNotIPPrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPPrefix.class.getName()); - } - // Use StringNotIPPrefix.newBuilder() to construct. - private StringNotIPPrefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPPrefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPPrefix.class, build.buf.validate.conformance.cases.StringNotIPPrefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPPrefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPPrefix other = (build.buf.validate.conformance.cases.StringNotIPPrefix) obj; - - 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(); - 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.StringNotIPPrefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPPrefix 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.StringNotIPPrefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPPrefix 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.StringNotIPPrefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPPrefix 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.StringNotIPPrefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPPrefix 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.StringNotIPPrefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPPrefix 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.StringNotIPPrefix 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.StringNotIPPrefix 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.StringNotIPPrefix 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.StringNotIPPrefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPPrefix) - build.buf.validate.conformance.cases.StringNotIPPrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPPrefix.class, build.buf.validate.conformance.cases.StringNotIPPrefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPPrefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPPrefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPPrefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPPrefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPPrefix build() { - build.buf.validate.conformance.cases.StringNotIPPrefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPPrefix buildPartial() { - build.buf.validate.conformance.cases.StringNotIPPrefix result = new build.buf.validate.conformance.cases.StringNotIPPrefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPPrefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPPrefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPPrefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPPrefix other) { - if (other == build.buf.validate.conformance.cases.StringNotIPPrefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPPrefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPPrefix) - private static final build.buf.validate.conformance.cases.StringNotIPPrefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPPrefix(); - } - - public static build.buf.validate.conformance.cases.StringNotIPPrefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPPrefix 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.StringNotIPPrefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefixOrBuilder.java deleted file mode 100644 index f24961b9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPPrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPPrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPPrefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLen.java deleted file mode 100644 index 0176b44e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPWithPrefixLen} - */ -public final class StringNotIPWithPrefixLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPWithPrefixLen) - StringNotIPWithPrefixLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPWithPrefixLen.class.getName()); - } - // Use StringNotIPWithPrefixLen.newBuilder() to construct. - private StringNotIPWithPrefixLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPWithPrefixLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.class, build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPWithPrefixLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPWithPrefixLen other = (build.buf.validate.conformance.cases.StringNotIPWithPrefixLen) obj; - - 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(); - 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.StringNotIPWithPrefixLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPWithPrefixLen) - build.buf.validate.conformance.cases.StringNotIPWithPrefixLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.class, build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPWithPrefixLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPWithPrefixLen build() { - build.buf.validate.conformance.cases.StringNotIPWithPrefixLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPWithPrefixLen buildPartial() { - build.buf.validate.conformance.cases.StringNotIPWithPrefixLen result = new build.buf.validate.conformance.cases.StringNotIPWithPrefixLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPWithPrefixLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPWithPrefixLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPWithPrefixLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPWithPrefixLen other) { - if (other == build.buf.validate.conformance.cases.StringNotIPWithPrefixLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPWithPrefixLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPWithPrefixLen) - private static final build.buf.validate.conformance.cases.StringNotIPWithPrefixLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPWithPrefixLen(); - } - - public static build.buf.validate.conformance.cases.StringNotIPWithPrefixLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPWithPrefixLen 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.StringNotIPWithPrefixLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLenOrBuilder.java deleted file mode 100644 index 654a9a19..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPWithPrefixLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPWithPrefixLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPWithPrefixLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4.java deleted file mode 100644 index bffce1d6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPv4} - */ -public final class StringNotIPv4 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPv4) - StringNotIPv4OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPv4.class.getName()); - } - // Use StringNotIPv4.newBuilder() to construct. - private StringNotIPv4(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPv4() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv4.class, build.buf.validate.conformance.cases.StringNotIPv4.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPv4)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPv4 other = (build.buf.validate.conformance.cases.StringNotIPv4) obj; - - 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(); - 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.StringNotIPv4 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4 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.StringNotIPv4 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4 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.StringNotIPv4 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4 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.StringNotIPv4 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPv4 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.StringNotIPv4 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPv4 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.StringNotIPv4 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.StringNotIPv4 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.StringNotIPv4 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.StringNotIPv4} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPv4) - build.buf.validate.conformance.cases.StringNotIPv4OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv4.class, build.buf.validate.conformance.cases.StringNotIPv4.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPv4.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPv4.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4 build() { - build.buf.validate.conformance.cases.StringNotIPv4 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4 buildPartial() { - build.buf.validate.conformance.cases.StringNotIPv4 result = new build.buf.validate.conformance.cases.StringNotIPv4(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPv4 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPv4) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPv4)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPv4 other) { - if (other == build.buf.validate.conformance.cases.StringNotIPv4.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPv4) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPv4) - private static final build.buf.validate.conformance.cases.StringNotIPv4 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPv4(); - } - - public static build.buf.validate.conformance.cases.StringNotIPv4 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPv4 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.StringNotIPv4 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4OrBuilder.java deleted file mode 100644 index c010667e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4OrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPv4OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPv4) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4Prefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4Prefix.java deleted file mode 100644 index 7249ed4b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4Prefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPv4Prefix} - */ -public final class StringNotIPv4Prefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPv4Prefix) - StringNotIPv4PrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPv4Prefix.class.getName()); - } - // Use StringNotIPv4Prefix.newBuilder() to construct. - private StringNotIPv4Prefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPv4Prefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv4Prefix.class, build.buf.validate.conformance.cases.StringNotIPv4Prefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPv4Prefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPv4Prefix other = (build.buf.validate.conformance.cases.StringNotIPv4Prefix) obj; - - 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(); - 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.StringNotIPv4Prefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4Prefix 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.StringNotIPv4Prefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4Prefix 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.StringNotIPv4Prefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4Prefix 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.StringNotIPv4Prefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPv4Prefix 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.StringNotIPv4Prefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPv4Prefix 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.StringNotIPv4Prefix 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.StringNotIPv4Prefix 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.StringNotIPv4Prefix 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.StringNotIPv4Prefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPv4Prefix) - build.buf.validate.conformance.cases.StringNotIPv4PrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv4Prefix.class, build.buf.validate.conformance.cases.StringNotIPv4Prefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPv4Prefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4Prefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPv4Prefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4Prefix build() { - build.buf.validate.conformance.cases.StringNotIPv4Prefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4Prefix buildPartial() { - build.buf.validate.conformance.cases.StringNotIPv4Prefix result = new build.buf.validate.conformance.cases.StringNotIPv4Prefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPv4Prefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPv4Prefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPv4Prefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPv4Prefix other) { - if (other == build.buf.validate.conformance.cases.StringNotIPv4Prefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPv4Prefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPv4Prefix) - private static final build.buf.validate.conformance.cases.StringNotIPv4Prefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPv4Prefix(); - } - - public static build.buf.validate.conformance.cases.StringNotIPv4Prefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPv4Prefix 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.StringNotIPv4Prefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4PrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4PrefixOrBuilder.java deleted file mode 100644 index ebbe6617..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4PrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPv4PrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPv4Prefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLen.java deleted file mode 100644 index 169f53b8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPv4WithPrefixLen} - */ -public final class StringNotIPv4WithPrefixLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) - StringNotIPv4WithPrefixLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPv4WithPrefixLen.class.getName()); - } - // Use StringNotIPv4WithPrefixLen.newBuilder() to construct. - private StringNotIPv4WithPrefixLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPv4WithPrefixLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.class, build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPv4WithPrefixLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen other = (build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) obj; - - 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(); - 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.StringNotIPv4WithPrefixLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) - build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.class, build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen build() { - build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen buildPartial() { - build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen result = new build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen other) { - if (other == build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) - private static final build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen(); - } - - public static build.buf.validate.conformance.cases.StringNotIPv4WithPrefixLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPv4WithPrefixLen 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.StringNotIPv4WithPrefixLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLenOrBuilder.java deleted file mode 100644 index 9aa94dc4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv4WithPrefixLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPv4WithPrefixLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPv4WithPrefixLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6.java deleted file mode 100644 index 4d67adae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPv6} - */ -public final class StringNotIPv6 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPv6) - StringNotIPv6OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPv6.class.getName()); - } - // Use StringNotIPv6.newBuilder() to construct. - private StringNotIPv6(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPv6() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv6.class, build.buf.validate.conformance.cases.StringNotIPv6.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPv6)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPv6 other = (build.buf.validate.conformance.cases.StringNotIPv6) obj; - - 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(); - 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.StringNotIPv6 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6 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.StringNotIPv6 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6 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.StringNotIPv6 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6 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.StringNotIPv6 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPv6 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.StringNotIPv6 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPv6 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.StringNotIPv6 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.StringNotIPv6 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.StringNotIPv6 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.StringNotIPv6} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPv6) - build.buf.validate.conformance.cases.StringNotIPv6OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv6.class, build.buf.validate.conformance.cases.StringNotIPv6.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPv6.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPv6.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6 build() { - build.buf.validate.conformance.cases.StringNotIPv6 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6 buildPartial() { - build.buf.validate.conformance.cases.StringNotIPv6 result = new build.buf.validate.conformance.cases.StringNotIPv6(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPv6 result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPv6) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPv6)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPv6 other) { - if (other == build.buf.validate.conformance.cases.StringNotIPv6.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPv6) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPv6) - private static final build.buf.validate.conformance.cases.StringNotIPv6 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPv6(); - } - - public static build.buf.validate.conformance.cases.StringNotIPv6 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPv6 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.StringNotIPv6 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6OrBuilder.java deleted file mode 100644 index 152d43e6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6OrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPv6OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPv6) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6Prefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6Prefix.java deleted file mode 100644 index cfe0a976..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6Prefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPv6Prefix} - */ -public final class StringNotIPv6Prefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPv6Prefix) - StringNotIPv6PrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPv6Prefix.class.getName()); - } - // Use StringNotIPv6Prefix.newBuilder() to construct. - private StringNotIPv6Prefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPv6Prefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv6Prefix.class, build.buf.validate.conformance.cases.StringNotIPv6Prefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPv6Prefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPv6Prefix other = (build.buf.validate.conformance.cases.StringNotIPv6Prefix) obj; - - 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(); - 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.StringNotIPv6Prefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6Prefix 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.StringNotIPv6Prefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6Prefix 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.StringNotIPv6Prefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6Prefix 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.StringNotIPv6Prefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPv6Prefix 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.StringNotIPv6Prefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPv6Prefix 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.StringNotIPv6Prefix 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.StringNotIPv6Prefix 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.StringNotIPv6Prefix 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.StringNotIPv6Prefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPv6Prefix) - build.buf.validate.conformance.cases.StringNotIPv6PrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv6Prefix.class, build.buf.validate.conformance.cases.StringNotIPv6Prefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPv6Prefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6Prefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPv6Prefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6Prefix build() { - build.buf.validate.conformance.cases.StringNotIPv6Prefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6Prefix buildPartial() { - build.buf.validate.conformance.cases.StringNotIPv6Prefix result = new build.buf.validate.conformance.cases.StringNotIPv6Prefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPv6Prefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPv6Prefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPv6Prefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPv6Prefix other) { - if (other == build.buf.validate.conformance.cases.StringNotIPv6Prefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPv6Prefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPv6Prefix) - private static final build.buf.validate.conformance.cases.StringNotIPv6Prefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPv6Prefix(); - } - - public static build.buf.validate.conformance.cases.StringNotIPv6Prefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPv6Prefix 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.StringNotIPv6Prefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6PrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6PrefixOrBuilder.java deleted file mode 100644 index 2d528f40..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6PrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPv6PrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPv6Prefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLen.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLen.java deleted file mode 100644 index 2403017c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLen.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIPv6WithPrefixLen} - */ -public final class StringNotIPv6WithPrefixLen extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) - StringNotIPv6WithPrefixLenOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIPv6WithPrefixLen.class.getName()); - } - // Use StringNotIPv6WithPrefixLen.newBuilder() to construct. - private StringNotIPv6WithPrefixLen(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIPv6WithPrefixLen() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.class, build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIPv6WithPrefixLen)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen other = (build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) obj; - - 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(); - 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.StringNotIPv6WithPrefixLen parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) - build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLenOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.class, build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen build() { - build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen buildPartial() { - build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen result = new build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen other) { - if (other == build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) - private static final build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen(); - } - - public static build.buf.validate.conformance.cases.StringNotIPv6WithPrefixLen getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIPv6WithPrefixLen 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.StringNotIPv6WithPrefixLen getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLenOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLenOrBuilder.java deleted file mode 100644 index 9effb2fd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIPv6WithPrefixLenOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotIPv6WithPrefixLenOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIPv6WithPrefixLen) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIn.java deleted file mode 100644 index ce28136c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotIn.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotIn} - */ -public final class StringNotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotIn) - StringNotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotIn.class.getName()); - } - // Use StringNotIn.newBuilder() to construct. - private StringNotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotIn() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIn.class, build.buf.validate.conformance.cases.StringNotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotIn other = (build.buf.validate.conformance.cases.StringNotIn) obj; - - 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(); - 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.StringNotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIn 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.StringNotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIn 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.StringNotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotIn 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.StringNotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotIn 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.StringNotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotIn 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.StringNotIn 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.StringNotIn 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.StringNotIn 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.StringNotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotIn) - build.buf.validate.conformance.cases.StringNotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotIn.class, build.buf.validate.conformance.cases.StringNotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIn build() { - build.buf.validate.conformance.cases.StringNotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotIn buildPartial() { - build.buf.validate.conformance.cases.StringNotIn result = new build.buf.validate.conformance.cases.StringNotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotIn) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotIn other) { - if (other == build.buf.validate.conformance.cases.StringNotIn.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotIn) - private static final build.buf.validate.conformance.cases.StringNotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotIn(); - } - - public static build.buf.validate.conformance.cases.StringNotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotIn 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.StringNotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotInOrBuilder.java deleted file mode 100644 index 83f9c6ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotInOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUID.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUID.java deleted file mode 100644 index 8d02c14b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUID.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotTUUID} - */ -public final class StringNotTUUID extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotTUUID) - StringNotTUUIDOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotTUUID.class.getName()); - } - // Use StringNotTUUID.newBuilder() to construct. - private StringNotTUUID(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotTUUID() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotTUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotTUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotTUUID.class, build.buf.validate.conformance.cases.StringNotTUUID.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotTUUID)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotTUUID other = (build.buf.validate.conformance.cases.StringNotTUUID) obj; - - 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(); - 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.StringNotTUUID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotTUUID 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.StringNotTUUID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotTUUID 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.StringNotTUUID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotTUUID 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.StringNotTUUID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotTUUID 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.StringNotTUUID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotTUUID 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.StringNotTUUID 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.StringNotTUUID 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.StringNotTUUID 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.StringNotTUUID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotTUUID) - build.buf.validate.conformance.cases.StringNotTUUIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotTUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotTUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotTUUID.class, build.buf.validate.conformance.cases.StringNotTUUID.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotTUUID.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotTUUID_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotTUUID getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotTUUID.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotTUUID build() { - build.buf.validate.conformance.cases.StringNotTUUID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotTUUID buildPartial() { - build.buf.validate.conformance.cases.StringNotTUUID result = new build.buf.validate.conformance.cases.StringNotTUUID(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotTUUID result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotTUUID) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotTUUID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotTUUID other) { - if (other == build.buf.validate.conformance.cases.StringNotTUUID.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotTUUID) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotTUUID) - private static final build.buf.validate.conformance.cases.StringNotTUUID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotTUUID(); - } - - public static build.buf.validate.conformance.cases.StringNotTUUID getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotTUUID 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.StringNotTUUID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUIDOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUIDOrBuilder.java deleted file mode 100644 index 37e87251..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotTUUIDOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotTUUIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotTUUID) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURI.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURI.java deleted file mode 100644 index d3125957..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURI.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotURI} - */ -public final class StringNotURI extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotURI) - StringNotURIOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotURI.class.getName()); - } - // Use StringNotURI.newBuilder() to construct. - private StringNotURI(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotURI() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURI_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURI_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotURI.class, build.buf.validate.conformance.cases.StringNotURI.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotURI)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotURI other = (build.buf.validate.conformance.cases.StringNotURI) obj; - - 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(); - 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.StringNotURI parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotURI 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.StringNotURI parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotURI 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.StringNotURI parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotURI 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.StringNotURI parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotURI 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.StringNotURI parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotURI 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.StringNotURI 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.StringNotURI 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.StringNotURI 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.StringNotURI} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotURI) - build.buf.validate.conformance.cases.StringNotURIOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURI_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURI_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotURI.class, build.buf.validate.conformance.cases.StringNotURI.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotURI.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURI_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotURI getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotURI.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotURI build() { - build.buf.validate.conformance.cases.StringNotURI result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotURI buildPartial() { - build.buf.validate.conformance.cases.StringNotURI result = new build.buf.validate.conformance.cases.StringNotURI(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotURI result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotURI) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotURI)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotURI other) { - if (other == build.buf.validate.conformance.cases.StringNotURI.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotURI) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotURI) - private static final build.buf.validate.conformance.cases.StringNotURI DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotURI(); - } - - public static build.buf.validate.conformance.cases.StringNotURI getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotURI 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.StringNotURI getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIOrBuilder.java deleted file mode 100644 index fae2e349..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotURIOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotURI) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRef.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRef.java deleted file mode 100644 index 30c48a3b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRef.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotURIRef} - */ -public final class StringNotURIRef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotURIRef) - StringNotURIRefOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotURIRef.class.getName()); - } - // Use StringNotURIRef.newBuilder() to construct. - private StringNotURIRef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotURIRef() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURIRef_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURIRef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotURIRef.class, build.buf.validate.conformance.cases.StringNotURIRef.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotURIRef)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotURIRef other = (build.buf.validate.conformance.cases.StringNotURIRef) obj; - - 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(); - 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.StringNotURIRef parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotURIRef 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.StringNotURIRef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotURIRef 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.StringNotURIRef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotURIRef 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.StringNotURIRef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotURIRef 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.StringNotURIRef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotURIRef 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.StringNotURIRef 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.StringNotURIRef 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.StringNotURIRef 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.StringNotURIRef} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotURIRef) - build.buf.validate.conformance.cases.StringNotURIRefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURIRef_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURIRef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotURIRef.class, build.buf.validate.conformance.cases.StringNotURIRef.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotURIRef.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotURIRef_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotURIRef getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotURIRef.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotURIRef build() { - build.buf.validate.conformance.cases.StringNotURIRef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotURIRef buildPartial() { - build.buf.validate.conformance.cases.StringNotURIRef result = new build.buf.validate.conformance.cases.StringNotURIRef(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotURIRef result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotURIRef) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotURIRef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotURIRef other) { - if (other == build.buf.validate.conformance.cases.StringNotURIRef.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotURIRef) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotURIRef) - private static final build.buf.validate.conformance.cases.StringNotURIRef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotURIRef(); - } - - public static build.buf.validate.conformance.cases.StringNotURIRef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotURIRef 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.StringNotURIRef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRefOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRefOrBuilder.java deleted file mode 100644 index 527a1fb0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotURIRefOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotURIRefOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotURIRef) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUID.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUID.java deleted file mode 100644 index f57db166..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUID.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringNotUUID} - */ -public final class StringNotUUID extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringNotUUID) - StringNotUUIDOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringNotUUID.class.getName()); - } - // Use StringNotUUID.newBuilder() to construct. - private StringNotUUID(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringNotUUID() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotUUID.class, build.buf.validate.conformance.cases.StringNotUUID.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringNotUUID)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringNotUUID other = (build.buf.validate.conformance.cases.StringNotUUID) obj; - - 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(); - 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.StringNotUUID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotUUID 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.StringNotUUID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotUUID 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.StringNotUUID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringNotUUID 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.StringNotUUID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringNotUUID 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.StringNotUUID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringNotUUID 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.StringNotUUID 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.StringNotUUID 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.StringNotUUID 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.StringNotUUID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringNotUUID) - build.buf.validate.conformance.cases.StringNotUUIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringNotUUID.class, build.buf.validate.conformance.cases.StringNotUUID.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringNotUUID.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringNotUUID_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotUUID getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringNotUUID.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotUUID build() { - build.buf.validate.conformance.cases.StringNotUUID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringNotUUID buildPartial() { - build.buf.validate.conformance.cases.StringNotUUID result = new build.buf.validate.conformance.cases.StringNotUUID(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringNotUUID result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringNotUUID) { - return mergeFrom((build.buf.validate.conformance.cases.StringNotUUID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringNotUUID other) { - if (other == build.buf.validate.conformance.cases.StringNotUUID.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringNotUUID) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringNotUUID) - private static final build.buf.validate.conformance.cases.StringNotUUID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringNotUUID(); - } - - public static build.buf.validate.conformance.cases.StringNotUUID getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringNotUUID 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.StringNotUUID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUIDOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUIDOrBuilder.java deleted file mode 100644 index 6a059c71..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringNotUUIDOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringNotUUIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringNotUUID) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPattern.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringPattern.java deleted file mode 100644 index c02711fd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPattern.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringPattern} - */ -public final class StringPattern extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringPattern) - StringPatternOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringPattern.class.getName()); - } - // Use StringPattern.newBuilder() to construct. - private StringPattern(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringPattern() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringPattern.class, build.buf.validate.conformance.cases.StringPattern.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringPattern)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringPattern other = (build.buf.validate.conformance.cases.StringPattern) obj; - - 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(); - 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.StringPattern parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPattern 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.StringPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPattern 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.StringPattern parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPattern 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.StringPattern parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringPattern 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.StringPattern parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringPattern 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.StringPattern 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.StringPattern 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.StringPattern 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.StringPattern} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringPattern) - build.buf.validate.conformance.cases.StringPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringPattern.class, build.buf.validate.conformance.cases.StringPattern.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringPattern.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPattern_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPattern getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringPattern.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPattern build() { - build.buf.validate.conformance.cases.StringPattern result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPattern buildPartial() { - build.buf.validate.conformance.cases.StringPattern result = new build.buf.validate.conformance.cases.StringPattern(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringPattern result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringPattern) { - return mergeFrom((build.buf.validate.conformance.cases.StringPattern)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringPattern other) { - if (other == build.buf.validate.conformance.cases.StringPattern.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringPattern) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringPattern) - private static final build.buf.validate.conformance.cases.StringPattern DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringPattern(); - } - - public static build.buf.validate.conformance.cases.StringPattern getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringPattern 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.StringPattern getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapes.java deleted file mode 100644 index 510c0d31..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapes.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringPatternEscapes} - */ -public final class StringPatternEscapes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringPatternEscapes) - StringPatternEscapesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringPatternEscapes.class.getName()); - } - // Use StringPatternEscapes.newBuilder() to construct. - private StringPatternEscapes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringPatternEscapes() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPatternEscapes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPatternEscapes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringPatternEscapes.class, build.buf.validate.conformance.cases.StringPatternEscapes.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringPatternEscapes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringPatternEscapes other = (build.buf.validate.conformance.cases.StringPatternEscapes) obj; - - 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(); - 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.StringPatternEscapes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPatternEscapes 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.StringPatternEscapes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPatternEscapes 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.StringPatternEscapes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPatternEscapes 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.StringPatternEscapes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringPatternEscapes 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.StringPatternEscapes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringPatternEscapes 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.StringPatternEscapes 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.StringPatternEscapes 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.StringPatternEscapes 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.StringPatternEscapes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringPatternEscapes) - build.buf.validate.conformance.cases.StringPatternEscapesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPatternEscapes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPatternEscapes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringPatternEscapes.class, build.buf.validate.conformance.cases.StringPatternEscapes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringPatternEscapes.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPatternEscapes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPatternEscapes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringPatternEscapes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPatternEscapes build() { - build.buf.validate.conformance.cases.StringPatternEscapes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPatternEscapes buildPartial() { - build.buf.validate.conformance.cases.StringPatternEscapes result = new build.buf.validate.conformance.cases.StringPatternEscapes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringPatternEscapes result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringPatternEscapes) { - return mergeFrom((build.buf.validate.conformance.cases.StringPatternEscapes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringPatternEscapes other) { - if (other == build.buf.validate.conformance.cases.StringPatternEscapes.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringPatternEscapes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringPatternEscapes) - private static final build.buf.validate.conformance.cases.StringPatternEscapes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringPatternEscapes(); - } - - public static build.buf.validate.conformance.cases.StringPatternEscapes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringPatternEscapes 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.StringPatternEscapes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapesOrBuilder.java deleted file mode 100644 index 3e5e56f7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternEscapesOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringPatternEscapesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringPatternEscapes) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternOrBuilder.java deleted file mode 100644 index 65d59bde..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPatternOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringPatternOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefix.java deleted file mode 100644 index 0b5f6a07..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringPrefix} - */ -public final class StringPrefix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringPrefix) - StringPrefixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringPrefix.class.getName()); - } - // Use StringPrefix.newBuilder() to construct. - private StringPrefix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringPrefix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringPrefix.class, build.buf.validate.conformance.cases.StringPrefix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringPrefix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringPrefix other = (build.buf.validate.conformance.cases.StringPrefix) obj; - - 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(); - 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.StringPrefix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPrefix 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.StringPrefix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPrefix 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.StringPrefix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringPrefix 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.StringPrefix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringPrefix 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.StringPrefix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringPrefix 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.StringPrefix 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.StringPrefix 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.StringPrefix 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.StringPrefix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringPrefix) - build.buf.validate.conformance.cases.StringPrefixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPrefix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPrefix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringPrefix.class, build.buf.validate.conformance.cases.StringPrefix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringPrefix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringPrefix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPrefix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringPrefix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPrefix build() { - build.buf.validate.conformance.cases.StringPrefix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringPrefix buildPartial() { - build.buf.validate.conformance.cases.StringPrefix result = new build.buf.validate.conformance.cases.StringPrefix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringPrefix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringPrefix) { - return mergeFrom((build.buf.validate.conformance.cases.StringPrefix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringPrefix other) { - if (other == build.buf.validate.conformance.cases.StringPrefix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringPrefix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringPrefix) - private static final build.buf.validate.conformance.cases.StringPrefix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringPrefix(); - } - - public static build.buf.validate.conformance.cases.StringPrefix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringPrefix 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.StringPrefix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefixOrBuilder.java deleted file mode 100644 index 85fd38df..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringPrefixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringPrefixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringPrefix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffix.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffix.java deleted file mode 100644 index 9df6e9bf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffix.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringSuffix} - */ -public final class StringSuffix extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringSuffix) - StringSuffixOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringSuffix.class.getName()); - } - // Use StringSuffix.newBuilder() to construct. - private StringSuffix(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringSuffix() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringSuffix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringSuffix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringSuffix.class, build.buf.validate.conformance.cases.StringSuffix.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringSuffix)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringSuffix other = (build.buf.validate.conformance.cases.StringSuffix) obj; - - 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(); - 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.StringSuffix parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringSuffix 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.StringSuffix parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringSuffix 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.StringSuffix parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringSuffix 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.StringSuffix parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringSuffix 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.StringSuffix parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringSuffix 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.StringSuffix 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.StringSuffix 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.StringSuffix 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.StringSuffix} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringSuffix) - build.buf.validate.conformance.cases.StringSuffixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringSuffix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringSuffix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringSuffix.class, build.buf.validate.conformance.cases.StringSuffix.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringSuffix.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringSuffix_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringSuffix getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringSuffix.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringSuffix build() { - build.buf.validate.conformance.cases.StringSuffix result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringSuffix buildPartial() { - build.buf.validate.conformance.cases.StringSuffix result = new build.buf.validate.conformance.cases.StringSuffix(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringSuffix result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringSuffix) { - return mergeFrom((build.buf.validate.conformance.cases.StringSuffix)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringSuffix other) { - if (other == build.buf.validate.conformance.cases.StringSuffix.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringSuffix) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringSuffix) - private static final build.buf.validate.conformance.cases.StringSuffix DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringSuffix(); - } - - public static build.buf.validate.conformance.cases.StringSuffix getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringSuffix 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.StringSuffix getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffixOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffixOrBuilder.java deleted file mode 100644 index 62689da7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringSuffixOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringSuffixOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringSuffix) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUID.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUID.java deleted file mode 100644 index e6906c4e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUID.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringTUUID} - */ -public final class StringTUUID extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringTUUID) - StringTUUIDOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringTUUID.class.getName()); - } - // Use StringTUUID.newBuilder() to construct. - private StringTUUID(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringTUUID() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringTUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringTUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringTUUID.class, build.buf.validate.conformance.cases.StringTUUID.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringTUUID)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringTUUID other = (build.buf.validate.conformance.cases.StringTUUID) obj; - - 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(); - 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.StringTUUID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringTUUID 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.StringTUUID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringTUUID 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.StringTUUID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringTUUID 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.StringTUUID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringTUUID 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.StringTUUID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringTUUID 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.StringTUUID 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.StringTUUID 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.StringTUUID 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.StringTUUID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringTUUID) - build.buf.validate.conformance.cases.StringTUUIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringTUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringTUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringTUUID.class, build.buf.validate.conformance.cases.StringTUUID.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringTUUID.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringTUUID_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringTUUID getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringTUUID.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringTUUID build() { - build.buf.validate.conformance.cases.StringTUUID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringTUUID buildPartial() { - build.buf.validate.conformance.cases.StringTUUID result = new build.buf.validate.conformance.cases.StringTUUID(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringTUUID result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringTUUID) { - return mergeFrom((build.buf.validate.conformance.cases.StringTUUID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringTUUID other) { - if (other == build.buf.validate.conformance.cases.StringTUUID.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringTUUID) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringTUUID) - private static final build.buf.validate.conformance.cases.StringTUUID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringTUUID(); - } - - public static build.buf.validate.conformance.cases.StringTUUID getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringTUUID 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.StringTUUID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUIDOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUIDOrBuilder.java deleted file mode 100644 index b1dcae57..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringTUUIDOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringTUUIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringTUUID) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURI.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringURI.java deleted file mode 100644 index 691aea46..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURI.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringURI} - */ -public final class StringURI extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringURI) - StringURIOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringURI.class.getName()); - } - // Use StringURI.newBuilder() to construct. - private StringURI(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringURI() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURI_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURI_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringURI.class, build.buf.validate.conformance.cases.StringURI.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringURI)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringURI other = (build.buf.validate.conformance.cases.StringURI) obj; - - 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(); - 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.StringURI parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringURI 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.StringURI parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringURI 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.StringURI parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringURI 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.StringURI parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringURI 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.StringURI parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringURI 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.StringURI 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.StringURI 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.StringURI 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.StringURI} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringURI) - build.buf.validate.conformance.cases.StringURIOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURI_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURI_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringURI.class, build.buf.validate.conformance.cases.StringURI.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringURI.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURI_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringURI getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringURI.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringURI build() { - build.buf.validate.conformance.cases.StringURI result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringURI buildPartial() { - build.buf.validate.conformance.cases.StringURI result = new build.buf.validate.conformance.cases.StringURI(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringURI result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringURI) { - return mergeFrom((build.buf.validate.conformance.cases.StringURI)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringURI other) { - if (other == build.buf.validate.conformance.cases.StringURI.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringURI) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringURI) - private static final build.buf.validate.conformance.cases.StringURI DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringURI(); - } - - public static build.buf.validate.conformance.cases.StringURI getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringURI 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.StringURI getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIOrBuilder.java deleted file mode 100644 index 3b03f6f0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringURIOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringURI) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRef.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRef.java deleted file mode 100644 index 5c428e8e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRef.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringURIRef} - */ -public final class StringURIRef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringURIRef) - StringURIRefOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringURIRef.class.getName()); - } - // Use StringURIRef.newBuilder() to construct. - private StringURIRef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringURIRef() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURIRef_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURIRef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringURIRef.class, build.buf.validate.conformance.cases.StringURIRef.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringURIRef)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringURIRef other = (build.buf.validate.conformance.cases.StringURIRef) obj; - - 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(); - 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.StringURIRef parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringURIRef 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.StringURIRef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringURIRef 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.StringURIRef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringURIRef 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.StringURIRef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringURIRef 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.StringURIRef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringURIRef 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.StringURIRef 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.StringURIRef 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.StringURIRef 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.StringURIRef} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringURIRef) - build.buf.validate.conformance.cases.StringURIRefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURIRef_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURIRef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringURIRef.class, build.buf.validate.conformance.cases.StringURIRef.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringURIRef.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringURIRef_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringURIRef getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringURIRef.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringURIRef build() { - build.buf.validate.conformance.cases.StringURIRef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringURIRef buildPartial() { - build.buf.validate.conformance.cases.StringURIRef result = new build.buf.validate.conformance.cases.StringURIRef(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringURIRef result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringURIRef) { - return mergeFrom((build.buf.validate.conformance.cases.StringURIRef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringURIRef other) { - if (other == build.buf.validate.conformance.cases.StringURIRef.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringURIRef) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringURIRef) - private static final build.buf.validate.conformance.cases.StringURIRef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringURIRef(); - } - - public static build.buf.validate.conformance.cases.StringURIRef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringURIRef 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.StringURIRef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRefOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRefOrBuilder.java deleted file mode 100644 index f215915b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringURIRefOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringURIRefOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringURIRef) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUID.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUID.java deleted file mode 100644 index 19aadf2c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUID.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringUUID} - */ -public final class StringUUID extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringUUID) - StringUUIDOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringUUID.class.getName()); - } - // Use StringUUID.newBuilder() to construct. - private StringUUID(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringUUID() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringUUID.class, build.buf.validate.conformance.cases.StringUUID.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringUUID)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringUUID other = (build.buf.validate.conformance.cases.StringUUID) obj; - - 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(); - 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.StringUUID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringUUID 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.StringUUID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringUUID 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.StringUUID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringUUID 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.StringUUID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringUUID 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.StringUUID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringUUID 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.StringUUID 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.StringUUID 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.StringUUID 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.StringUUID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringUUID) - build.buf.validate.conformance.cases.StringUUIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringUUID.class, build.buf.validate.conformance.cases.StringUUID.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringUUID.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUID_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringUUID getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringUUID.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringUUID build() { - build.buf.validate.conformance.cases.StringUUID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringUUID buildPartial() { - build.buf.validate.conformance.cases.StringUUID result = new build.buf.validate.conformance.cases.StringUUID(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringUUID result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringUUID) { - return mergeFrom((build.buf.validate.conformance.cases.StringUUID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringUUID other) { - if (other == build.buf.validate.conformance.cases.StringUUID.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringUUID) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringUUID) - private static final build.buf.validate.conformance.cases.StringUUID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringUUID(); - } - - public static build.buf.validate.conformance.cases.StringUUID getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringUUID 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.StringUUID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnore.java deleted file mode 100644 index d702404a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnore.java +++ /dev/null @@ -1,501 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.StringUUIDIgnore} - */ -public final class StringUUIDIgnore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.StringUUIDIgnore) - StringUUIDIgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringUUIDIgnore.class.getName()); - } - // Use StringUUIDIgnore.newBuilder() to construct. - private StringUUIDIgnore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StringUUIDIgnore() { - val_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUIDIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUIDIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringUUIDIgnore.class, build.buf.validate.conformance.cases.StringUUIDIgnore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(val_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, val_); - } - 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.StringUUIDIgnore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.StringUUIDIgnore other = (build.buf.validate.conformance.cases.StringUUIDIgnore) obj; - - 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(); - 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.StringUUIDIgnore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringUUIDIgnore 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.StringUUIDIgnore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringUUIDIgnore 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.StringUUIDIgnore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.StringUUIDIgnore 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.StringUUIDIgnore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.StringUUIDIgnore 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.StringUUIDIgnore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.StringUUIDIgnore 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.StringUUIDIgnore 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.StringUUIDIgnore 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.StringUUIDIgnore 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.StringUUIDIgnore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.StringUUIDIgnore) - build.buf.validate.conformance.cases.StringUUIDIgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUIDIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUIDIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.StringUUIDIgnore.class, build.buf.validate.conformance.cases.StringUUIDIgnore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.StringUUIDIgnore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.StringsProto.internal_static_buf_validate_conformance_cases_StringUUIDIgnore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringUUIDIgnore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.StringUUIDIgnore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringUUIDIgnore build() { - build.buf.validate.conformance.cases.StringUUIDIgnore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.StringUUIDIgnore buildPartial() { - build.buf.validate.conformance.cases.StringUUIDIgnore result = new build.buf.validate.conformance.cases.StringUUIDIgnore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.StringUUIDIgnore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.StringUUIDIgnore) { - return mergeFrom((build.buf.validate.conformance.cases.StringUUIDIgnore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.StringUUIDIgnore other) { - if (other == build.buf.validate.conformance.cases.StringUUIDIgnore.getDefaultInstance()) return this; - if (!other.getVal().isEmpty()) { - val_ = other.val_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - val_ = input.readStringRequireUtf8(); - 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 java.lang.Object val_ = ""; - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public java.lang.String getVal() { - java.lang.Object ref = val_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - val_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - public com.google.protobuf.ByteString - getValBytes() { - java.lang.Object ref = val_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - val_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - val_ = getDefaultInstance().getVal(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The bytes for val to set. - * @return This builder for chaining. - */ - public Builder setValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.StringUUIDIgnore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.StringUUIDIgnore) - private static final build.buf.validate.conformance.cases.StringUUIDIgnore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.StringUUIDIgnore(); - } - - public static build.buf.validate.conformance.cases.StringUUIDIgnore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringUUIDIgnore 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.StringUUIDIgnore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnoreOrBuilder.java deleted file mode 100644 index d555f8fb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDIgnoreOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringUUIDIgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringUUIDIgnore) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDOrBuilder.java deleted file mode 100644 index 16de2760..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringUUIDOrBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface StringUUIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.StringUUID) - com.google.protobuf.MessageOrBuilder { - - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - java.lang.String getVal(); - /** - * string val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The bytes for val. - */ - com.google.protobuf.ByteString - getValBytes(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StringsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StringsProto.java deleted file mode 100644 index a61142fe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StringsProto.java +++ /dev/null @@ -1,809 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/strings.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class StringsProto { - private StringsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringMinLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringMinLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringMaxLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringMaxLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringMinMaxLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringMinMaxLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringLenBytes_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringLenBytes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringMinBytes_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringMinBytes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringMaxBytes_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringMaxBytes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringMinMaxBytes_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringMinMaxBytes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringPattern_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringPattern_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringPatternEscapes_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringPatternEscapes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringPrefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringPrefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringContains_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringContains_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotContains_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotContains_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringSuffix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringSuffix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringEmail_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringEmail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotEmail_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotEmail_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringAddress_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringAddress_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotAddress_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotAddress_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHostname_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHostname_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotHostname_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotHostname_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIP_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIP_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIP_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIP_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPv4_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPv4_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPv4_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPv4_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPv6_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPv6_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPv6_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPv6_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPPrefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPPrefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPPrefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPPrefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPv4Prefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPv4Prefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringIPv6Prefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringIPv6Prefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringURI_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringURI_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotURI_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotURI_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringURIRef_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringURIRef_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotURIRef_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotURIRef_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringUUID_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringUUID_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotUUID_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotUUID_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringTUUID_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringTUUID_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringNotTUUID_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringNotTUUID_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHttpHeaderName_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHttpHeaderName_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringUUIDIgnore_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringUUIDIgnore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringInOneof_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringInOneof_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHostAndPort_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHostAndPort_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_StringExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_StringExample_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,buf/validate/conformance/cases/strings" + - ".proto\022\036buf.validate.conformance.cases\032\033" + - "buf/validate/validate.proto\"\036\n\nStringNon" + - "e\022\020\n\003val\030\001 \001(\tR\003val\"+\n\013StringConst\022\034\n\003va" + - "l\030\001 \001(\tB\n\272H\007r\005\n\003fooR\003val\"-\n\010StringIn\022!\n\003" + - "val\030\001 \001(\tB\017\272H\014r\nR\003barR\003bazR\003val\"2\n\013Strin" + - "gNotIn\022#\n\003val\030\001 \001(\tB\021\272H\016r\014Z\004fizzZ\004buzzR\003" + - "val\"\'\n\tStringLen\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\230\001\003R" + - "\003val\")\n\014StringMinLen\022\031\n\003val\030\001 \001(\tB\007\272H\004r\002" + - "\020\003R\003val\")\n\014StringMaxLen\022\031\n\003val\030\001 \001(\tB\007\272H" + - "\004r\002\030\005R\003val\".\n\017StringMinMaxLen\022\033\n\003val\030\001 \001" + - "(\tB\t\272H\006r\004\020\003\030\005R\003val\"3\n\024StringEqualMinMaxL" + - "en\022\033\n\003val\030\001 \001(\tB\t\272H\006r\004\020\005\030\005R\003val\",\n\016Strin" + - "gLenBytes\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\240\001\004R\003val\"+\n" + - "\016StringMinBytes\022\031\n\003val\030\001 \001(\tB\007\272H\004r\002 \004R\003v" + - "al\"+\n\016StringMaxBytes\022\031\n\003val\030\001 \001(\tB\007\272H\004r\002" + - "(\010R\003val\"0\n\021StringMinMaxBytes\022\033\n\003val\030\001 \001(" + - "\tB\t\272H\006r\004 \004(\010R\003val\"5\n\026StringEqualMinMaxBy" + - "tes\022\033\n\003val\030\001 \001(\tB\t\272H\006r\004 \004(\004R\003val\"9\n\rStri" + - "ngPattern\022(\n\003val\030\001 \001(\tB\026\272H\023r\0212\017(?i)^[a-z" + - "0-9]+$R\003val\"9\n\024StringPatternEscapes\022!\n\003v" + - "al\030\001 \001(\tB\017\272H\014r\n2\010\\* \\\\ \\wR\003val\",\n\014String" + - "Prefix\022\034\n\003val\030\001 \001(\tB\n\272H\007r\005:\003fooR\003val\".\n\016" + - "StringContains\022\034\n\003val\030\001 \001(\tB\n\272H\007r\005J\003barR" + - "\003val\"2\n\021StringNotContains\022\035\n\003val\030\001 \001(\tB\013" + - "\272H\010r\006\272\001\003barR\003val\",\n\014StringSuffix\022\034\n\003val\030" + - "\001 \001(\tB\n\272H\007r\005B\003bazR\003val\"(\n\013StringEmail\022\031\n" + - "\003val\030\001 \001(\tB\007\272H\004r\002`\001R\003val\"+\n\016StringNotEma" + - "il\022\031\n\003val\030\001 \001(\tB\007\272H\004r\002`\000R\003val\"+\n\rStringA" + - "ddress\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\250\001\001R\003val\".\n\020St" + - "ringNotAddress\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\250\001\000R\003v" + - "al\"+\n\016StringHostname\022\031\n\003val\030\001 \001(\tB\007\272H\004r\002" + - "h\001R\003val\".\n\021StringNotHostname\022\031\n\003val\030\001 \001(" + - "\tB\007\272H\004r\002h\000R\003val\"%\n\010StringIP\022\031\n\003val\030\001 \001(\t" + - "B\007\272H\004r\002p\001R\003val\"(\n\013StringNotIP\022\031\n\003val\030\001 \001" + - "(\tB\007\272H\004r\002p\000R\003val\"\'\n\nStringIPv4\022\031\n\003val\030\001 " + - "\001(\tB\007\272H\004r\002x\001R\003val\"*\n\rStringNotIPv4\022\031\n\003va" + - "l\030\001 \001(\tB\007\272H\004r\002x\000R\003val\"(\n\nStringIPv6\022\032\n\003v" + - "al\030\001 \001(\tB\010\272H\005r\003\200\001\001R\003val\"+\n\rStringNotIPv6" + - "\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\200\001\000R\003val\"3\n\025StringIP" + - "WithPrefixLen\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\320\001\001R\003va" + - "l\"6\n\030StringNotIPWithPrefixLen\022\032\n\003val\030\001 \001" + - "(\tB\010\272H\005r\003\320\001\000R\003val\"5\n\027StringIPv4WithPrefi" + - "xLen\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\330\001\001R\003val\"8\n\032Stri" + - "ngNotIPv4WithPrefixLen\022\032\n\003val\030\001 \001(\tB\010\272H\005" + - "r\003\330\001\000R\003val\"5\n\027StringIPv6WithPrefixLen\022\032\n" + - "\003val\030\001 \001(\tB\010\272H\005r\003\340\001\001R\003val\"8\n\032StringNotIP" + - "v6WithPrefixLen\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\340\001\000R\003" + - "val\",\n\016StringIPPrefix\022\032\n\003val\030\001 \001(\tB\010\272H\005r" + - "\003\350\001\001R\003val\"/\n\021StringNotIPPrefix\022\032\n\003val\030\001 " + - "\001(\tB\010\272H\005r\003\350\001\000R\003val\".\n\020StringIPv4Prefix\022\032" + - "\n\003val\030\001 \001(\tB\010\272H\005r\003\360\001\001R\003val\"1\n\023StringNotI" + - "Pv4Prefix\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\360\001\000R\003val\".\n" + - "\020StringIPv6Prefix\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\370\001\001" + - "R\003val\"1\n\023StringNotIPv6Prefix\022\032\n\003val\030\001 \001(" + - "\tB\010\272H\005r\003\370\001\000R\003val\"\'\n\tStringURI\022\032\n\003val\030\001 \001" + - "(\tB\010\272H\005r\003\210\001\001R\003val\"*\n\014StringNotURI\022\032\n\003val" + - "\030\001 \001(\tB\010\272H\005r\003\210\001\000R\003val\"*\n\014StringURIRef\022\032\n" + - "\003val\030\001 \001(\tB\010\272H\005r\003\220\001\001R\003val\"-\n\017StringNotUR" + - "IRef\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\220\001\000R\003val\"(\n\nStri" + - "ngUUID\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\260\001\001R\003val\"+\n\rSt" + - "ringNotUUID\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\260\001\000R\003val\"" + - ")\n\013StringTUUID\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\210\002\001R\003v" + - "al\",\n\016StringNotTUUID\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003" + - "\210\002\000R\003val\"2\n\024StringHttpHeaderName\022\032\n\003val\030" + - "\001 \001(\tB\010\272H\005r\003\300\001\001R\003val\"3\n\025StringHttpHeader" + - "Value\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\300\001\002R\003val\":\n\031Str" + - "ingHttpHeaderNameLoose\022\035\n\003val\030\001 \001(\tB\013\272H\010" + - "r\006\300\001\001\310\001\000R\003val\";\n\032StringHttpHeaderValueLo" + - "ose\022\035\n\003val\030\001 \001(\tB\013\272H\010r\006\300\001\002\310\001\000R\003val\"1\n\020St" + - "ringUUIDIgnore\022\035\n\003val\030\001 \001(\tB\013\272H\010r\003\260\001\001\320\001\001" + - "R\003val\"7\n\rStringInOneof\022\037\n\003bar\030\001 \001(\tB\013\272H\010" + - "r\006R\001aR\001bH\000R\003barB\005\n\003foo\"/\n\021StringHostAndP" + - "ort\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\200\002\001R\003val\"\244\001\n\031Stri" + - "ngHostAndOptionalPort\022\206\001\n\003val\030\001 \001(\tBt\272Hq" + - "\272\001n\n\"string.host_and_port.optional_port\022" + - "-value must be a host and (optional) por" + - "t pair\032\031this.isHostAndPort(false)R\003val\"." + - "\n\rStringExample\022\035\n\003val\030\001 \001(\tB\013\272H\010r\006\222\002\003fo" + - "oR\003valB\320\001\n$build.buf.validate.conformanc" + - "e.casesB\014StringsProtoP\001\242\002\004BVCC\252\002\036Buf.Val" + - "idate.Conformance.Cases\312\002\036Buf\\Validate\\C" + - "onformance\\Cases\342\002*Buf\\Validate\\Conforma" + - "nce\\Cases\\GPBMetadata\352\002!Buf::Validate::C" + - "onformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_StringNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_StringNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringConst_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_StringConst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringConst_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIn_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_StringIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIn_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_StringNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringLen_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_StringLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringMinLen_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_StringMinLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringMinLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringMaxLen_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_StringMaxLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringMaxLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringMinMaxLen_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_StringMinMaxLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringMinMaxLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringEqualMinMaxLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringLenBytes_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_StringLenBytes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringLenBytes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringMinBytes_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_StringMinBytes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringMinBytes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringMaxBytes_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_StringMaxBytes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringMaxBytes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringMinMaxBytes_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_StringMinMaxBytes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringMinMaxBytes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringEqualMinMaxBytes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringPattern_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_conformance_cases_StringPattern_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringPattern_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringPatternEscapes_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_conformance_cases_StringPatternEscapes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringPatternEscapes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringPrefix_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_conformance_cases_StringPrefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringPrefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringContains_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_conformance_cases_StringContains_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringContains_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotContains_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_conformance_cases_StringNotContains_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotContains_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringSuffix_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_conformance_cases_StringSuffix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringSuffix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringEmail_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_conformance_cases_StringEmail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringEmail_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotEmail_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_conformance_cases_StringNotEmail_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotEmail_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringAddress_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_conformance_cases_StringAddress_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringAddress_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotAddress_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_conformance_cases_StringNotAddress_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotAddress_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringHostname_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_conformance_cases_StringHostname_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHostname_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotHostname_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_conformance_cases_StringNotHostname_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotHostname_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIP_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_buf_validate_conformance_cases_StringIP_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIP_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIP_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_buf_validate_conformance_cases_StringNotIP_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIP_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPv4_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_buf_validate_conformance_cases_StringIPv4_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPv4_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPv4_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_buf_validate_conformance_cases_StringNotIPv4_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPv4_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPv6_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_buf_validate_conformance_cases_StringIPv6_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPv6_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPv6_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_buf_validate_conformance_cases_StringNotIPv6_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPv6_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPWithPrefixLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPWithPrefixLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPv4WithPrefixLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPv4WithPrefixLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPv6WithPrefixLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPv6WithPrefixLen_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPPrefix_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_buf_validate_conformance_cases_StringIPPrefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPPrefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPPrefix_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_buf_validate_conformance_cases_StringNotIPPrefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPPrefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPv4Prefix_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_buf_validate_conformance_cases_StringIPv4Prefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPv4Prefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPv4Prefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringIPv6Prefix_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_buf_validate_conformance_cases_StringIPv6Prefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringIPv6Prefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotIPv6Prefix_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringURI_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_buf_validate_conformance_cases_StringURI_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringURI_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotURI_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_buf_validate_conformance_cases_StringNotURI_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotURI_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringURIRef_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_buf_validate_conformance_cases_StringURIRef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringURIRef_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotURIRef_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_buf_validate_conformance_cases_StringNotURIRef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotURIRef_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringUUID_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_buf_validate_conformance_cases_StringUUID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringUUID_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotUUID_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_buf_validate_conformance_cases_StringNotUUID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotUUID_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringTUUID_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_buf_validate_conformance_cases_StringTUUID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringTUUID_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringNotTUUID_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_buf_validate_conformance_cases_StringNotTUUID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringNotTUUID_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringHttpHeaderName_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_buf_validate_conformance_cases_StringHttpHeaderName_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHttpHeaderName_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHttpHeaderValue_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHttpHeaderNameLoose_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHttpHeaderValueLoose_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringUUIDIgnore_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_buf_validate_conformance_cases_StringUUIDIgnore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringUUIDIgnore_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringInOneof_descriptor = - getDescriptor().getMessageTypes().get(57); - internal_static_buf_validate_conformance_cases_StringInOneof_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringInOneof_descriptor, - new java.lang.String[] { "Bar", "Foo", }); - internal_static_buf_validate_conformance_cases_StringHostAndPort_descriptor = - getDescriptor().getMessageTypes().get(58); - internal_static_buf_validate_conformance_cases_StringHostAndPort_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHostAndPort_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_descriptor = - getDescriptor().getMessageTypes().get(59); - internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringHostAndOptionalPort_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_StringExample_descriptor = - getDescriptor().getMessageTypes().get(60); - internal_static_buf_validate_conformance_cases_StringExample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_StringExample_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TestEnum.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TestEnum.java deleted file mode 100644 index 65685f49..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TestEnum.java +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf enum {@code buf.validate.conformance.cases.TestEnum} - */ -public enum TestEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * TEST_ENUM_UNSPECIFIED = 0; - */ - TEST_ENUM_UNSPECIFIED(0), - /** - * TEST_ENUM_ONE = 1; - */ - TEST_ENUM_ONE(1), - /** - * TEST_ENUM_TWO = 2; - */ - TEST_ENUM_TWO(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestEnum.class.getName()); - } - /** - * TEST_ENUM_UNSPECIFIED = 0; - */ - public static final int TEST_ENUM_UNSPECIFIED_VALUE = 0; - /** - * TEST_ENUM_ONE = 1; - */ - public static final int TEST_ENUM_ONE_VALUE = 1; - /** - * TEST_ENUM_TWO = 2; - */ - public static final int TEST_ENUM_TWO_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TestEnum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TestEnum forNumber(int value) { - switch (value) { - case 0: return TEST_ENUM_UNSPECIFIED; - case 1: return TEST_ENUM_ONE; - case 2: return TEST_ENUM_TWO; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TestEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TestEnum findValueByNumber(int number) { - return TestEnum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.getDescriptor().getEnumTypes().get(0); - } - - private static final TestEnum[] VALUES = values(); - - public static TestEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TestEnum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.TestEnum) -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TestEnumAlias.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TestEnumAlias.java deleted file mode 100644 index 6d28c7f5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TestEnumAlias.java +++ /dev/null @@ -1,170 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/enums.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf enum {@code buf.validate.conformance.cases.TestEnumAlias} - */ -public enum TestEnumAlias - implements com.google.protobuf.ProtocolMessageEnum { - /** - * TEST_ENUM_ALIAS_UNSPECIFIED = 0; - */ - TEST_ENUM_ALIAS_UNSPECIFIED(0), - /** - * TEST_ENUM_ALIAS_A = 1; - */ - TEST_ENUM_ALIAS_A(1), - /** - * TEST_ENUM_ALIAS_B = 2; - */ - TEST_ENUM_ALIAS_B(2), - /** - * TEST_ENUM_ALIAS_C = 3; - */ - TEST_ENUM_ALIAS_C(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestEnumAlias.class.getName()); - } - /** - * TEST_ENUM_ALIAS_ALPHA = 1; - */ - public static final TestEnumAlias TEST_ENUM_ALIAS_ALPHA = TEST_ENUM_ALIAS_A; - /** - * TEST_ENUM_ALIAS_BETA = 2; - */ - public static final TestEnumAlias TEST_ENUM_ALIAS_BETA = TEST_ENUM_ALIAS_B; - /** - * TEST_ENUM_ALIAS_GAMMA = 3; - */ - public static final TestEnumAlias TEST_ENUM_ALIAS_GAMMA = TEST_ENUM_ALIAS_C; - /** - * TEST_ENUM_ALIAS_UNSPECIFIED = 0; - */ - public static final int TEST_ENUM_ALIAS_UNSPECIFIED_VALUE = 0; - /** - * TEST_ENUM_ALIAS_A = 1; - */ - public static final int TEST_ENUM_ALIAS_A_VALUE = 1; - /** - * TEST_ENUM_ALIAS_B = 2; - */ - public static final int TEST_ENUM_ALIAS_B_VALUE = 2; - /** - * TEST_ENUM_ALIAS_C = 3; - */ - public static final int TEST_ENUM_ALIAS_C_VALUE = 3; - /** - * TEST_ENUM_ALIAS_ALPHA = 1; - */ - public static final int TEST_ENUM_ALIAS_ALPHA_VALUE = 1; - /** - * TEST_ENUM_ALIAS_BETA = 2; - */ - public static final int TEST_ENUM_ALIAS_BETA_VALUE = 2; - /** - * TEST_ENUM_ALIAS_GAMMA = 3; - */ - public static final int TEST_ENUM_ALIAS_GAMMA_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TestEnumAlias valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TestEnumAlias forNumber(int value) { - switch (value) { - case 0: return TEST_ENUM_ALIAS_UNSPECIFIED; - case 1: return TEST_ENUM_ALIAS_A; - case 2: return TEST_ENUM_ALIAS_B; - case 3: return TEST_ENUM_ALIAS_C; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TestEnumAlias> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TestEnumAlias findValueByNumber(int number) { - return TestEnumAlias.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.EnumsProto.getDescriptor().getEnumTypes().get(1); - } - - private static final TestEnumAlias[] VALUES = getStaticValuesArray(); - private static TestEnumAlias[] getStaticValuesArray() { - return new TestEnumAlias[] { - TEST_ENUM_ALIAS_UNSPECIFIED, TEST_ENUM_ALIAS_A, TEST_ENUM_ALIAS_B, TEST_ENUM_ALIAS_C, TEST_ENUM_ALIAS_ALPHA, TEST_ENUM_ALIAS_BETA, TEST_ENUM_ALIAS_GAMMA, - }; - } - public static TestEnumAlias valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TestEnumAlias(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.TestEnumAlias) -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TestMsg.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TestMsg.java deleted file mode 100644 index 684b8333..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TestMsg.java +++ /dev/null @@ -1,694 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TestMsg} - */ -public final class TestMsg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TestMsg) - TestMsgOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestMsg.class.getName()); - } - // Use TestMsg.newBuilder() to construct. - private TestMsg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TestMsg() { - const_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_TestMsg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_TestMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TestMsg.class, build.buf.validate.conformance.cases.TestMsg.Builder.class); - } - - private int bitField0_; - public static final int CONST_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object const_ = ""; - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The const. - */ - @java.lang.Override - public java.lang.String getConst() { - java.lang.Object ref = const_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - const_ = s; - return s; - } - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The bytes for const. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstBytes() { - java.lang.Object ref = const_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - const_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NESTED_FIELD_NUMBER = 2; - private build.buf.validate.conformance.cases.TestMsg nested_; - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - * @return Whether the nested field is set. - */ - @java.lang.Override - public boolean hasNested() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - * @return The nested. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getNested() { - return nested_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : nested_; - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsgOrBuilder getNestedOrBuilder() { - return nested_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : nested_; - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(const_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, const_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getNested()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(const_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, const_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getNested()); - } - 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.TestMsg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TestMsg other = (build.buf.validate.conformance.cases.TestMsg) obj; - - if (!getConst() - .equals(other.getConst())) return false; - if (hasNested() != other.hasNested()) return false; - if (hasNested()) { - if (!getNested() - .equals(other.getNested())) 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(); - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst().hashCode(); - if (hasNested()) { - hash = (37 * hash) + NESTED_FIELD_NUMBER; - hash = (53 * hash) + getNested().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.TestMsg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TestMsg 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.TestMsg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TestMsg 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.TestMsg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TestMsg 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.TestMsg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TestMsg 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.TestMsg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TestMsg 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.TestMsg 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.TestMsg 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.TestMsg 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.TestMsg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TestMsg) - build.buf.validate.conformance.cases.TestMsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_TestMsg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_TestMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TestMsg.class, build.buf.validate.conformance.cases.TestMsg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TestMsg.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getNestedFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = ""; - nested_ = null; - if (nestedBuilder_ != null) { - nestedBuilder_.dispose(); - nestedBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.MessagesProto.internal_static_buf_validate_conformance_cases_TestMsg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TestMsg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg build() { - build.buf.validate.conformance.cases.TestMsg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TestMsg buildPartial() { - build.buf.validate.conformance.cases.TestMsg result = new build.buf.validate.conformance.cases.TestMsg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TestMsg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nested_ = nestedBuilder_ == null - ? nested_ - : nestedBuilder_.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.TestMsg) { - return mergeFrom((build.buf.validate.conformance.cases.TestMsg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TestMsg other) { - if (other == build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) return this; - if (!other.getConst().isEmpty()) { - const_ = other.const_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNested()) { - mergeNested(other.getNested()); - } - 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: { - const_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getNestedFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - 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.lang.Object const_ = ""; - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The const. - */ - public java.lang.String getConst() { - java.lang.Object ref = const_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - const_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The bytes for const. - */ - public com.google.protobuf.ByteString - getConstBytes() { - java.lang.Object ref = const_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - const_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - const_ = getDefaultInstance().getConst(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @param value The bytes for const to set. - * @return This builder for chaining. - */ - public Builder setConstBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.TestMsg nested_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> nestedBuilder_; - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - * @return Whether the nested field is set. - */ - public boolean hasNested() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - * @return The nested. - */ - public build.buf.validate.conformance.cases.TestMsg getNested() { - if (nestedBuilder_ == null) { - return nested_ == null ? build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : nested_; - } else { - return nestedBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - public Builder setNested(build.buf.validate.conformance.cases.TestMsg value) { - if (nestedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nested_ = value; - } else { - nestedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - public Builder setNested( - build.buf.validate.conformance.cases.TestMsg.Builder builderForValue) { - if (nestedBuilder_ == null) { - nested_ = builderForValue.build(); - } else { - nestedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - public Builder mergeNested(build.buf.validate.conformance.cases.TestMsg value) { - if (nestedBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - nested_ != null && - nested_ != build.buf.validate.conformance.cases.TestMsg.getDefaultInstance()) { - getNestedBuilder().mergeFrom(value); - } else { - nested_ = value; - } - } else { - nestedBuilder_.mergeFrom(value); - } - if (nested_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - public Builder clearNested() { - bitField0_ = (bitField0_ & ~0x00000002); - nested_ = null; - if (nestedBuilder_ != null) { - nestedBuilder_.dispose(); - nestedBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - public build.buf.validate.conformance.cases.TestMsg.Builder getNestedBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNestedFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - public build.buf.validate.conformance.cases.TestMsgOrBuilder getNestedOrBuilder() { - if (nestedBuilder_ != null) { - return nestedBuilder_.getMessageOrBuilder(); - } else { - return nested_ == null ? - build.buf.validate.conformance.cases.TestMsg.getDefaultInstance() : nested_; - } - } - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder> - getNestedFieldBuilder() { - if (nestedBuilder_ == null) { - nestedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.TestMsg, build.buf.validate.conformance.cases.TestMsg.Builder, build.buf.validate.conformance.cases.TestMsgOrBuilder>( - getNested(), - getParentForChildren(), - isClean()); - nested_ = null; - } - return nestedBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TestMsg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TestMsg) - private static final build.buf.validate.conformance.cases.TestMsg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TestMsg(); - } - - public static build.buf.validate.conformance.cases.TestMsg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestMsg 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.TestMsg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TestMsgOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TestMsgOrBuilder.java deleted file mode 100644 index 1b0399b5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TestMsgOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/messages.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TestMsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TestMsg) - com.google.protobuf.MessageOrBuilder { - - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The const. - */ - java.lang.String getConst(); - /** - * string const = 1 [json_name = "const", (.buf.validate.field) = { ... } - * @return The bytes for const. - */ - com.google.protobuf.ByteString - getConstBytes(); - - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - * @return Whether the nested field is set. - */ - boolean hasNested(); - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - * @return The nested. - */ - build.buf.validate.conformance.cases.TestMsg getNested(); - /** - * .buf.validate.conformance.cases.TestMsg nested = 2 [json_name = "nested"]; - */ - build.buf.validate.conformance.cases.TestMsgOrBuilder getNestedOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsg.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsg.java deleted file mode 100644 index 74ce1dd4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsg.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TestOneofMsg} - */ -public final class TestOneofMsg extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TestOneofMsg) - TestOneofMsgOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestOneofMsg.class.getName()); - } - // Use TestOneofMsg.newBuilder() to construct. - private TestOneofMsg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TestOneofMsg() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_TestOneofMsg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_TestOneofMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TestOneofMsg.class, build.buf.validate.conformance.cases.TestOneofMsg.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private boolean val_ = false; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return 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 (val_ != false) { - output.writeBool(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, val_); - } - 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.TestOneofMsg)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TestOneofMsg other = (build.buf.validate.conformance.cases.TestOneofMsg) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.TestOneofMsg parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TestOneofMsg 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.TestOneofMsg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TestOneofMsg 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.TestOneofMsg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TestOneofMsg 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.TestOneofMsg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TestOneofMsg 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.TestOneofMsg parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TestOneofMsg 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.TestOneofMsg 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.TestOneofMsg 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.TestOneofMsg 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.TestOneofMsg} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TestOneofMsg) - build.buf.validate.conformance.cases.TestOneofMsgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_TestOneofMsg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_TestOneofMsg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TestOneofMsg.class, build.buf.validate.conformance.cases.TestOneofMsg.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TestOneofMsg.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.OneofsProto.internal_static_buf_validate_conformance_cases_TestOneofMsg_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsg getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsg build() { - build.buf.validate.conformance.cases.TestOneofMsg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TestOneofMsg buildPartial() { - build.buf.validate.conformance.cases.TestOneofMsg result = new build.buf.validate.conformance.cases.TestOneofMsg(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TestOneofMsg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.TestOneofMsg) { - return mergeFrom((build.buf.validate.conformance.cases.TestOneofMsg)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TestOneofMsg other) { - if (other == build.buf.validate.conformance.cases.TestOneofMsg.getDefaultInstance()) return this; - if (other.getVal() != false) { - setVal(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 8: { - val_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean val_ ; - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public boolean getVal() { - return val_; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(boolean value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TestOneofMsg) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TestOneofMsg) - private static final build.buf.validate.conformance.cases.TestOneofMsg DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TestOneofMsg(); - } - - public static build.buf.validate.conformance.cases.TestOneofMsg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestOneofMsg 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.TestOneofMsg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsgOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsgOrBuilder.java deleted file mode 100644 index b8ab65f3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TestOneofMsgOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/oneofs.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TestOneofMsgOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TestOneofMsg) - com.google.protobuf.MessageOrBuilder { - - /** - * bool val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - boolean getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConst.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConst.java deleted file mode 100644 index 2d5e0434..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConst.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampConst} - */ -public final class TimestampConst extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampConst) - TimestampConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampConst.class.getName()); - } - // Use TimestampConst.newBuilder() to construct. - private TimestampConst(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampConst() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampConst.class, build.buf.validate.conformance.cases.TimestampConst.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampConst)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampConst other = (build.buf.validate.conformance.cases.TimestampConst) 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.TimestampConst parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampConst 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.TimestampConst parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampConst 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.TimestampConst parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampConst 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.TimestampConst parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampConst 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.TimestampConst parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampConst 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.TimestampConst 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.TimestampConst 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.TimestampConst 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.TimestampConst} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampConst) - build.buf.validate.conformance.cases.TimestampConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampConst_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampConst_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampConst.class, build.buf.validate.conformance.cases.TimestampConst.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampConst.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampConst_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampConst getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampConst.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampConst build() { - build.buf.validate.conformance.cases.TimestampConst result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampConst buildPartial() { - build.buf.validate.conformance.cases.TimestampConst result = new build.buf.validate.conformance.cases.TimestampConst(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampConst 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.TimestampConst) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampConst)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampConst other) { - if (other == build.buf.validate.conformance.cases.TimestampConst.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampConst) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampConst) - private static final build.buf.validate.conformance.cases.TimestampConst DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampConst(); - } - - public static build.buf.validate.conformance.cases.TimestampConst getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampConst 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.TimestampConst getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConstOrBuilder.java deleted file mode 100644 index ab570da1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampConstOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampConst) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTE.java deleted file mode 100644 index 99417ddf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampExGTELTE} - */ -public final class TimestampExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampExGTELTE) - TimestampExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampExGTELTE.class.getName()); - } - // Use TimestampExGTELTE.newBuilder() to construct. - private TimestampExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampExGTELTE.class, build.buf.validate.conformance.cases.TimestampExGTELTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampExGTELTE other = (build.buf.validate.conformance.cases.TimestampExGTELTE) 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.TimestampExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExGTELTE 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.TimestampExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExGTELTE 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.TimestampExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExGTELTE 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.TimestampExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampExGTELTE 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.TimestampExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampExGTELTE 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.TimestampExGTELTE 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.TimestampExGTELTE 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.TimestampExGTELTE 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.TimestampExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampExGTELTE) - build.buf.validate.conformance.cases.TimestampExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampExGTELTE.class, build.buf.validate.conformance.cases.TimestampExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampExGTELTE.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExGTELTE build() { - build.buf.validate.conformance.cases.TimestampExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExGTELTE buildPartial() { - build.buf.validate.conformance.cases.TimestampExGTELTE result = new build.buf.validate.conformance.cases.TimestampExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampExGTELTE 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.TimestampExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampExGTELTE other) { - if (other == build.buf.validate.conformance.cases.TimestampExGTELTE.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampExGTELTE) - private static final build.buf.validate.conformance.cases.TimestampExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampExGTELTE(); - } - - public static build.buf.validate.conformance.cases.TimestampExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampExGTELTE 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.TimestampExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTEOrBuilder.java deleted file mode 100644 index 0d0d1b9f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExGTELTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGT.java deleted file mode 100644 index 6f1dc145..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampExLTGT} - */ -public final class TimestampExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampExLTGT) - TimestampExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampExLTGT.class.getName()); - } - // Use TimestampExLTGT.newBuilder() to construct. - private TimestampExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampExLTGT.class, build.buf.validate.conformance.cases.TimestampExLTGT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampExLTGT other = (build.buf.validate.conformance.cases.TimestampExLTGT) 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.TimestampExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExLTGT 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.TimestampExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExLTGT 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.TimestampExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExLTGT 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.TimestampExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampExLTGT 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.TimestampExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampExLTGT 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.TimestampExLTGT 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.TimestampExLTGT 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.TimestampExLTGT 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.TimestampExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampExLTGT) - build.buf.validate.conformance.cases.TimestampExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampExLTGT.class, build.buf.validate.conformance.cases.TimestampExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampExLTGT.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExLTGT build() { - build.buf.validate.conformance.cases.TimestampExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExLTGT buildPartial() { - build.buf.validate.conformance.cases.TimestampExLTGT result = new build.buf.validate.conformance.cases.TimestampExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampExLTGT 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.TimestampExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampExLTGT other) { - if (other == build.buf.validate.conformance.cases.TimestampExLTGT.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampExLTGT) - private static final build.buf.validate.conformance.cases.TimestampExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampExLTGT(); - } - - public static build.buf.validate.conformance.cases.TimestampExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampExLTGT 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.TimestampExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGTOrBuilder.java deleted file mode 100644 index 191a9a25..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExLTGTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExample.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExample.java deleted file mode 100644 index 48f735a3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExample.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampExample} - */ -public final class TimestampExample extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampExample) - TimestampExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampExample.class.getName()); - } - // Use TimestampExample.newBuilder() to construct. - private TimestampExample(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampExample() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampExample.class, build.buf.validate.conformance.cases.TimestampExample.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampExample)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampExample other = (build.buf.validate.conformance.cases.TimestampExample) 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.TimestampExample parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExample 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.TimestampExample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExample 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.TimestampExample parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampExample 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.TimestampExample parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampExample 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.TimestampExample parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampExample 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.TimestampExample 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.TimestampExample 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.TimestampExample 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.TimestampExample} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampExample) - build.buf.validate.conformance.cases.TimestampExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExample_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampExample.class, build.buf.validate.conformance.cases.TimestampExample.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampExample.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampExample_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExample getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampExample.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExample build() { - build.buf.validate.conformance.cases.TimestampExample result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampExample buildPartial() { - build.buf.validate.conformance.cases.TimestampExample result = new build.buf.validate.conformance.cases.TimestampExample(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampExample 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.TimestampExample) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampExample)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampExample other) { - if (other == build.buf.validate.conformance.cases.TimestampExample.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampExample) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampExample) - private static final build.buf.validate.conformance.cases.TimestampExample DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampExample(); - } - - public static build.buf.validate.conformance.cases.TimestampExample getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampExample 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.TimestampExample getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExampleOrBuilder.java deleted file mode 100644 index 230cf384..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampExampleOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampExample) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGT.java deleted file mode 100644 index 6687cc73..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampGT} - */ -public final class TimestampGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampGT) - TimestampGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampGT.class.getName()); - } - // Use TimestampGT.newBuilder() to construct. - private TimestampGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGT.class, build.buf.validate.conformance.cases.TimestampGT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampGT other = (build.buf.validate.conformance.cases.TimestampGT) 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.TimestampGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGT 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.TimestampGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGT 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.TimestampGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGT 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.TimestampGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampGT 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.TimestampGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampGT 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.TimestampGT 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.TimestampGT 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.TimestampGT 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.TimestampGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampGT) - build.buf.validate.conformance.cases.TimestampGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGT.class, build.buf.validate.conformance.cases.TimestampGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampGT.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGT build() { - build.buf.validate.conformance.cases.TimestampGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGT buildPartial() { - build.buf.validate.conformance.cases.TimestampGT result = new build.buf.validate.conformance.cases.TimestampGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampGT 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.TimestampGT) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampGT other) { - if (other == build.buf.validate.conformance.cases.TimestampGT.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampGT) - private static final build.buf.validate.conformance.cases.TimestampGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampGT(); - } - - public static build.buf.validate.conformance.cases.TimestampGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampGT 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.TimestampGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTE.java deleted file mode 100644 index 94c9ffae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampGTE} - */ -public final class TimestampGTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampGTE) - TimestampGTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampGTE.class.getName()); - } - // Use TimestampGTE.newBuilder() to construct. - private TimestampGTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampGTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTE.class, build.buf.validate.conformance.cases.TimestampGTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampGTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampGTE other = (build.buf.validate.conformance.cases.TimestampGTE) 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.TimestampGTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTE 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.TimestampGTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTE 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.TimestampGTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTE 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.TimestampGTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampGTE 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.TimestampGTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampGTE 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.TimestampGTE 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.TimestampGTE 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.TimestampGTE 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.TimestampGTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampGTE) - build.buf.validate.conformance.cases.TimestampGTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTE.class, build.buf.validate.conformance.cases.TimestampGTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampGTE.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampGTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTE build() { - build.buf.validate.conformance.cases.TimestampGTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTE buildPartial() { - build.buf.validate.conformance.cases.TimestampGTE result = new build.buf.validate.conformance.cases.TimestampGTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampGTE 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.TimestampGTE) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampGTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampGTE other) { - if (other == build.buf.validate.conformance.cases.TimestampGTE.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampGTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampGTE) - private static final build.buf.validate.conformance.cases.TimestampGTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampGTE(); - } - - public static build.buf.validate.conformance.cases.TimestampGTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampGTE 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.TimestampGTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTE.java deleted file mode 100644 index 7e1f06c0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampGTELTE} - */ -public final class TimestampGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampGTELTE) - TimestampGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampGTELTE.class.getName()); - } - // Use TimestampGTELTE.newBuilder() to construct. - private TimestampGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTELTE.class, build.buf.validate.conformance.cases.TimestampGTELTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampGTELTE other = (build.buf.validate.conformance.cases.TimestampGTELTE) 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.TimestampGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTELTE 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.TimestampGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTELTE 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.TimestampGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTELTE 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.TimestampGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampGTELTE 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.TimestampGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampGTELTE 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.TimestampGTELTE 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.TimestampGTELTE 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.TimestampGTELTE 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.TimestampGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampGTELTE) - build.buf.validate.conformance.cases.TimestampGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTELTE.class, build.buf.validate.conformance.cases.TimestampGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampGTELTE.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTELTE build() { - build.buf.validate.conformance.cases.TimestampGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTELTE buildPartial() { - build.buf.validate.conformance.cases.TimestampGTELTE result = new build.buf.validate.conformance.cases.TimestampGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampGTELTE 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.TimestampGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampGTELTE other) { - if (other == build.buf.validate.conformance.cases.TimestampGTELTE.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampGTELTE) - private static final build.buf.validate.conformance.cases.TimestampGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampGTELTE(); - } - - public static build.buf.validate.conformance.cases.TimestampGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampGTELTE 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.TimestampGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTEOrBuilder.java deleted file mode 100644 index 8a89a80e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTELTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTEOrBuilder.java deleted file mode 100644 index ccf29bcb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampGTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampGTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLT.java deleted file mode 100644 index 5035a5ed..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampGTLT} - */ -public final class TimestampGTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampGTLT) - TimestampGTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampGTLT.class.getName()); - } - // Use TimestampGTLT.newBuilder() to construct. - private TimestampGTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampGTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTLT.class, build.buf.validate.conformance.cases.TimestampGTLT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampGTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampGTLT other = (build.buf.validate.conformance.cases.TimestampGTLT) 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.TimestampGTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTLT 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.TimestampGTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTLT 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.TimestampGTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTLT 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.TimestampGTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampGTLT 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.TimestampGTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampGTLT 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.TimestampGTLT 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.TimestampGTLT 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.TimestampGTLT 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.TimestampGTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampGTLT) - build.buf.validate.conformance.cases.TimestampGTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTLT.class, build.buf.validate.conformance.cases.TimestampGTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampGTLT.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampGTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTLT build() { - build.buf.validate.conformance.cases.TimestampGTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTLT buildPartial() { - build.buf.validate.conformance.cases.TimestampGTLT result = new build.buf.validate.conformance.cases.TimestampGTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampGTLT 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.TimestampGTLT) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampGTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampGTLT other) { - if (other == build.buf.validate.conformance.cases.TimestampGTLT.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampGTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampGTLT) - private static final build.buf.validate.conformance.cases.TimestampGTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampGTLT(); - } - - public static build.buf.validate.conformance.cases.TimestampGTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampGTLT 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.TimestampGTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLTOrBuilder.java deleted file mode 100644 index 02fdadd7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTLTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampGTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampGTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNow.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNow.java deleted file mode 100644 index 12ea9cd5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNow.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampGTNow} - */ -public final class TimestampGTNow extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampGTNow) - TimestampGTNowOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampGTNow.class.getName()); - } - // Use TimestampGTNow.newBuilder() to construct. - private TimestampGTNow(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampGTNow() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTNow.class, build.buf.validate.conformance.cases.TimestampGTNow.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampGTNow)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampGTNow other = (build.buf.validate.conformance.cases.TimestampGTNow) 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.TimestampGTNow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTNow 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.TimestampGTNow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTNow 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.TimestampGTNow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTNow 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.TimestampGTNow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampGTNow 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.TimestampGTNow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampGTNow 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.TimestampGTNow 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.TimestampGTNow 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.TimestampGTNow 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.TimestampGTNow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampGTNow) - build.buf.validate.conformance.cases.TimestampGTNowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTNow.class, build.buf.validate.conformance.cases.TimestampGTNow.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampGTNow.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNow_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTNow getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampGTNow.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTNow build() { - build.buf.validate.conformance.cases.TimestampGTNow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTNow buildPartial() { - build.buf.validate.conformance.cases.TimestampGTNow result = new build.buf.validate.conformance.cases.TimestampGTNow(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampGTNow 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.TimestampGTNow) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampGTNow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampGTNow other) { - if (other == build.buf.validate.conformance.cases.TimestampGTNow.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampGTNow) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampGTNow) - private static final build.buf.validate.conformance.cases.TimestampGTNow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampGTNow(); - } - - public static build.buf.validate.conformance.cases.TimestampGTNow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampGTNow 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.TimestampGTNow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowOrBuilder.java deleted file mode 100644 index c7072e60..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampGTNowOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampGTNow) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithin.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithin.java deleted file mode 100644 index 4fe7b5ce..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithin.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampGTNowWithin} - */ -public final class TimestampGTNowWithin extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampGTNowWithin) - TimestampGTNowWithinOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampGTNowWithin.class.getName()); - } - // Use TimestampGTNowWithin.newBuilder() to construct. - private TimestampGTNowWithin(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampGTNowWithin() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTNowWithin.class, build.buf.validate.conformance.cases.TimestampGTNowWithin.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampGTNowWithin)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampGTNowWithin other = (build.buf.validate.conformance.cases.TimestampGTNowWithin) 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.TimestampGTNowWithin parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTNowWithin 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.TimestampGTNowWithin parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTNowWithin 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.TimestampGTNowWithin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampGTNowWithin 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.TimestampGTNowWithin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampGTNowWithin 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.TimestampGTNowWithin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampGTNowWithin 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.TimestampGTNowWithin 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.TimestampGTNowWithin 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.TimestampGTNowWithin 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.TimestampGTNowWithin} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampGTNowWithin) - build.buf.validate.conformance.cases.TimestampGTNowWithinOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampGTNowWithin.class, build.buf.validate.conformance.cases.TimestampGTNowWithin.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampGTNowWithin.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTNowWithin getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampGTNowWithin.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTNowWithin build() { - build.buf.validate.conformance.cases.TimestampGTNowWithin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampGTNowWithin buildPartial() { - build.buf.validate.conformance.cases.TimestampGTNowWithin result = new build.buf.validate.conformance.cases.TimestampGTNowWithin(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampGTNowWithin 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.TimestampGTNowWithin) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampGTNowWithin)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampGTNowWithin other) { - if (other == build.buf.validate.conformance.cases.TimestampGTNowWithin.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampGTNowWithin) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampGTNowWithin) - private static final build.buf.validate.conformance.cases.TimestampGTNowWithin DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampGTNowWithin(); - } - - public static build.buf.validate.conformance.cases.TimestampGTNowWithin getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampGTNowWithin 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.TimestampGTNowWithin getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithinOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithinOrBuilder.java deleted file mode 100644 index 04348cd8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTNowWithinOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampGTNowWithinOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampGTNowWithin) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTOrBuilder.java deleted file mode 100644 index 0e48b5dd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampGTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampGT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLT.java deleted file mode 100644 index 90de1ea6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLT.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampLT} - */ -public final class TimestampLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampLT) - TimestampLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampLT.class.getName()); - } - // Use TimestampLT.newBuilder() to construct. - private TimestampLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLT.class, build.buf.validate.conformance.cases.TimestampLT.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampLT other = (build.buf.validate.conformance.cases.TimestampLT) 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.TimestampLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLT 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.TimestampLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLT 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.TimestampLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLT 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.TimestampLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampLT 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.TimestampLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampLT 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.TimestampLT 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.TimestampLT 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.TimestampLT 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.TimestampLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampLT) - build.buf.validate.conformance.cases.TimestampLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLT.class, build.buf.validate.conformance.cases.TimestampLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampLT.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLT build() { - build.buf.validate.conformance.cases.TimestampLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLT buildPartial() { - build.buf.validate.conformance.cases.TimestampLT result = new build.buf.validate.conformance.cases.TimestampLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampLT 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.TimestampLT) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampLT other) { - if (other == build.buf.validate.conformance.cases.TimestampLT.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampLT) - private static final build.buf.validate.conformance.cases.TimestampLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampLT(); - } - - public static build.buf.validate.conformance.cases.TimestampLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampLT 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.TimestampLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTE.java deleted file mode 100644 index 7d649880..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTE.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampLTE} - */ -public final class TimestampLTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampLTE) - TimestampLTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampLTE.class.getName()); - } - // Use TimestampLTE.newBuilder() to construct. - private TimestampLTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampLTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLTE.class, build.buf.validate.conformance.cases.TimestampLTE.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampLTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampLTE other = (build.buf.validate.conformance.cases.TimestampLTE) 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.TimestampLTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTE 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.TimestampLTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTE 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.TimestampLTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTE 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.TimestampLTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampLTE 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.TimestampLTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampLTE 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.TimestampLTE 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.TimestampLTE 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.TimestampLTE 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.TimestampLTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampLTE) - build.buf.validate.conformance.cases.TimestampLTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLTE.class, build.buf.validate.conformance.cases.TimestampLTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampLTE.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampLTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTE build() { - build.buf.validate.conformance.cases.TimestampLTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTE buildPartial() { - build.buf.validate.conformance.cases.TimestampLTE result = new build.buf.validate.conformance.cases.TimestampLTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampLTE 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.TimestampLTE) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampLTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampLTE other) { - if (other == build.buf.validate.conformance.cases.TimestampLTE.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampLTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampLTE) - private static final build.buf.validate.conformance.cases.TimestampLTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampLTE(); - } - - public static build.buf.validate.conformance.cases.TimestampLTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampLTE 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.TimestampLTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTEOrBuilder.java deleted file mode 100644 index 33d3d458..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTEOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampLTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampLTE) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNow.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNow.java deleted file mode 100644 index ea50d801..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNow.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampLTNow} - */ -public final class TimestampLTNow extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampLTNow) - TimestampLTNowOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampLTNow.class.getName()); - } - // Use TimestampLTNow.newBuilder() to construct. - private TimestampLTNow(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampLTNow() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLTNow.class, build.buf.validate.conformance.cases.TimestampLTNow.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampLTNow)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampLTNow other = (build.buf.validate.conformance.cases.TimestampLTNow) 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.TimestampLTNow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTNow 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.TimestampLTNow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTNow 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.TimestampLTNow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTNow 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.TimestampLTNow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampLTNow 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.TimestampLTNow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampLTNow 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.TimestampLTNow 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.TimestampLTNow 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.TimestampLTNow 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.TimestampLTNow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampLTNow) - build.buf.validate.conformance.cases.TimestampLTNowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLTNow.class, build.buf.validate.conformance.cases.TimestampLTNow.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampLTNow.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNow_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTNow getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampLTNow.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTNow build() { - build.buf.validate.conformance.cases.TimestampLTNow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTNow buildPartial() { - build.buf.validate.conformance.cases.TimestampLTNow result = new build.buf.validate.conformance.cases.TimestampLTNow(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampLTNow 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.TimestampLTNow) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampLTNow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampLTNow other) { - if (other == build.buf.validate.conformance.cases.TimestampLTNow.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampLTNow) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampLTNow) - private static final build.buf.validate.conformance.cases.TimestampLTNow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampLTNow(); - } - - public static build.buf.validate.conformance.cases.TimestampLTNow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampLTNow 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.TimestampLTNow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowOrBuilder.java deleted file mode 100644 index 8814fa8c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampLTNowOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampLTNow) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithin.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithin.java deleted file mode 100644 index 96f13ef9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithin.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampLTNowWithin} - */ -public final class TimestampLTNowWithin extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampLTNowWithin) - TimestampLTNowWithinOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampLTNowWithin.class.getName()); - } - // Use TimestampLTNowWithin.newBuilder() to construct. - private TimestampLTNowWithin(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampLTNowWithin() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLTNowWithin.class, build.buf.validate.conformance.cases.TimestampLTNowWithin.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampLTNowWithin)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampLTNowWithin other = (build.buf.validate.conformance.cases.TimestampLTNowWithin) 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.TimestampLTNowWithin parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTNowWithin 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.TimestampLTNowWithin parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTNowWithin 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.TimestampLTNowWithin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampLTNowWithin 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.TimestampLTNowWithin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampLTNowWithin 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.TimestampLTNowWithin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampLTNowWithin 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.TimestampLTNowWithin 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.TimestampLTNowWithin 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.TimestampLTNowWithin 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.TimestampLTNowWithin} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampLTNowWithin) - build.buf.validate.conformance.cases.TimestampLTNowWithinOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampLTNowWithin.class, build.buf.validate.conformance.cases.TimestampLTNowWithin.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampLTNowWithin.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTNowWithin getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampLTNowWithin.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTNowWithin build() { - build.buf.validate.conformance.cases.TimestampLTNowWithin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampLTNowWithin buildPartial() { - build.buf.validate.conformance.cases.TimestampLTNowWithin result = new build.buf.validate.conformance.cases.TimestampLTNowWithin(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampLTNowWithin 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.TimestampLTNowWithin) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampLTNowWithin)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampLTNowWithin other) { - if (other == build.buf.validate.conformance.cases.TimestampLTNowWithin.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampLTNowWithin) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampLTNowWithin) - private static final build.buf.validate.conformance.cases.TimestampLTNowWithin DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampLTNowWithin(); - } - - public static build.buf.validate.conformance.cases.TimestampLTNowWithin getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampLTNowWithin 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.TimestampLTNowWithin getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithinOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithinOrBuilder.java deleted file mode 100644 index 65d225e2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTNowWithinOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampLTNowWithinOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampLTNowWithin) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTOrBuilder.java deleted file mode 100644 index ed6ada49..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampLTOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampLT) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNone.java deleted file mode 100644 index f8d74009..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNone.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampNone} - */ -public final class TimestampNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampNone) - TimestampNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampNone.class.getName()); - } - // Use TimestampNone.newBuilder() to construct. - private TimestampNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampNone.class, build.buf.validate.conformance.cases.TimestampNone.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - @java.lang.Override - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampNone other = (build.buf.validate.conformance.cases.TimestampNone) 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.TimestampNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNone 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.TimestampNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNone 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.TimestampNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNone 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.TimestampNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampNone 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.TimestampNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampNone 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.TimestampNone 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.TimestampNone 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.TimestampNone 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.TimestampNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampNone) - build.buf.validate.conformance.cases.TimestampNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampNone.class, build.buf.validate.conformance.cases.TimestampNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampNone.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNone build() { - build.buf.validate.conformance.cases.TimestampNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNone buildPartial() { - build.buf.validate.conformance.cases.TimestampNone result = new build.buf.validate.conformance.cases.TimestampNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampNone 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.TimestampNone) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampNone other) { - if (other == build.buf.validate.conformance.cases.TimestampNone.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = null; - if (valBuilder_ != null) { - valBuilder_.dispose(); - valBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampNone) - private static final build.buf.validate.conformance.cases.TimestampNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampNone(); - } - - public static build.buf.validate.conformance.cases.TimestampNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampNone 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.TimestampNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNoneOrBuilder.java deleted file mode 100644 index 2453992b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNoneOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampNone) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val"]; - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNow.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNow.java deleted file mode 100644 index 1c453e97..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNow.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampNotGTNow} - */ -public final class TimestampNotGTNow extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampNotGTNow) - TimestampNotGTNowOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampNotGTNow.class.getName()); - } - // Use TimestampNotGTNow.newBuilder() to construct. - private TimestampNotGTNow(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampNotGTNow() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotGTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotGTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampNotGTNow.class, build.buf.validate.conformance.cases.TimestampNotGTNow.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampNotGTNow)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampNotGTNow other = (build.buf.validate.conformance.cases.TimestampNotGTNow) 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.TimestampNotGTNow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNotGTNow 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.TimestampNotGTNow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNotGTNow 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.TimestampNotGTNow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNotGTNow 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.TimestampNotGTNow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampNotGTNow 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.TimestampNotGTNow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampNotGTNow 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.TimestampNotGTNow 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.TimestampNotGTNow 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.TimestampNotGTNow 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.TimestampNotGTNow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampNotGTNow) - build.buf.validate.conformance.cases.TimestampNotGTNowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotGTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotGTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampNotGTNow.class, build.buf.validate.conformance.cases.TimestampNotGTNow.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampNotGTNow.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotGTNow_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNotGTNow getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampNotGTNow.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNotGTNow build() { - build.buf.validate.conformance.cases.TimestampNotGTNow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNotGTNow buildPartial() { - build.buf.validate.conformance.cases.TimestampNotGTNow result = new build.buf.validate.conformance.cases.TimestampNotGTNow(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampNotGTNow 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.TimestampNotGTNow) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampNotGTNow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampNotGTNow other) { - if (other == build.buf.validate.conformance.cases.TimestampNotGTNow.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampNotGTNow) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampNotGTNow) - private static final build.buf.validate.conformance.cases.TimestampNotGTNow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampNotGTNow(); - } - - public static build.buf.validate.conformance.cases.TimestampNotGTNow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampNotGTNow 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.TimestampNotGTNow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNowOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNowOrBuilder.java deleted file mode 100644 index 1b5eed20..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotGTNowOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampNotGTNowOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampNotGTNow) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNow.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNow.java deleted file mode 100644 index 8cea01a7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNow.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampNotLTNow} - */ -public final class TimestampNotLTNow extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampNotLTNow) - TimestampNotLTNowOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampNotLTNow.class.getName()); - } - // Use TimestampNotLTNow.newBuilder() to construct. - private TimestampNotLTNow(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampNotLTNow() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotLTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotLTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampNotLTNow.class, build.buf.validate.conformance.cases.TimestampNotLTNow.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampNotLTNow)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampNotLTNow other = (build.buf.validate.conformance.cases.TimestampNotLTNow) 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.TimestampNotLTNow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNotLTNow 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.TimestampNotLTNow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNotLTNow 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.TimestampNotLTNow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampNotLTNow 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.TimestampNotLTNow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampNotLTNow 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.TimestampNotLTNow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampNotLTNow 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.TimestampNotLTNow 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.TimestampNotLTNow 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.TimestampNotLTNow 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.TimestampNotLTNow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampNotLTNow) - build.buf.validate.conformance.cases.TimestampNotLTNowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotLTNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotLTNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampNotLTNow.class, build.buf.validate.conformance.cases.TimestampNotLTNow.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampNotLTNow.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampNotLTNow_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNotLTNow getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampNotLTNow.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNotLTNow build() { - build.buf.validate.conformance.cases.TimestampNotLTNow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampNotLTNow buildPartial() { - build.buf.validate.conformance.cases.TimestampNotLTNow result = new build.buf.validate.conformance.cases.TimestampNotLTNow(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampNotLTNow 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.TimestampNotLTNow) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampNotLTNow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampNotLTNow other) { - if (other == build.buf.validate.conformance.cases.TimestampNotLTNow.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampNotLTNow) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampNotLTNow) - private static final build.buf.validate.conformance.cases.TimestampNotLTNow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampNotLTNow(); - } - - public static build.buf.validate.conformance.cases.TimestampNotLTNow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampNotLTNow 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.TimestampNotLTNow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNowOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNowOrBuilder.java deleted file mode 100644 index 63a6cabe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampNotLTNowOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampNotLTNowOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampNotLTNow) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequired.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequired.java deleted file mode 100644 index d9af50ae..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequired.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampRequired} - */ -public final class TimestampRequired extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampRequired) - TimestampRequiredOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampRequired.class.getName()); - } - // Use TimestampRequired.newBuilder() to construct. - private TimestampRequired(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampRequired() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampRequired.class, build.buf.validate.conformance.cases.TimestampRequired.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampRequired)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampRequired other = (build.buf.validate.conformance.cases.TimestampRequired) 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.TimestampRequired parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampRequired 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.TimestampRequired parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampRequired 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.TimestampRequired parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampRequired 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.TimestampRequired parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampRequired 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.TimestampRequired parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampRequired 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.TimestampRequired 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.TimestampRequired 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.TimestampRequired 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.TimestampRequired} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampRequired) - build.buf.validate.conformance.cases.TimestampRequiredOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampRequired_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampRequired_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampRequired.class, build.buf.validate.conformance.cases.TimestampRequired.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampRequired.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampRequired_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampRequired getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampRequired.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampRequired build() { - build.buf.validate.conformance.cases.TimestampRequired result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampRequired buildPartial() { - build.buf.validate.conformance.cases.TimestampRequired result = new build.buf.validate.conformance.cases.TimestampRequired(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampRequired 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.TimestampRequired) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampRequired)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampRequired other) { - if (other == build.buf.validate.conformance.cases.TimestampRequired.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampRequired) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampRequired) - private static final build.buf.validate.conformance.cases.TimestampRequired DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampRequired(); - } - - public static build.buf.validate.conformance.cases.TimestampRequired getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampRequired 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.TimestampRequired getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequiredOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequiredOrBuilder.java deleted file mode 100644 index 24c6e263..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampRequiredOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampRequiredOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampRequired) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithin.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithin.java deleted file mode 100644 index 19f709c4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithin.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.TimestampWithin} - */ -public final class TimestampWithin extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.TimestampWithin) - TimestampWithinOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampWithin.class.getName()); - } - // Use TimestampWithin.newBuilder() to construct. - private TimestampWithin(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimestampWithin() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampWithin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampWithin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampWithin.class, build.buf.validate.conformance.cases.TimestampWithin.Builder.class); - } - - private int bitField0_; - public static final int VAL_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp val_; - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getVal() { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - return val_ == null ? com.google.protobuf.Timestamp.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.TimestampWithin)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.TimestampWithin other = (build.buf.validate.conformance.cases.TimestampWithin) 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.TimestampWithin parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampWithin 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.TimestampWithin parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampWithin 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.TimestampWithin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.TimestampWithin 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.TimestampWithin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.TimestampWithin 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.TimestampWithin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.TimestampWithin 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.TimestampWithin 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.TimestampWithin 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.TimestampWithin 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.TimestampWithin} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.TimestampWithin) - build.buf.validate.conformance.cases.TimestampWithinOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampWithin_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampWithin_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.TimestampWithin.class, build.buf.validate.conformance.cases.TimestampWithin.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.TimestampWithin.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.WktTimestampProto.internal_static_buf_validate_conformance_cases_TimestampWithin_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampWithin getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.TimestampWithin.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampWithin build() { - build.buf.validate.conformance.cases.TimestampWithin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.TimestampWithin buildPartial() { - build.buf.validate.conformance.cases.TimestampWithin result = new build.buf.validate.conformance.cases.TimestampWithin(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.TimestampWithin 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.TimestampWithin) { - return mergeFrom((build.buf.validate.conformance.cases.TimestampWithin)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.TimestampWithin other) { - if (other == build.buf.validate.conformance.cases.TimestampWithin.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.Timestamp val_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valBuilder_; - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - public com.google.protobuf.Timestamp getVal() { - if (valBuilder_ == null) { - return val_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } else { - return valBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - val_ = value; - } else { - valBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder setVal( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (valBuilder_ == null) { - val_ = builderForValue.build(); - } else { - valBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public Builder mergeVal(com.google.protobuf.Timestamp value) { - if (valBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - val_ != null && - val_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getValBuilder().mergeFrom(value); - } else { - val_ = value; - } - } else { - valBuilder_.mergeFrom(value); - } - if (val_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.Timestamp 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.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getValOrBuilder() { - if (valBuilder_ != null) { - return valBuilder_.getMessageOrBuilder(); - } else { - return val_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : val_; - } - } - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getValFieldBuilder() { - if (valBuilder_ == null) { - valBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getVal(), - getParentForChildren(), - isClean()); - val_ = null; - } - return valBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.TimestampWithin) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.TimestampWithin) - private static final build.buf.validate.conformance.cases.TimestampWithin DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.TimestampWithin(); - } - - public static build.buf.validate.conformance.cases.TimestampWithin getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampWithin 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.TimestampWithin getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithinOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithinOrBuilder.java deleted file mode 100644 index 09499c2a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/TimestampWithinOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface TimestampWithinOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.TimestampWithin) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - com.google.protobuf.Timestamp getVal(); - /** - * .google.protobuf.Timestamp val = 1 [json_name = "val", (.buf.validate.field) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Const.java deleted file mode 100644 index 4f0659db..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Const.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32Const} - */ -public final class UInt32Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32Const) - UInt32ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32Const.class.getName()); - } - // Use UInt32Const.newBuilder() to construct. - private UInt32Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32Const.class, build.buf.validate.conformance.cases.UInt32Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32Const other = (build.buf.validate.conformance.cases.UInt32Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Const 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.UInt32Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Const 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.UInt32Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Const 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.UInt32Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32Const 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.UInt32Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32Const 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.UInt32Const 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.UInt32Const 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.UInt32Const 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.UInt32Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32Const) - build.buf.validate.conformance.cases.UInt32ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32Const.class, build.buf.validate.conformance.cases.UInt32Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Const build() { - build.buf.validate.conformance.cases.UInt32Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Const buildPartial() { - build.buf.validate.conformance.cases.UInt32Const result = new build.buf.validate.conformance.cases.UInt32Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32Const) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32Const other) { - if (other == build.buf.validate.conformance.cases.UInt32Const.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32Const) - private static final build.buf.validate.conformance.cases.UInt32Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32Const(); - } - - public static build.buf.validate.conformance.cases.UInt32Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32Const 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.UInt32Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ConstOrBuilder.java deleted file mode 100644 index 8013ab9b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32Const) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTE.java deleted file mode 100644 index 4e745473..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32ExGTELTE} - */ -public final class UInt32ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32ExGTELTE) - UInt32ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32ExGTELTE.class.getName()); - } - // Use UInt32ExGTELTE.newBuilder() to construct. - private UInt32ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32ExGTELTE.class, build.buf.validate.conformance.cases.UInt32ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32ExGTELTE other = (build.buf.validate.conformance.cases.UInt32ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32ExGTELTE 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.UInt32ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32ExGTELTE 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.UInt32ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32ExGTELTE 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.UInt32ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32ExGTELTE 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.UInt32ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32ExGTELTE 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.UInt32ExGTELTE 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.UInt32ExGTELTE 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.UInt32ExGTELTE 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.UInt32ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32ExGTELTE) - build.buf.validate.conformance.cases.UInt32ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32ExGTELTE.class, build.buf.validate.conformance.cases.UInt32ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32ExGTELTE build() { - build.buf.validate.conformance.cases.UInt32ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.UInt32ExGTELTE result = new build.buf.validate.conformance.cases.UInt32ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.UInt32ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32ExGTELTE) - private static final build.buf.validate.conformance.cases.UInt32ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.UInt32ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32ExGTELTE 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.UInt32ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTEOrBuilder.java deleted file mode 100644 index c439f03f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGT.java deleted file mode 100644 index a9ee8088..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32ExLTGT} - */ -public final class UInt32ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32ExLTGT) - UInt32ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32ExLTGT.class.getName()); - } - // Use UInt32ExLTGT.newBuilder() to construct. - private UInt32ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32ExLTGT.class, build.buf.validate.conformance.cases.UInt32ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32ExLTGT other = (build.buf.validate.conformance.cases.UInt32ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32ExLTGT 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.UInt32ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32ExLTGT 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.UInt32ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32ExLTGT 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.UInt32ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32ExLTGT 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.UInt32ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32ExLTGT 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.UInt32ExLTGT 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.UInt32ExLTGT 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.UInt32ExLTGT 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.UInt32ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32ExLTGT) - build.buf.validate.conformance.cases.UInt32ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32ExLTGT.class, build.buf.validate.conformance.cases.UInt32ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32ExLTGT build() { - build.buf.validate.conformance.cases.UInt32ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32ExLTGT buildPartial() { - build.buf.validate.conformance.cases.UInt32ExLTGT result = new build.buf.validate.conformance.cases.UInt32ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32ExLTGT other) { - if (other == build.buf.validate.conformance.cases.UInt32ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32ExLTGT) - private static final build.buf.validate.conformance.cases.UInt32ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32ExLTGT(); - } - - public static build.buf.validate.conformance.cases.UInt32ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32ExLTGT 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.UInt32ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGTOrBuilder.java deleted file mode 100644 index 584dd727..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Example.java deleted file mode 100644 index a5d07348..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Example.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32Example} - */ -public final class UInt32Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32Example) - UInt32ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32Example.class.getName()); - } - // Use UInt32Example.newBuilder() to construct. - private UInt32Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32Example.class, build.buf.validate.conformance.cases.UInt32Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32Example other = (build.buf.validate.conformance.cases.UInt32Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Example 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.UInt32Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Example 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.UInt32Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Example 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.UInt32Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32Example 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.UInt32Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32Example 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.UInt32Example 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.UInt32Example 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.UInt32Example 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.UInt32Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32Example) - build.buf.validate.conformance.cases.UInt32ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32Example.class, build.buf.validate.conformance.cases.UInt32Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Example build() { - build.buf.validate.conformance.cases.UInt32Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Example buildPartial() { - build.buf.validate.conformance.cases.UInt32Example result = new build.buf.validate.conformance.cases.UInt32Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32Example) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32Example other) { - if (other == build.buf.validate.conformance.cases.UInt32Example.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32Example) - private static final build.buf.validate.conformance.cases.UInt32Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32Example(); - } - - public static build.buf.validate.conformance.cases.UInt32Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32Example 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.UInt32Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExampleOrBuilder.java deleted file mode 100644 index 0690de9a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32Example) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GT.java deleted file mode 100644 index 71d58d01..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32GT} - */ -public final class UInt32GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32GT) - UInt32GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32GT.class.getName()); - } - // Use UInt32GT.newBuilder() to construct. - private UInt32GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GT.class, build.buf.validate.conformance.cases.UInt32GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32GT other = (build.buf.validate.conformance.cases.UInt32GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GT 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.UInt32GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GT 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.UInt32GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GT 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.UInt32GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32GT 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.UInt32GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32GT 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.UInt32GT 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.UInt32GT 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.UInt32GT 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.UInt32GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32GT) - build.buf.validate.conformance.cases.UInt32GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GT.class, build.buf.validate.conformance.cases.UInt32GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GT build() { - build.buf.validate.conformance.cases.UInt32GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GT buildPartial() { - build.buf.validate.conformance.cases.UInt32GT result = new build.buf.validate.conformance.cases.UInt32GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32GT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32GT other) { - if (other == build.buf.validate.conformance.cases.UInt32GT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32GT) - private static final build.buf.validate.conformance.cases.UInt32GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32GT(); - } - - public static build.buf.validate.conformance.cases.UInt32GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32GT 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.UInt32GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTE.java deleted file mode 100644 index a54740b0..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32GTE} - */ -public final class UInt32GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32GTE) - UInt32GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32GTE.class.getName()); - } - // Use UInt32GTE.newBuilder() to construct. - private UInt32GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GTE.class, build.buf.validate.conformance.cases.UInt32GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32GTE other = (build.buf.validate.conformance.cases.UInt32GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTE 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.UInt32GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTE 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.UInt32GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTE 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.UInt32GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32GTE 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.UInt32GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32GTE 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.UInt32GTE 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.UInt32GTE 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.UInt32GTE 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.UInt32GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32GTE) - build.buf.validate.conformance.cases.UInt32GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GTE.class, build.buf.validate.conformance.cases.UInt32GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTE build() { - build.buf.validate.conformance.cases.UInt32GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTE buildPartial() { - build.buf.validate.conformance.cases.UInt32GTE result = new build.buf.validate.conformance.cases.UInt32GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32GTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32GTE other) { - if (other == build.buf.validate.conformance.cases.UInt32GTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32GTE) - private static final build.buf.validate.conformance.cases.UInt32GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32GTE(); - } - - public static build.buf.validate.conformance.cases.UInt32GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32GTE 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.UInt32GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTE.java deleted file mode 100644 index 33950a0d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32GTELTE} - */ -public final class UInt32GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32GTELTE) - UInt32GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32GTELTE.class.getName()); - } - // Use UInt32GTELTE.newBuilder() to construct. - private UInt32GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GTELTE.class, build.buf.validate.conformance.cases.UInt32GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32GTELTE other = (build.buf.validate.conformance.cases.UInt32GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTELTE 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.UInt32GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTELTE 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.UInt32GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTELTE 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.UInt32GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32GTELTE 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.UInt32GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32GTELTE 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.UInt32GTELTE 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.UInt32GTELTE 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.UInt32GTELTE 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.UInt32GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32GTELTE) - build.buf.validate.conformance.cases.UInt32GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GTELTE.class, build.buf.validate.conformance.cases.UInt32GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTELTE build() { - build.buf.validate.conformance.cases.UInt32GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTELTE buildPartial() { - build.buf.validate.conformance.cases.UInt32GTELTE result = new build.buf.validate.conformance.cases.UInt32GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32GTELTE other) { - if (other == build.buf.validate.conformance.cases.UInt32GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32GTELTE) - private static final build.buf.validate.conformance.cases.UInt32GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32GTELTE(); - } - - public static build.buf.validate.conformance.cases.UInt32GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32GTELTE 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.UInt32GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTEOrBuilder.java deleted file mode 100644 index 3182911d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTEOrBuilder.java deleted file mode 100644 index bc5a761a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLT.java deleted file mode 100644 index 8a6c100f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32GTLT} - */ -public final class UInt32GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32GTLT) - UInt32GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32GTLT.class.getName()); - } - // Use UInt32GTLT.newBuilder() to construct. - private UInt32GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GTLT.class, build.buf.validate.conformance.cases.UInt32GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32GTLT other = (build.buf.validate.conformance.cases.UInt32GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTLT 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.UInt32GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTLT 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.UInt32GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32GTLT 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.UInt32GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32GTLT 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.UInt32GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32GTLT 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.UInt32GTLT 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.UInt32GTLT 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.UInt32GTLT 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.UInt32GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32GTLT) - build.buf.validate.conformance.cases.UInt32GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32GTLT.class, build.buf.validate.conformance.cases.UInt32GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTLT build() { - build.buf.validate.conformance.cases.UInt32GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32GTLT buildPartial() { - build.buf.validate.conformance.cases.UInt32GTLT result = new build.buf.validate.conformance.cases.UInt32GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32GTLT other) { - if (other == build.buf.validate.conformance.cases.UInt32GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32GTLT) - private static final build.buf.validate.conformance.cases.UInt32GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32GTLT(); - } - - public static build.buf.validate.conformance.cases.UInt32GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32GTLT 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.UInt32GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLTOrBuilder.java deleted file mode 100644 index 2c822cdc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTOrBuilder.java deleted file mode 100644 index 5f6b2541..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32GT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Ignore.java deleted file mode 100644 index 90d7556e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32Ignore.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32Ignore} - */ -public final class UInt32Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32Ignore) - UInt32IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32Ignore.class.getName()); - } - // Use UInt32Ignore.newBuilder() to construct. - private UInt32Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32Ignore.class, build.buf.validate.conformance.cases.UInt32Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32Ignore other = (build.buf.validate.conformance.cases.UInt32Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Ignore 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.UInt32Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Ignore 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.UInt32Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32Ignore 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.UInt32Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32Ignore 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.UInt32Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32Ignore 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.UInt32Ignore 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.UInt32Ignore 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.UInt32Ignore 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.UInt32Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32Ignore) - build.buf.validate.conformance.cases.UInt32IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32Ignore.class, build.buf.validate.conformance.cases.UInt32Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Ignore build() { - build.buf.validate.conformance.cases.UInt32Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32Ignore buildPartial() { - build.buf.validate.conformance.cases.UInt32Ignore result = new build.buf.validate.conformance.cases.UInt32Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32Ignore other) { - if (other == build.buf.validate.conformance.cases.UInt32Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32Ignore) - private static final build.buf.validate.conformance.cases.UInt32Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32Ignore(); - } - - public static build.buf.validate.conformance.cases.UInt32Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32Ignore 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.UInt32Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IgnoreOrBuilder.java deleted file mode 100644 index 3e7c1cd9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32In.java deleted file mode 100644 index ce6cd63a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32In.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32In} - */ -public final class UInt32In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32In) - UInt32InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32In.class.getName()); - } - // Use UInt32In.newBuilder() to construct. - private UInt32In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32In.class, build.buf.validate.conformance.cases.UInt32In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32In other = (build.buf.validate.conformance.cases.UInt32In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32In 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.UInt32In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32In 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.UInt32In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32In 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.UInt32In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32In 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.UInt32In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32In 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.UInt32In 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.UInt32In 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.UInt32In 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.UInt32In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32In) - build.buf.validate.conformance.cases.UInt32InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32In.class, build.buf.validate.conformance.cases.UInt32In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32In build() { - build.buf.validate.conformance.cases.UInt32In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32In buildPartial() { - build.buf.validate.conformance.cases.UInt32In result = new build.buf.validate.conformance.cases.UInt32In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32In) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32In other) { - if (other == build.buf.validate.conformance.cases.UInt32In.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32In) - private static final build.buf.validate.conformance.cases.UInt32In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32In(); - } - - public static build.buf.validate.conformance.cases.UInt32In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32In 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.UInt32In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32InOrBuilder.java deleted file mode 100644 index 2e658cd7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32In) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectType.java deleted file mode 100644 index cb0490b4..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectType.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32IncorrectType} - */ -public final class UInt32IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32IncorrectType) - UInt32IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32IncorrectType.class.getName()); - } - // Use UInt32IncorrectType.newBuilder() to construct. - private UInt32IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32IncorrectType.class, build.buf.validate.conformance.cases.UInt32IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32IncorrectType other = (build.buf.validate.conformance.cases.UInt32IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32IncorrectType 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.UInt32IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32IncorrectType 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.UInt32IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32IncorrectType 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.UInt32IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32IncorrectType 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.UInt32IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32IncorrectType 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.UInt32IncorrectType 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.UInt32IncorrectType 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.UInt32IncorrectType 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.UInt32IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32IncorrectType) - build.buf.validate.conformance.cases.UInt32IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32IncorrectType.class, build.buf.validate.conformance.cases.UInt32IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32IncorrectType build() { - build.buf.validate.conformance.cases.UInt32IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32IncorrectType buildPartial() { - build.buf.validate.conformance.cases.UInt32IncorrectType result = new build.buf.validate.conformance.cases.UInt32IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32IncorrectType other) { - if (other == build.buf.validate.conformance.cases.UInt32IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32IncorrectType) - private static final build.buf.validate.conformance.cases.UInt32IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32IncorrectType(); - } - - public static build.buf.validate.conformance.cases.UInt32IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32IncorrectType 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.UInt32IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectTypeOrBuilder.java deleted file mode 100644 index 9f4ab474..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LT.java deleted file mode 100644 index 74b0d01e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LT.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32LT} - */ -public final class UInt32LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32LT) - UInt32LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32LT.class.getName()); - } - // Use UInt32LT.newBuilder() to construct. - private UInt32LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32LT.class, build.buf.validate.conformance.cases.UInt32LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32LT other = (build.buf.validate.conformance.cases.UInt32LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32LT 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.UInt32LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32LT 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.UInt32LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32LT 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.UInt32LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32LT 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.UInt32LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32LT 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.UInt32LT 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.UInt32LT 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.UInt32LT 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.UInt32LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32LT) - build.buf.validate.conformance.cases.UInt32LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32LT.class, build.buf.validate.conformance.cases.UInt32LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32LT build() { - build.buf.validate.conformance.cases.UInt32LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32LT buildPartial() { - build.buf.validate.conformance.cases.UInt32LT result = new build.buf.validate.conformance.cases.UInt32LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32LT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32LT other) { - if (other == build.buf.validate.conformance.cases.UInt32LT.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32LT) - private static final build.buf.validate.conformance.cases.UInt32LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32LT(); - } - - public static build.buf.validate.conformance.cases.UInt32LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32LT 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.UInt32LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTE.java deleted file mode 100644 index 544c5cc6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTE.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32LTE} - */ -public final class UInt32LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32LTE) - UInt32LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32LTE.class.getName()); - } - // Use UInt32LTE.newBuilder() to construct. - private UInt32LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32LTE.class, build.buf.validate.conformance.cases.UInt32LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32LTE other = (build.buf.validate.conformance.cases.UInt32LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32LTE 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.UInt32LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32LTE 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.UInt32LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32LTE 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.UInt32LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32LTE 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.UInt32LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32LTE 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.UInt32LTE 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.UInt32LTE 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.UInt32LTE 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.UInt32LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32LTE) - build.buf.validate.conformance.cases.UInt32LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32LTE.class, build.buf.validate.conformance.cases.UInt32LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32LTE build() { - build.buf.validate.conformance.cases.UInt32LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32LTE buildPartial() { - build.buf.validate.conformance.cases.UInt32LTE result = new build.buf.validate.conformance.cases.UInt32LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32LTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32LTE other) { - if (other == build.buf.validate.conformance.cases.UInt32LTE.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32LTE) - private static final build.buf.validate.conformance.cases.UInt32LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32LTE(); - } - - public static build.buf.validate.conformance.cases.UInt32LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32LTE 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.UInt32LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTEOrBuilder.java deleted file mode 100644 index 4b595685..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTOrBuilder.java deleted file mode 100644 index 2602110f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32LT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32None.java deleted file mode 100644 index 7bad6bc1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32None.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32None} - */ -public final class UInt32None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32None) - UInt32NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32None.class.getName()); - } - // Use UInt32None.newBuilder() to construct. - private UInt32None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32None.class, build.buf.validate.conformance.cases.UInt32None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32None other = (build.buf.validate.conformance.cases.UInt32None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32None 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.UInt32None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32None 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.UInt32None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32None 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.UInt32None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32None 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.UInt32None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32None 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.UInt32None 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.UInt32None 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.UInt32None 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.UInt32None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32None) - build.buf.validate.conformance.cases.UInt32NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32None.class, build.buf.validate.conformance.cases.UInt32None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32None build() { - build.buf.validate.conformance.cases.UInt32None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32None buildPartial() { - build.buf.validate.conformance.cases.UInt32None result = new build.buf.validate.conformance.cases.UInt32None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32None) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32None other) { - if (other == build.buf.validate.conformance.cases.UInt32None.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32None) - private static final build.buf.validate.conformance.cases.UInt32None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32None(); - } - - public static build.buf.validate.conformance.cases.UInt32None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32None 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.UInt32None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NoneOrBuilder.java deleted file mode 100644 index 66536688..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32None) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val"]; - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotIn.java deleted file mode 100644 index aacdbdc3..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotIn.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt32NotIn} - */ -public final class UInt32NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt32NotIn) - UInt32NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32NotIn.class.getName()); - } - // Use UInt32NotIn.newBuilder() to construct. - private UInt32NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt32NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32NotIn.class, build.buf.validate.conformance.cases.UInt32NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private int val_ = 0; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return 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 (val_ != 0) { - output.writeUInt32(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, val_); - } - 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.UInt32NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt32NotIn other = (build.buf.validate.conformance.cases.UInt32NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + getVal(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt32NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32NotIn 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.UInt32NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32NotIn 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.UInt32NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt32NotIn 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.UInt32NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt32NotIn 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.UInt32NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt32NotIn 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.UInt32NotIn 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.UInt32NotIn 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.UInt32NotIn 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.UInt32NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt32NotIn) - build.buf.validate.conformance.cases.UInt32NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt32NotIn.class, build.buf.validate.conformance.cases.UInt32NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt32NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt32NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt32NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32NotIn build() { - build.buf.validate.conformance.cases.UInt32NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt32NotIn buildPartial() { - build.buf.validate.conformance.cases.UInt32NotIn result = new build.buf.validate.conformance.cases.UInt32NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt32NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt32NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.UInt32NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt32NotIn other) { - if (other == build.buf.validate.conformance.cases.UInt32NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0) { - setVal(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 8: { - val_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int val_ ; - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public int getVal() { - return val_; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(int value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt32NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt32NotIn) - private static final build.buf.validate.conformance.cases.UInt32NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt32NotIn(); - } - - public static build.buf.validate.conformance.cases.UInt32NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32NotIn 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.UInt32NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotInOrBuilder.java deleted file mode 100644 index d6bcf34f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt32NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt32NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt32NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * uint32 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - int getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Const.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Const.java deleted file mode 100644 index 3c2142d8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Const.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64Const} - */ -public final class UInt64Const extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64Const) - UInt64ConstOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64Const.class.getName()); - } - // Use UInt64Const.newBuilder() to construct. - private UInt64Const(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64Const() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64Const.class, build.buf.validate.conformance.cases.UInt64Const.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64Const)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64Const other = (build.buf.validate.conformance.cases.UInt64Const) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64Const parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Const 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.UInt64Const parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Const 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.UInt64Const parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Const 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.UInt64Const parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64Const 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.UInt64Const parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64Const 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.UInt64Const 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.UInt64Const 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.UInt64Const 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.UInt64Const} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64Const) - build.buf.validate.conformance.cases.UInt64ConstOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Const_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Const_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64Const.class, build.buf.validate.conformance.cases.UInt64Const.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64Const.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Const_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Const getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64Const.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Const build() { - build.buf.validate.conformance.cases.UInt64Const result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Const buildPartial() { - build.buf.validate.conformance.cases.UInt64Const result = new build.buf.validate.conformance.cases.UInt64Const(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64Const result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64Const) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64Const)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64Const other) { - if (other == build.buf.validate.conformance.cases.UInt64Const.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64Const) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64Const) - private static final build.buf.validate.conformance.cases.UInt64Const DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64Const(); - } - - public static build.buf.validate.conformance.cases.UInt64Const getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64Const 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.UInt64Const getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ConstOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ConstOrBuilder.java deleted file mode 100644 index 0a154b1c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ConstOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64ConstOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64Const) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTE.java deleted file mode 100644 index 3c75d3ff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64ExGTELTE} - */ -public final class UInt64ExGTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64ExGTELTE) - UInt64ExGTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64ExGTELTE.class.getName()); - } - // Use UInt64ExGTELTE.newBuilder() to construct. - private UInt64ExGTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64ExGTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64ExGTELTE.class, build.buf.validate.conformance.cases.UInt64ExGTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64ExGTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64ExGTELTE other = (build.buf.validate.conformance.cases.UInt64ExGTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64ExGTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64ExGTELTE 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.UInt64ExGTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64ExGTELTE 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.UInt64ExGTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64ExGTELTE 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.UInt64ExGTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64ExGTELTE 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.UInt64ExGTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64ExGTELTE 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.UInt64ExGTELTE 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.UInt64ExGTELTE 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.UInt64ExGTELTE 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.UInt64ExGTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64ExGTELTE) - build.buf.validate.conformance.cases.UInt64ExGTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64ExGTELTE.class, build.buf.validate.conformance.cases.UInt64ExGTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64ExGTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExGTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64ExGTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64ExGTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64ExGTELTE build() { - build.buf.validate.conformance.cases.UInt64ExGTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64ExGTELTE buildPartial() { - build.buf.validate.conformance.cases.UInt64ExGTELTE result = new build.buf.validate.conformance.cases.UInt64ExGTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64ExGTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64ExGTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64ExGTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64ExGTELTE other) { - if (other == build.buf.validate.conformance.cases.UInt64ExGTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64ExGTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64ExGTELTE) - private static final build.buf.validate.conformance.cases.UInt64ExGTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64ExGTELTE(); - } - - public static build.buf.validate.conformance.cases.UInt64ExGTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64ExGTELTE 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.UInt64ExGTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTEOrBuilder.java deleted file mode 100644 index 2224ed0b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExGTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64ExGTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64ExGTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGT.java deleted file mode 100644 index e7bf1f95..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64ExLTGT} - */ -public final class UInt64ExLTGT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64ExLTGT) - UInt64ExLTGTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64ExLTGT.class.getName()); - } - // Use UInt64ExLTGT.newBuilder() to construct. - private UInt64ExLTGT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64ExLTGT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64ExLTGT.class, build.buf.validate.conformance.cases.UInt64ExLTGT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64ExLTGT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64ExLTGT other = (build.buf.validate.conformance.cases.UInt64ExLTGT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64ExLTGT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64ExLTGT 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.UInt64ExLTGT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64ExLTGT 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.UInt64ExLTGT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64ExLTGT 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.UInt64ExLTGT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64ExLTGT 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.UInt64ExLTGT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64ExLTGT 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.UInt64ExLTGT 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.UInt64ExLTGT 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.UInt64ExLTGT 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.UInt64ExLTGT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64ExLTGT) - build.buf.validate.conformance.cases.UInt64ExLTGTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExLTGT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExLTGT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64ExLTGT.class, build.buf.validate.conformance.cases.UInt64ExLTGT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64ExLTGT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64ExLTGT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64ExLTGT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64ExLTGT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64ExLTGT build() { - build.buf.validate.conformance.cases.UInt64ExLTGT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64ExLTGT buildPartial() { - build.buf.validate.conformance.cases.UInt64ExLTGT result = new build.buf.validate.conformance.cases.UInt64ExLTGT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64ExLTGT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64ExLTGT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64ExLTGT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64ExLTGT other) { - if (other == build.buf.validate.conformance.cases.UInt64ExLTGT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64ExLTGT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64ExLTGT) - private static final build.buf.validate.conformance.cases.UInt64ExLTGT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64ExLTGT(); - } - - public static build.buf.validate.conformance.cases.UInt64ExLTGT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64ExLTGT 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.UInt64ExLTGT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGTOrBuilder.java deleted file mode 100644 index 6893e44f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExLTGTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64ExLTGTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64ExLTGT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Example.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Example.java deleted file mode 100644 index 798e4fcf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Example.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64Example} - */ -public final class UInt64Example extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64Example) - UInt64ExampleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64Example.class.getName()); - } - // Use UInt64Example.newBuilder() to construct. - private UInt64Example(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64Example() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64Example.class, build.buf.validate.conformance.cases.UInt64Example.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64Example)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64Example other = (build.buf.validate.conformance.cases.UInt64Example) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64Example parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Example 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.UInt64Example parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Example 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.UInt64Example parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Example 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.UInt64Example parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64Example 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.UInt64Example parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64Example 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.UInt64Example 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.UInt64Example 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.UInt64Example 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.UInt64Example} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64Example) - build.buf.validate.conformance.cases.UInt64ExampleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Example_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Example_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64Example.class, build.buf.validate.conformance.cases.UInt64Example.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64Example.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Example_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Example getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64Example.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Example build() { - build.buf.validate.conformance.cases.UInt64Example result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Example buildPartial() { - build.buf.validate.conformance.cases.UInt64Example result = new build.buf.validate.conformance.cases.UInt64Example(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64Example result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64Example) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64Example)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64Example other) { - if (other == build.buf.validate.conformance.cases.UInt64Example.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64Example) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64Example) - private static final build.buf.validate.conformance.cases.UInt64Example DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64Example(); - } - - public static build.buf.validate.conformance.cases.UInt64Example getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64Example 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.UInt64Example getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExampleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExampleOrBuilder.java deleted file mode 100644 index b4a913ad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64ExampleOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64ExampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64Example) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GT.java deleted file mode 100644 index b1053044..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64GT} - */ -public final class UInt64GT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64GT) - UInt64GTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64GT.class.getName()); - } - // Use UInt64GT.newBuilder() to construct. - private UInt64GT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64GT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GT.class, build.buf.validate.conformance.cases.UInt64GT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64GT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64GT other = (build.buf.validate.conformance.cases.UInt64GT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64GT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GT 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.UInt64GT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GT 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.UInt64GT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GT 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.UInt64GT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64GT 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.UInt64GT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64GT 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.UInt64GT 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.UInt64GT 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.UInt64GT 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.UInt64GT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64GT) - build.buf.validate.conformance.cases.UInt64GTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GT.class, build.buf.validate.conformance.cases.UInt64GT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64GT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64GT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GT build() { - build.buf.validate.conformance.cases.UInt64GT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GT buildPartial() { - build.buf.validate.conformance.cases.UInt64GT result = new build.buf.validate.conformance.cases.UInt64GT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64GT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64GT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64GT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64GT other) { - if (other == build.buf.validate.conformance.cases.UInt64GT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64GT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64GT) - private static final build.buf.validate.conformance.cases.UInt64GT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64GT(); - } - - public static build.buf.validate.conformance.cases.UInt64GT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64GT 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.UInt64GT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTE.java deleted file mode 100644 index 3b3a1778..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64GTE} - */ -public final class UInt64GTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64GTE) - UInt64GTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64GTE.class.getName()); - } - // Use UInt64GTE.newBuilder() to construct. - private UInt64GTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64GTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GTE.class, build.buf.validate.conformance.cases.UInt64GTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64GTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64GTE other = (build.buf.validate.conformance.cases.UInt64GTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64GTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTE 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.UInt64GTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTE 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.UInt64GTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTE 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.UInt64GTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64GTE 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.UInt64GTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64GTE 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.UInt64GTE 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.UInt64GTE 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.UInt64GTE 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.UInt64GTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64GTE) - build.buf.validate.conformance.cases.UInt64GTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GTE.class, build.buf.validate.conformance.cases.UInt64GTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64GTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64GTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTE build() { - build.buf.validate.conformance.cases.UInt64GTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTE buildPartial() { - build.buf.validate.conformance.cases.UInt64GTE result = new build.buf.validate.conformance.cases.UInt64GTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64GTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64GTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64GTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64GTE other) { - if (other == build.buf.validate.conformance.cases.UInt64GTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64GTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64GTE) - private static final build.buf.validate.conformance.cases.UInt64GTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64GTE(); - } - - public static build.buf.validate.conformance.cases.UInt64GTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64GTE 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.UInt64GTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTE.java deleted file mode 100644 index 2c090d73..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64GTELTE} - */ -public final class UInt64GTELTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64GTELTE) - UInt64GTELTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64GTELTE.class.getName()); - } - // Use UInt64GTELTE.newBuilder() to construct. - private UInt64GTELTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64GTELTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GTELTE.class, build.buf.validate.conformance.cases.UInt64GTELTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64GTELTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64GTELTE other = (build.buf.validate.conformance.cases.UInt64GTELTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64GTELTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTELTE 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.UInt64GTELTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTELTE 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.UInt64GTELTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTELTE 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.UInt64GTELTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64GTELTE 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.UInt64GTELTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64GTELTE 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.UInt64GTELTE 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.UInt64GTELTE 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.UInt64GTELTE 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.UInt64GTELTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64GTELTE) - build.buf.validate.conformance.cases.UInt64GTELTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTELTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTELTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GTELTE.class, build.buf.validate.conformance.cases.UInt64GTELTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64GTELTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTELTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTELTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64GTELTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTELTE build() { - build.buf.validate.conformance.cases.UInt64GTELTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTELTE buildPartial() { - build.buf.validate.conformance.cases.UInt64GTELTE result = new build.buf.validate.conformance.cases.UInt64GTELTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64GTELTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64GTELTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64GTELTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64GTELTE other) { - if (other == build.buf.validate.conformance.cases.UInt64GTELTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64GTELTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64GTELTE) - private static final build.buf.validate.conformance.cases.UInt64GTELTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64GTELTE(); - } - - public static build.buf.validate.conformance.cases.UInt64GTELTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64GTELTE 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.UInt64GTELTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTEOrBuilder.java deleted file mode 100644 index 8b424683..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTELTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64GTELTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64GTELTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTEOrBuilder.java deleted file mode 100644 index 5db03063..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64GTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64GTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLT.java deleted file mode 100644 index 506d9b7b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64GTLT} - */ -public final class UInt64GTLT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64GTLT) - UInt64GTLTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64GTLT.class.getName()); - } - // Use UInt64GTLT.newBuilder() to construct. - private UInt64GTLT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64GTLT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GTLT.class, build.buf.validate.conformance.cases.UInt64GTLT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64GTLT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64GTLT other = (build.buf.validate.conformance.cases.UInt64GTLT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64GTLT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTLT 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.UInt64GTLT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTLT 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.UInt64GTLT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64GTLT 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.UInt64GTLT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64GTLT 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.UInt64GTLT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64GTLT 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.UInt64GTLT 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.UInt64GTLT 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.UInt64GTLT 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.UInt64GTLT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64GTLT) - build.buf.validate.conformance.cases.UInt64GTLTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTLT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTLT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64GTLT.class, build.buf.validate.conformance.cases.UInt64GTLT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64GTLT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64GTLT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTLT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64GTLT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTLT build() { - build.buf.validate.conformance.cases.UInt64GTLT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64GTLT buildPartial() { - build.buf.validate.conformance.cases.UInt64GTLT result = new build.buf.validate.conformance.cases.UInt64GTLT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64GTLT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64GTLT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64GTLT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64GTLT other) { - if (other == build.buf.validate.conformance.cases.UInt64GTLT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64GTLT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64GTLT) - private static final build.buf.validate.conformance.cases.UInt64GTLT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64GTLT(); - } - - public static build.buf.validate.conformance.cases.UInt64GTLT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64GTLT 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.UInt64GTLT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLTOrBuilder.java deleted file mode 100644 index fc7b7e62..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTLTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64GTLTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64GTLT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTOrBuilder.java deleted file mode 100644 index 415238b8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64GTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64GTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64GT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Ignore.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Ignore.java deleted file mode 100644 index c9e7e6f8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64Ignore.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64Ignore} - */ -public final class UInt64Ignore extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64Ignore) - UInt64IgnoreOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64Ignore.class.getName()); - } - // Use UInt64Ignore.newBuilder() to construct. - private UInt64Ignore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64Ignore() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64Ignore.class, build.buf.validate.conformance.cases.UInt64Ignore.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64Ignore)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64Ignore other = (build.buf.validate.conformance.cases.UInt64Ignore) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64Ignore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Ignore 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.UInt64Ignore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Ignore 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.UInt64Ignore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64Ignore 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.UInt64Ignore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64Ignore 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.UInt64Ignore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64Ignore 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.UInt64Ignore 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.UInt64Ignore 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.UInt64Ignore 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.UInt64Ignore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64Ignore) - build.buf.validate.conformance.cases.UInt64IgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Ignore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Ignore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64Ignore.class, build.buf.validate.conformance.cases.UInt64Ignore.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64Ignore.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64Ignore_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Ignore getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64Ignore.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Ignore build() { - build.buf.validate.conformance.cases.UInt64Ignore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64Ignore buildPartial() { - build.buf.validate.conformance.cases.UInt64Ignore result = new build.buf.validate.conformance.cases.UInt64Ignore(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64Ignore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64Ignore) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64Ignore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64Ignore other) { - if (other == build.buf.validate.conformance.cases.UInt64Ignore.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64Ignore) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64Ignore) - private static final build.buf.validate.conformance.cases.UInt64Ignore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64Ignore(); - } - - public static build.buf.validate.conformance.cases.UInt64Ignore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64Ignore 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.UInt64Ignore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IgnoreOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IgnoreOrBuilder.java deleted file mode 100644 index 915ebf8a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IgnoreOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64IgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64Ignore) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64In.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64In.java deleted file mode 100644 index 02a6e9c7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64In.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64In} - */ -public final class UInt64In extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64In) - UInt64InOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64In.class.getName()); - } - // Use UInt64In.newBuilder() to construct. - private UInt64In(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64In() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64In.class, build.buf.validate.conformance.cases.UInt64In.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64In)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64In other = (build.buf.validate.conformance.cases.UInt64In) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64In parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64In 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.UInt64In parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64In 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.UInt64In parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64In 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.UInt64In parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64In 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.UInt64In parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64In 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.UInt64In 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.UInt64In 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.UInt64In 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.UInt64In} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64In) - build.buf.validate.conformance.cases.UInt64InOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64In_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64In_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64In.class, build.buf.validate.conformance.cases.UInt64In.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64In.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64In_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64In getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64In.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64In build() { - build.buf.validate.conformance.cases.UInt64In result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64In buildPartial() { - build.buf.validate.conformance.cases.UInt64In result = new build.buf.validate.conformance.cases.UInt64In(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64In result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64In) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64In)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64In other) { - if (other == build.buf.validate.conformance.cases.UInt64In.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64In) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64In) - private static final build.buf.validate.conformance.cases.UInt64In DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64In(); - } - - public static build.buf.validate.conformance.cases.UInt64In getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64In 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.UInt64In getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64InOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64InOrBuilder.java deleted file mode 100644 index 82425665..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64InOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64InOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64In) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectType.java deleted file mode 100644 index 5b7ec283..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectType.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64IncorrectType} - */ -public final class UInt64IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64IncorrectType) - UInt64IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64IncorrectType.class.getName()); - } - // Use UInt64IncorrectType.newBuilder() to construct. - private UInt64IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64IncorrectType.class, build.buf.validate.conformance.cases.UInt64IncorrectType.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64IncorrectType other = (build.buf.validate.conformance.cases.UInt64IncorrectType) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64IncorrectType 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.UInt64IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64IncorrectType 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.UInt64IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64IncorrectType 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.UInt64IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64IncorrectType 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.UInt64IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64IncorrectType 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.UInt64IncorrectType 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.UInt64IncorrectType 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.UInt64IncorrectType 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.UInt64IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64IncorrectType) - build.buf.validate.conformance.cases.UInt64IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64IncorrectType.class, build.buf.validate.conformance.cases.UInt64IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64IncorrectType build() { - build.buf.validate.conformance.cases.UInt64IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64IncorrectType buildPartial() { - build.buf.validate.conformance.cases.UInt64IncorrectType result = new build.buf.validate.conformance.cases.UInt64IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64IncorrectType other) { - if (other == build.buf.validate.conformance.cases.UInt64IncorrectType.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64IncorrectType) - private static final build.buf.validate.conformance.cases.UInt64IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64IncorrectType(); - } - - public static build.buf.validate.conformance.cases.UInt64IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64IncorrectType 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.UInt64IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectTypeOrBuilder.java deleted file mode 100644 index e31a1e4e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LT.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LT.java deleted file mode 100644 index 0026464d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LT.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64LT} - */ -public final class UInt64LT extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64LT) - UInt64LTOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64LT.class.getName()); - } - // Use UInt64LT.newBuilder() to construct. - private UInt64LT(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64LT() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64LT.class, build.buf.validate.conformance.cases.UInt64LT.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64LT)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64LT other = (build.buf.validate.conformance.cases.UInt64LT) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64LT parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64LT 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.UInt64LT parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64LT 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.UInt64LT parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64LT 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.UInt64LT parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64LT 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.UInt64LT parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64LT 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.UInt64LT 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.UInt64LT 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.UInt64LT 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.UInt64LT} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64LT) - build.buf.validate.conformance.cases.UInt64LTOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LT_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LT_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64LT.class, build.buf.validate.conformance.cases.UInt64LT.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64LT.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LT_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64LT getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64LT.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64LT build() { - build.buf.validate.conformance.cases.UInt64LT result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64LT buildPartial() { - build.buf.validate.conformance.cases.UInt64LT result = new build.buf.validate.conformance.cases.UInt64LT(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64LT result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64LT) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64LT)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64LT other) { - if (other == build.buf.validate.conformance.cases.UInt64LT.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64LT) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64LT) - private static final build.buf.validate.conformance.cases.UInt64LT DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64LT(); - } - - public static build.buf.validate.conformance.cases.UInt64LT getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64LT 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.UInt64LT getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTE.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTE.java deleted file mode 100644 index 82a73c27..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTE.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64LTE} - */ -public final class UInt64LTE extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64LTE) - UInt64LTEOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64LTE.class.getName()); - } - // Use UInt64LTE.newBuilder() to construct. - private UInt64LTE(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64LTE() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64LTE.class, build.buf.validate.conformance.cases.UInt64LTE.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64LTE)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64LTE other = (build.buf.validate.conformance.cases.UInt64LTE) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64LTE parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64LTE 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.UInt64LTE parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64LTE 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.UInt64LTE parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64LTE 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.UInt64LTE parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64LTE 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.UInt64LTE parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64LTE 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.UInt64LTE 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.UInt64LTE 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.UInt64LTE 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.UInt64LTE} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64LTE) - build.buf.validate.conformance.cases.UInt64LTEOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LTE_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LTE_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64LTE.class, build.buf.validate.conformance.cases.UInt64LTE.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64LTE.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64LTE_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64LTE getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64LTE.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64LTE build() { - build.buf.validate.conformance.cases.UInt64LTE result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64LTE buildPartial() { - build.buf.validate.conformance.cases.UInt64LTE result = new build.buf.validate.conformance.cases.UInt64LTE(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64LTE result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64LTE) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64LTE)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64LTE other) { - if (other == build.buf.validate.conformance.cases.UInt64LTE.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64LTE) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64LTE) - private static final build.buf.validate.conformance.cases.UInt64LTE DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64LTE(); - } - - public static build.buf.validate.conformance.cases.UInt64LTE getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64LTE 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.UInt64LTE getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTEOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTEOrBuilder.java deleted file mode 100644 index f557dfcf..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTEOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64LTEOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64LTE) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTOrBuilder.java deleted file mode 100644 index c41e2581..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64LTOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64LTOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64LT) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64None.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64None.java deleted file mode 100644 index 8b8aa0c9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64None.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64None} - */ -public final class UInt64None extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64None) - UInt64NoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64None.class.getName()); - } - // Use UInt64None.newBuilder() to construct. - private UInt64None(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64None() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64None.class, build.buf.validate.conformance.cases.UInt64None.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64None)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64None other = (build.buf.validate.conformance.cases.UInt64None) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64None parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64None 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.UInt64None parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64None 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.UInt64None parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64None 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.UInt64None parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64None 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.UInt64None parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64None 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.UInt64None 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.UInt64None 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.UInt64None 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.UInt64None} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64None) - build.buf.validate.conformance.cases.UInt64NoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64None_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64None_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64None.class, build.buf.validate.conformance.cases.UInt64None.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64None.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64None_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64None getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64None.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64None build() { - build.buf.validate.conformance.cases.UInt64None result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64None buildPartial() { - build.buf.validate.conformance.cases.UInt64None result = new build.buf.validate.conformance.cases.UInt64None(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64None result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64None) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64None)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64None other) { - if (other == build.buf.validate.conformance.cases.UInt64None.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val"]; - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val"]; - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val"]; - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64None) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64None) - private static final build.buf.validate.conformance.cases.UInt64None DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64None(); - } - - public static build.buf.validate.conformance.cases.UInt64None getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64None 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.UInt64None getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NoneOrBuilder.java deleted file mode 100644 index 7bc0b0c7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NoneOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64NoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64None) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val"]; - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotIn.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotIn.java deleted file mode 100644 index c80e9c7d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotIn.java +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.UInt64NotIn} - */ -public final class UInt64NotIn extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.UInt64NotIn) - UInt64NotInOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64NotIn.class.getName()); - } - // Use UInt64NotIn.newBuilder() to construct. - private UInt64NotIn(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private UInt64NotIn() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64NotIn.class, build.buf.validate.conformance.cases.UInt64NotIn.Builder.class); - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeUInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, val_); - } - 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.UInt64NotIn)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.UInt64NotIn other = (build.buf.validate.conformance.cases.UInt64NotIn) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.UInt64NotIn parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64NotIn 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.UInt64NotIn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64NotIn 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.UInt64NotIn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.UInt64NotIn 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.UInt64NotIn parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.UInt64NotIn 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.UInt64NotIn parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.UInt64NotIn 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.UInt64NotIn 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.UInt64NotIn 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.UInt64NotIn 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.UInt64NotIn} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.UInt64NotIn) - build.buf.validate.conformance.cases.UInt64NotInOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64NotIn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64NotIn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.UInt64NotIn.class, build.buf.validate.conformance.cases.UInt64NotIn.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.UInt64NotIn.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.NumbersProto.internal_static_buf_validate_conformance_cases_UInt64NotIn_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64NotIn getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.UInt64NotIn.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64NotIn build() { - build.buf.validate.conformance.cases.UInt64NotIn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.UInt64NotIn buildPartial() { - build.buf.validate.conformance.cases.UInt64NotIn result = new build.buf.validate.conformance.cases.UInt64NotIn(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.UInt64NotIn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.UInt64NotIn) { - return mergeFrom((build.buf.validate.conformance.cases.UInt64NotIn)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.UInt64NotIn other) { - if (other == build.buf.validate.conformance.cases.UInt64NotIn.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.UInt64NotIn) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.UInt64NotIn) - private static final build.buf.validate.conformance.cases.UInt64NotIn DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.UInt64NotIn(); - } - - public static build.buf.validate.conformance.cases.UInt64NotIn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64NotIn 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.UInt64NotIn getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotInOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotInOrBuilder.java deleted file mode 100644 index c8098399..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/UInt64NotInOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/numbers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface UInt64NotInOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.UInt64NotIn) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WktAnyProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WktAnyProto.java deleted file mode 100644 index 7d3acd03..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WktAnyProto.java +++ /dev/null @@ -1,116 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_any.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class WktAnyProto { - private WktAnyProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WktAnyProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_AnyNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_AnyNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_AnyRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_AnyRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_AnyIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_AnyIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_AnyNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_AnyNotIn_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,buf/validate/conformance/cases/wkt_any" + - ".proto\022\036buf.validate.conformance.cases\032\033" + - "buf/validate/validate.proto\032\031google/prot" + - "obuf/any.proto\"1\n\007AnyNone\022&\n\003val\030\001 \001(\0132\024" + - ".google.protobuf.AnyR\003val\"=\n\013AnyRequired" + - "\022.\n\003val\030\001 \001(\0132\024.google.protobuf.AnyB\006\272H\003" + - "\310\001\001R\003val\"e\n\005AnyIn\022\\\n\003val\030\001 \001(\0132\024.google." + - "protobuf.AnyB4\272H1\242\001.\022,type.googleapis.co" + - "m/google.protobuf.DurationR\003val\"i\n\010AnyNo" + - "tIn\022]\n\003val\030\001 \001(\0132\024.google.protobuf.AnyB5" + - "\272H2\242\001/\032-type.googleapis.com/google.proto" + - "buf.TimestampR\003valB\317\001\n$build.buf.validat" + - "e.conformance.casesB\013WktAnyProtoP\001\242\002\004BVC" + - "C\252\002\036Buf.Validate.Conformance.Cases\312\002\036Buf" + - "\\Validate\\Conformance\\Cases\342\002*Buf\\Valida" + - "te\\Conformance\\Cases\\GPBMetadata\352\002!Buf::" + - "Validate::Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_AnyNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_AnyNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_AnyNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_AnyRequired_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_AnyRequired_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_AnyRequired_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_AnyIn_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_AnyIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_AnyIn_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_AnyNotIn_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_AnyNotIn_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_AnyNotIn_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WktDurationProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WktDurationProto.java deleted file mode 100644 index 26feb56f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WktDurationProto.java +++ /dev/null @@ -1,259 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_duration.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class WktDurationProto { - private WktDurationProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WktDurationProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationNotIn_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationNotIn_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationLTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationLTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationGTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationGTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationGTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationGTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationFieldWithOtherFields_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_DurationExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_DurationExample_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1buf/validate/conformance/cases/wkt_dur" + - "ation.proto\022\036buf.validate.conformance.ca" + - "ses\032\033buf/validate/validate.proto\032\036google" + - "/protobuf/duration.proto\";\n\014DurationNone" + - "\022+\n\003val\030\001 \001(\0132\031.google.protobuf.Duration" + - "R\003val\"G\n\020DurationRequired\0223\n\003val\030\001 \001(\0132\031" + - ".google.protobuf.DurationB\006\272H\003\310\001\001R\003val\"H" + - "\n\rDurationConst\0227\n\003val\030\001 \001(\0132\031.google.pr" + - "otobuf.DurationB\n\272H\007\252\001\004\022\002\010\003R\003val\"J\n\nDura" + - "tionIn\022<\n\003val\030\001 \001(\0132\031.google.protobuf.Du" + - "rationB\017\272H\014\252\001\t:\002\010\001:\003\020\350\007R\003val\"F\n\rDuration" + - "NotIn\0225\n\003val\030\001 \001(\0132\031.google.protobuf.Dur" + - "ationB\010\272H\005\252\001\002B\000R\003val\"C\n\nDurationLT\0225\n\003va" + - "l\030\001 \001(\0132\031.google.protobuf.DurationB\010\272H\005\252" + - "\001\002\032\000R\003val\"F\n\013DurationLTE\0227\n\003val\030\001 \001(\0132\031." + - "google.protobuf.DurationB\n\272H\007\252\001\004\"\002\010\001R\003va" + - "l\"F\n\nDurationGT\0228\n\003val\030\001 \001(\0132\031.google.pr" + - "otobuf.DurationB\013\272H\010\252\001\005*\003\020\350\007R\003val\"H\n\013Dur" + - "ationGTE\0229\n\003val\030\001 \001(\0132\031.google.protobuf." + - "DurationB\014\272H\t\252\001\0062\004\020\300\204=R\003val\"I\n\014DurationG" + - "TLT\0229\n\003val\030\001 \001(\0132\031.google.protobuf.Durat" + - "ionB\014\272H\t\252\001\006\032\002\010\001*\000R\003val\"K\n\016DurationExLTGT" + - "\0229\n\003val\030\001 \001(\0132\031.google.protobuf.Duration" + - "B\014\272H\t\252\001\006\032\000*\002\010\001R\003val\"N\n\016DurationGTELTE\022<\n" + - "\003val\030\001 \001(\0132\031.google.protobuf.DurationB\017\272" + - "H\014\252\001\t\"\003\010\220\0342\002\010 builder) { - super(builder); - } - private WktLevelOne() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WktLevelOne.class, build.buf.validate.conformance.cases.WktLevelOne.Builder.class); - } - - public interface WktLevelTwoOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - * @return Whether the three field is set. - */ - boolean hasThree(); - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - * @return The three. - */ - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree getThree(); - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder getThreeOrBuilder(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.WktLevelOne.WktLevelTwo} - */ - public static final class WktLevelTwo extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo) - WktLevelTwoOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WktLevelTwo.class.getName()); - } - // Use WktLevelTwo.newBuilder() to construct. - private WktLevelTwo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WktLevelTwo() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.class, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder.class); - } - - public interface WktLevelThreeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) - com.google.protobuf.MessageOrBuilder { - - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return The uuid. - */ - java.lang.String getUuid(); - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return The bytes for uuid. - */ - com.google.protobuf.ByteString - getUuidBytes(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree} - */ - public static final class WktLevelThree extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) - WktLevelThreeOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WktLevelThree.class.getName()); - } - // Use WktLevelThree.newBuilder() to construct. - private WktLevelThree(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WktLevelThree() { - uuid_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.class, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder.class); - } - - public static final int UUID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uuid_ = ""; - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return The uuid. - */ - @java.lang.Override - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uuid_ = s; - return s; - } - } - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return The bytes for uuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, uuid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uuid_); - } - 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.WktLevelOne.WktLevelTwo.WktLevelThree)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree other = (build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) obj; - - if (!getUuid() - .equals(other.getUuid())) 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(); - hash = (37 * hash) + UUID_FIELD_NUMBER; - hash = (53 * hash) + getUuid().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.class, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uuid_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree build() { - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree buildPartial() { - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree result = new build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uuid_ = uuid_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) { - return mergeFrom((build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree other) { - if (other == build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance()) return this; - if (!other.getUuid().isEmpty()) { - uuid_ = other.uuid_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: { - uuid_ = input.readStringRequireUtf8(); - 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 java.lang.Object uuid_ = ""; - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return The uuid. - */ - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return The bytes for uuid. - */ - public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @param value The uuid to set. - * @return This builder for chaining. - */ - public Builder setUuid( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - uuid_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearUuid() { - uuid_ = getDefaultInstance().getUuid(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string uuid = 1 [json_name = "uuid", (.buf.validate.field) = { ... } - * @param value The bytes for uuid to set. - * @return This builder for chaining. - */ - public Builder setUuidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - uuid_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree) - private static final build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree(); - } - - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WktLevelThree 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.WktLevelOne.WktLevelTwo.WktLevelThree getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int THREE_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three_; - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - * @return Whether the three field is set. - */ - @java.lang.Override - public boolean hasThree() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - * @return The three. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree getThree() { - return three_ == null ? build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance() : three_; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder getThreeOrBuilder() { - return three_ == null ? build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance() : three_; - } - - 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, getThree()); - } - 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, getThree()); - } - 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.WktLevelOne.WktLevelTwo)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo other = (build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo) obj; - - if (hasThree() != other.hasThree()) return false; - if (hasThree()) { - if (!getThree() - .equals(other.getThree())) 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 (hasThree()) { - hash = (37 * hash) + THREE_FIELD_NUMBER; - hash = (53 * hash) + getThree().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo 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.WktLevelOne.WktLevelTwo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo) - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.class, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getThreeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - three_ = null; - if (threeBuilder_ != null) { - threeBuilder_.dispose(); - threeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo build() { - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo buildPartial() { - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo result = new build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.three_ = threeBuilder_ == null - ? three_ - : threeBuilder_.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.WktLevelOne.WktLevelTwo) { - return mergeFrom((build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo other) { - if (other == build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance()) return this; - if (other.hasThree()) { - mergeThree(other.getThree()); - } - 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( - getThreeFieldBuilder().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 build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder> threeBuilder_; - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - * @return Whether the three field is set. - */ - public boolean hasThree() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - * @return The three. - */ - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree getThree() { - if (threeBuilder_ == null) { - return three_ == null ? build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance() : three_; - } else { - return threeBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - public Builder setThree(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree value) { - if (threeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - three_ = value; - } else { - threeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - public Builder setThree( - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder builderForValue) { - if (threeBuilder_ == null) { - three_ = builderForValue.build(); - } else { - threeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - public Builder mergeThree(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree value) { - if (threeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - three_ != null && - three_ != build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance()) { - getThreeBuilder().mergeFrom(value); - } else { - three_ = value; - } - } else { - threeBuilder_.mergeFrom(value); - } - if (three_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - public Builder clearThree() { - bitField0_ = (bitField0_ & ~0x00000001); - three_ = null; - if (threeBuilder_ != null) { - threeBuilder_.dispose(); - threeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder getThreeBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getThreeFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder getThreeOrBuilder() { - if (threeBuilder_ != null) { - return threeBuilder_.getMessageOrBuilder(); - } else { - return three_ == null ? - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.getDefaultInstance() : three_; - } - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree three = 1 [json_name = "three", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder> - getThreeFieldBuilder() { - if (threeBuilder_ == null) { - threeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThree.Builder, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.WktLevelThreeOrBuilder>( - getThree(), - getParentForChildren(), - isClean()); - three_ = null; - } - return threeBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WktLevelOne.WktLevelTwo) - private static final build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo(); - } - - public static build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WktLevelTwo 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.WktLevelOne.WktLevelTwo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int TWO_FIELD_NUMBER = 1; - private build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two_; - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - * @return Whether the two field is set. - */ - @java.lang.Override - public boolean hasTwo() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - * @return The two. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo getTwo() { - return two_ == null ? build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance() : two_; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder getTwoOrBuilder() { - return two_ == null ? build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance() : two_; - } - - 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, getTwo()); - } - 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, getTwo()); - } - 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.WktLevelOne)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WktLevelOne other = (build.buf.validate.conformance.cases.WktLevelOne) obj; - - if (hasTwo() != other.hasTwo()) return false; - if (hasTwo()) { - if (!getTwo() - .equals(other.getTwo())) 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 (hasTwo()) { - hash = (37 * hash) + TWO_FIELD_NUMBER; - hash = (53 * hash) + getTwo().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.WktLevelOne parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne 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.WktLevelOne parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne 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.WktLevelOne parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WktLevelOne 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.WktLevelOne parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WktLevelOne 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.WktLevelOne parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WktLevelOne 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.WktLevelOne 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.WktLevelOne 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.WktLevelOne 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.WktLevelOne} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WktLevelOne) - build.buf.validate.conformance.cases.WktLevelOneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WktLevelOne.class, build.buf.validate.conformance.cases.WktLevelOne.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WktLevelOne.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getTwoFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - two_ = null; - if (twoBuilder_ != null) { - twoBuilder_.dispose(); - twoBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.WktNestedProto.internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WktLevelOne.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne build() { - build.buf.validate.conformance.cases.WktLevelOne result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WktLevelOne buildPartial() { - build.buf.validate.conformance.cases.WktLevelOne result = new build.buf.validate.conformance.cases.WktLevelOne(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WktLevelOne result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.two_ = twoBuilder_ == null - ? two_ - : twoBuilder_.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.WktLevelOne) { - return mergeFrom((build.buf.validate.conformance.cases.WktLevelOne)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WktLevelOne other) { - if (other == build.buf.validate.conformance.cases.WktLevelOne.getDefaultInstance()) return this; - if (other.hasTwo()) { - mergeTwo(other.getTwo()); - } - 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( - getTwoFieldBuilder().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 build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder> twoBuilder_; - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - * @return Whether the two field is set. - */ - public boolean hasTwo() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - * @return The two. - */ - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo getTwo() { - if (twoBuilder_ == null) { - return two_ == null ? build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance() : two_; - } else { - return twoBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - public Builder setTwo(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo value) { - if (twoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - two_ = value; - } else { - twoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - public Builder setTwo( - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder builderForValue) { - if (twoBuilder_ == null) { - two_ = builderForValue.build(); - } else { - twoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - public Builder mergeTwo(build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo value) { - if (twoBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - two_ != null && - two_ != build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance()) { - getTwoBuilder().mergeFrom(value); - } else { - two_ = value; - } - } else { - twoBuilder_.mergeFrom(value); - } - if (two_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - public Builder clearTwo() { - bitField0_ = (bitField0_ & ~0x00000001); - two_ = null; - if (twoBuilder_ != null) { - twoBuilder_.dispose(); - twoBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder getTwoBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getTwoFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder getTwoOrBuilder() { - if (twoBuilder_ != null) { - return twoBuilder_.getMessageOrBuilder(); - } else { - return two_ == null ? - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.getDefaultInstance() : two_; - } - } - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder> - getTwoFieldBuilder() { - if (twoBuilder_ == null) { - twoBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo.Builder, build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder>( - getTwo(), - getParentForChildren(), - isClean()); - two_ = null; - } - return twoBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.WktLevelOne) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WktLevelOne) - private static final build.buf.validate.conformance.cases.WktLevelOne DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WktLevelOne(); - } - - public static build.buf.validate.conformance.cases.WktLevelOne getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WktLevelOne 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.WktLevelOne getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WktLevelOneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WktLevelOneOrBuilder.java deleted file mode 100644 index faaaaaf9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WktLevelOneOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_nested.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WktLevelOneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WktLevelOne) - com.google.protobuf.MessageOrBuilder { - - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - * @return Whether the two field is set. - */ - boolean hasTwo(); - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - * @return The two. - */ - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwo getTwo(); - /** - * .buf.validate.conformance.cases.WktLevelOne.WktLevelTwo two = 1 [json_name = "two", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.WktLevelOne.WktLevelTwoOrBuilder getTwoOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WktNestedProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WktNestedProto.java deleted file mode 100644 index 732e1080..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WktNestedProto.java +++ /dev/null @@ -1,101 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_nested.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class WktNestedProto { - private WktNestedProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WktNestedProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_WktLevelOne_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n/buf/validate/conformance/cases/wkt_nes" + - "ted.proto\022\036buf.validate.conformance.case" + - "s\032\033buf/validate/validate.proto\"\204\002\n\013WktLe" + - "velOne\022Q\n\003two\030\001 \001(\01327.buf.validate.confo" + - "rmance.cases.WktLevelOne.WktLevelTwoB\006\272H" + - "\003\310\001\001R\003two\032\241\001\n\013WktLevelTwo\022c\n\005three\030\001 \001(\013" + - "2E.buf.validate.conformance.cases.WktLev" + - "elOne.WktLevelTwo.WktLevelThreeB\006\272H\003\310\001\001R" + - "\005three\032-\n\rWktLevelThree\022\034\n\004uuid\030\001 \001(\tB\010\272" + - "H\005r\003\260\001\001R\004uuidB\322\001\n$build.buf.validate.con" + - "formance.casesB\016WktNestedProtoP\001\242\002\004BVCC\252" + - "\002\036Buf.Validate.Conformance.Cases\312\002\036Buf\\V" + - "alidate\\Conformance\\Cases\342\002*Buf\\Validate" + - "\\Conformance\\Cases\\GPBMetadata\352\002!Buf::Va" + - "lidate::Conformance::Casesb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_WktLevelOne_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor, - new java.lang.String[] { "Two", }); - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor = - internal_static_buf_validate_conformance_cases_WktLevelOne_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor, - new java.lang.String[] { "Three", }); - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_descriptor = - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WktLevelOne_WktLevelTwo_WktLevelThree_descriptor, - new java.lang.String[] { "Uuid", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WktTimestampProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WktTimestampProto.java deleted file mode 100644 index ef333d88..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WktTimestampProto.java +++ /dev/null @@ -1,310 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_timestamp.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public final class WktTimestampProto { - private WktTimestampProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WktTimestampProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampNone_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampNone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampRequired_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampRequired_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampConst_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampConst_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampLTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampLTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampGTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampGTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampGTLT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampGTLT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampExLTGT_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampExLTGT_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampExGTELTE_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampExGTELTE_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampLTNow_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampLTNow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampNotLTNow_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampNotLTNow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampGTNow_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampGTNow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampNotGTNow_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampNotGTNow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampWithin_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampWithin_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampLTNowWithin_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampGTNowWithin_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_TimestampExample_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_TimestampExample_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n2buf/validate/conformance/cases/wkt_tim" + - "estamp.proto\022\036buf.validate.conformance.c" + - "ases\032\033buf/validate/validate.proto\032\037googl" + - "e/protobuf/timestamp.proto\"=\n\rTimestampN" + - "one\022,\n\003val\030\001 \001(\0132\032.google.protobuf.Times" + - "tampR\003val\"I\n\021TimestampRequired\0224\n\003val\030\001 " + - "\001(\0132\032.google.protobuf.TimestampB\006\272H\003\310\001\001R" + - "\003val\"J\n\016TimestampConst\0228\n\003val\030\001 \001(\0132\032.go" + - "ogle.protobuf.TimestampB\n\272H\007\262\001\004\022\002\010\003R\003val" + - "\"E\n\013TimestampLT\0226\n\003val\030\001 \001(\0132\032.google.pr" + - "otobuf.TimestampB\010\272H\005\262\001\002\032\000R\003val\"H\n\014Times" + - "tampLTE\0228\n\003val\030\001 \001(\0132\032.google.protobuf.T" + - "imestampB\n\272H\007\262\001\004\"\002\010\001R\003val\"H\n\013TimestampGT" + - "\0229\n\003val\030\001 \001(\0132\032.google.protobuf.Timestam" + - "pB\013\272H\010\262\001\005*\003\020\350\007R\003val\"J\n\014TimestampGTE\022:\n\003v" + - "al\030\001 \001(\0132\032.google.protobuf.TimestampB\014\272H" + - "\t\262\001\0062\004\020\300\204=R\003val\"K\n\rTimestampGTLT\022:\n\003val\030" + - "\001 \001(\0132\032.google.protobuf.TimestampB\014\272H\t\262\001" + - "\006\032\002\010\001*\000R\003val\"M\n\017TimestampExLTGT\022:\n\003val\030\001" + - " \001(\0132\032.google.protobuf.TimestampB\014\272H\t\262\001\006" + - "\032\000*\002\010\001R\003val\"P\n\017TimestampGTELTE\022=\n\003val\030\001 " + - "\001(\0132\032.google.protobuf.TimestampB\017\272H\014\262\001\t\"" + - "\003\010\220\0342\002\010\n\003val\030\001 \001(\0132\034.google" + - ".protobuf.DoubleValueB\016\272H\013\022\t!\000\000\000\000\000\000\000\000R\003v" + - "al\"F\n\014WrapperInt64\0226\n\003val\030\001 \001(\0132\033.google" + - ".protobuf.Int64ValueB\007\272H\004\"\002 \000R\003val\"F\n\014Wr" + - "apperInt32\0226\n\003val\030\001 \001(\0132\033.google.protobu" + - "f.Int32ValueB\007\272H\004\032\002 \000R\003val\"H\n\rWrapperUIn" + - "t64\0227\n\003val\030\001 \001(\0132\034.google.protobuf.UInt6" + - "4ValueB\007\272H\0042\002 \000R\003val\"H\n\rWrapperUInt32\0227\n" + - "\003val\030\001 \001(\0132\034.google.protobuf.UInt32Value" + - "B\007\272H\004*\002 \000R\003val\"D\n\013WrapperBool\0225\n\003val\030\001 \001" + - "(\0132\032.google.protobuf.BoolValueB\007\272H\004j\002\010\001R" + - "\003val\"K\n\rWrapperString\022:\n\003val\030\001 \001(\0132\034.goo" + - "gle.protobuf.StringValueB\n\272H\007r\005B\003barR\003va" + - "l\"F\n\014WrapperBytes\0226\n\003val\030\001 \001(\0132\033.google." + - "protobuf.BytesValueB\007\272H\004z\002\020\003R\003val\"V\n\025Wra" + - "pperRequiredString\022=\n\003val\030\001 \001(\0132\034.google" + - ".protobuf.StringValueB\r\272H\nr\005\n\003bar\310\001\001R\003va" + - "l\"X\n\032WrapperRequiredEmptyString\022:\n\003val\030\001" + - " \001(\0132\034.google.protobuf.StringValueB\n\272H\007r" + - "\002\n\000\310\001\001R\003val\"X\n\031WrapperOptionalUuidString" + - "\022;\n\003val\030\001 \001(\0132\034.google.protobuf.StringVa" + - "lueB\013\272H\010r\003\260\001\001\310\001\000R\003val\"T\n\024WrapperRequired" + - "Float\022<\n\003val\030\001 \001(\0132\033.google.protobuf.Flo" + - "atValueB\r\272H\n\n\005%\000\000\000\000\310\001\001R\003valB\324\001\n$build.bu" + - "f.validate.conformance.casesB\020WktWrapper" + - "sProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conforman" + - "ce.Cases\312\002\036Buf\\Validate\\Conformance\\Case" + - "s\342\002*Buf\\Validate\\Conformance\\Cases\\GPBMe" + - "tadata\352\002!Buf::Validate::Conformance::Cas" + - "esb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_WrapperNone_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_WrapperNone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperNone_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperFloat_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_cases_WrapperFloat_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperFloat_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperDouble_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_cases_WrapperDouble_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperDouble_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperInt64_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_cases_WrapperInt64_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperInt64_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperInt32_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_conformance_cases_WrapperInt32_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperInt32_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperUInt64_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_conformance_cases_WrapperUInt64_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperUInt64_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperUInt32_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_conformance_cases_WrapperUInt32_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperUInt32_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperBool_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_conformance_cases_WrapperBool_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperBool_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperString_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_conformance_cases_WrapperString_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperString_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperBytes_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_conformance_cases_WrapperBytes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperBytes_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperRequiredString_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_conformance_cases_WrapperRequiredString_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperRequiredString_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_descriptor, - new java.lang.String[] { "Val", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBool.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBool.java deleted file mode 100644 index 11e55c8c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBool.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperBool} - */ -public final class WrapperBool extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperBool) - WrapperBoolOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperBool.class.getName()); - } - // Use WrapperBool.newBuilder() to construct. - private WrapperBool(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperBool() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBool_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperBool.class, build.buf.validate.conformance.cases.WrapperBool.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.WrapperBool)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperBool other = (build.buf.validate.conformance.cases.WrapperBool) 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.WrapperBool parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperBool 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.WrapperBool parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperBool 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.WrapperBool parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperBool 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.WrapperBool parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperBool 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.WrapperBool parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperBool 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.WrapperBool 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.WrapperBool 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.WrapperBool 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.WrapperBool} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperBool) - build.buf.validate.conformance.cases.WrapperBoolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBool_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperBool.class, build.buf.validate.conformance.cases.WrapperBool.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperBool.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBool_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperBool getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperBool.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperBool build() { - build.buf.validate.conformance.cases.WrapperBool result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperBool buildPartial() { - build.buf.validate.conformance.cases.WrapperBool result = new build.buf.validate.conformance.cases.WrapperBool(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperBool 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.WrapperBool) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperBool)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperBool other) { - if (other == build.buf.validate.conformance.cases.WrapperBool.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.WrapperBool) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperBool) - private static final build.buf.validate.conformance.cases.WrapperBool DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperBool(); - } - - public static build.buf.validate.conformance.cases.WrapperBool getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperBool 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.WrapperBool getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBoolOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBoolOrBuilder.java deleted file mode 100644 index 7d4a7672..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBoolOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperBoolOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperBool) - 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/WrapperBytes.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytes.java deleted file mode 100644 index fa2d5a16..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytes.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperBytes} - */ -public final class WrapperBytes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperBytes) - WrapperBytesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperBytes.class.getName()); - } - // Use WrapperBytes.newBuilder() to construct. - private WrapperBytes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperBytes() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperBytes.class, build.buf.validate.conformance.cases.WrapperBytes.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.WrapperBytes)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperBytes other = (build.buf.validate.conformance.cases.WrapperBytes) 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.WrapperBytes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperBytes 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.WrapperBytes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperBytes 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.WrapperBytes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperBytes 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.WrapperBytes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperBytes 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.WrapperBytes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperBytes 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.WrapperBytes 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.WrapperBytes 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.WrapperBytes 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.WrapperBytes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperBytes) - build.buf.validate.conformance.cases.WrapperBytesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBytes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBytes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperBytes.class, build.buf.validate.conformance.cases.WrapperBytes.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperBytes.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperBytes_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperBytes getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperBytes.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperBytes build() { - build.buf.validate.conformance.cases.WrapperBytes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperBytes buildPartial() { - build.buf.validate.conformance.cases.WrapperBytes result = new build.buf.validate.conformance.cases.WrapperBytes(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperBytes 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.WrapperBytes) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperBytes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperBytes other) { - if (other == build.buf.validate.conformance.cases.WrapperBytes.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.WrapperBytes) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperBytes) - private static final build.buf.validate.conformance.cases.WrapperBytes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperBytes(); - } - - public static build.buf.validate.conformance.cases.WrapperBytes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperBytes 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.WrapperBytes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytesOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytesOrBuilder.java deleted file mode 100644 index 8c7d66c7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperBytesOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperBytesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperBytes) - 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/WrapperDouble.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDouble.java deleted file mode 100644 index 2df11234..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDouble.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperDouble} - */ -public final class WrapperDouble extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperDouble) - WrapperDoubleOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperDouble.class.getName()); - } - // Use WrapperDouble.newBuilder() to construct. - private WrapperDouble(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperDouble() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperDouble_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperDouble_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperDouble.class, build.buf.validate.conformance.cases.WrapperDouble.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.WrapperDouble)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperDouble other = (build.buf.validate.conformance.cases.WrapperDouble) 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.WrapperDouble parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperDouble 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.WrapperDouble parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperDouble 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.WrapperDouble parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperDouble 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.WrapperDouble parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperDouble 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.WrapperDouble parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperDouble 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.WrapperDouble 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.WrapperDouble 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.WrapperDouble 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.WrapperDouble} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperDouble) - build.buf.validate.conformance.cases.WrapperDoubleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperDouble_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperDouble_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperDouble.class, build.buf.validate.conformance.cases.WrapperDouble.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperDouble.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperDouble_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperDouble getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperDouble.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperDouble build() { - build.buf.validate.conformance.cases.WrapperDouble result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperDouble buildPartial() { - build.buf.validate.conformance.cases.WrapperDouble result = new build.buf.validate.conformance.cases.WrapperDouble(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperDouble 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.WrapperDouble) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperDouble)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperDouble other) { - if (other == build.buf.validate.conformance.cases.WrapperDouble.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.WrapperDouble) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperDouble) - private static final build.buf.validate.conformance.cases.WrapperDouble DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperDouble(); - } - - public static build.buf.validate.conformance.cases.WrapperDouble getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperDouble 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.WrapperDouble getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDoubleOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDoubleOrBuilder.java deleted file mode 100644 index c1f568d1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperDoubleOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperDoubleOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperDouble) - 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/WrapperFloat.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloat.java deleted file mode 100644 index 577b782a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloat.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperFloat} - */ -public final class WrapperFloat extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperFloat) - WrapperFloatOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperFloat.class.getName()); - } - // Use WrapperFloat.newBuilder() to construct. - private WrapperFloat(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperFloat() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperFloat_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperFloat_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperFloat.class, build.buf.validate.conformance.cases.WrapperFloat.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.WrapperFloat)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperFloat other = (build.buf.validate.conformance.cases.WrapperFloat) 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.WrapperFloat parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperFloat 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.WrapperFloat parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperFloat 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.WrapperFloat parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperFloat 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.WrapperFloat parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperFloat 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.WrapperFloat parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperFloat 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.WrapperFloat 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.WrapperFloat 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.WrapperFloat 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.WrapperFloat} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperFloat) - build.buf.validate.conformance.cases.WrapperFloatOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperFloat_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperFloat_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperFloat.class, build.buf.validate.conformance.cases.WrapperFloat.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperFloat.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperFloat_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperFloat getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperFloat.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperFloat build() { - build.buf.validate.conformance.cases.WrapperFloat result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperFloat buildPartial() { - build.buf.validate.conformance.cases.WrapperFloat result = new build.buf.validate.conformance.cases.WrapperFloat(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperFloat 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.WrapperFloat) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperFloat)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperFloat other) { - if (other == build.buf.validate.conformance.cases.WrapperFloat.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.WrapperFloat) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperFloat) - private static final build.buf.validate.conformance.cases.WrapperFloat DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperFloat(); - } - - public static build.buf.validate.conformance.cases.WrapperFloat getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperFloat 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.WrapperFloat getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloatOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloatOrBuilder.java deleted file mode 100644 index 4ae81d03..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperFloatOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperFloatOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperFloat) - 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/WrapperInt32.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32.java deleted file mode 100644 index 3d703637..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperInt32} - */ -public final class WrapperInt32 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperInt32) - WrapperInt32OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperInt32.class.getName()); - } - // Use WrapperInt32.newBuilder() to construct. - private WrapperInt32(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperInt32() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt32_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt32_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperInt32.class, build.buf.validate.conformance.cases.WrapperInt32.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.WrapperInt32)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperInt32 other = (build.buf.validate.conformance.cases.WrapperInt32) 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.WrapperInt32 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperInt32 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.WrapperInt32 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperInt32 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.WrapperInt32 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperInt32 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.WrapperInt32 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperInt32 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.WrapperInt32 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperInt32 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.WrapperInt32 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.WrapperInt32 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.WrapperInt32 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.WrapperInt32} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperInt32) - build.buf.validate.conformance.cases.WrapperInt32OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt32_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt32_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperInt32.class, build.buf.validate.conformance.cases.WrapperInt32.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperInt32.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt32_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperInt32 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperInt32.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperInt32 build() { - build.buf.validate.conformance.cases.WrapperInt32 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperInt32 buildPartial() { - build.buf.validate.conformance.cases.WrapperInt32 result = new build.buf.validate.conformance.cases.WrapperInt32(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperInt32 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.WrapperInt32) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperInt32)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperInt32 other) { - if (other == build.buf.validate.conformance.cases.WrapperInt32.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.WrapperInt32) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperInt32) - private static final build.buf.validate.conformance.cases.WrapperInt32 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperInt32(); - } - - public static build.buf.validate.conformance.cases.WrapperInt32 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperInt32 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.WrapperInt32 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32OrBuilder.java deleted file mode 100644 index a0047498..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt32OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperInt32OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperInt32) - 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/WrapperInt64.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64.java deleted file mode 100644 index e3127190..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperInt64} - */ -public final class WrapperInt64 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperInt64) - WrapperInt64OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperInt64.class.getName()); - } - // Use WrapperInt64.newBuilder() to construct. - private WrapperInt64(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperInt64() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt64_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt64_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperInt64.class, build.buf.validate.conformance.cases.WrapperInt64.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.WrapperInt64)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperInt64 other = (build.buf.validate.conformance.cases.WrapperInt64) 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.WrapperInt64 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperInt64 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.WrapperInt64 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperInt64 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.WrapperInt64 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperInt64 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.WrapperInt64 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperInt64 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.WrapperInt64 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperInt64 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.WrapperInt64 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.WrapperInt64 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.WrapperInt64 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.WrapperInt64} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperInt64) - build.buf.validate.conformance.cases.WrapperInt64OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt64_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt64_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperInt64.class, build.buf.validate.conformance.cases.WrapperInt64.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperInt64.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperInt64_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperInt64 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperInt64.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperInt64 build() { - build.buf.validate.conformance.cases.WrapperInt64 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperInt64 buildPartial() { - build.buf.validate.conformance.cases.WrapperInt64 result = new build.buf.validate.conformance.cases.WrapperInt64(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperInt64 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.WrapperInt64) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperInt64)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperInt64 other) { - if (other == build.buf.validate.conformance.cases.WrapperInt64.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.WrapperInt64) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperInt64) - private static final build.buf.validate.conformance.cases.WrapperInt64 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperInt64(); - } - - public static build.buf.validate.conformance.cases.WrapperInt64 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperInt64 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.WrapperInt64 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64OrBuilder.java deleted file mode 100644 index e11a27f5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperInt64OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperInt64OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperInt64) - 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/WrapperNone.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNone.java deleted file mode 100644 index df41aa38..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNone.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperNone} - */ -public final class WrapperNone extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperNone) - WrapperNoneOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperNone.class.getName()); - } - // Use WrapperNone.newBuilder() to construct. - private WrapperNone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperNone() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperNone.class, build.buf.validate.conformance.cases.WrapperNone.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"]; - * @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"]; - * @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"]; - */ - @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.WrapperNone)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperNone other = (build.buf.validate.conformance.cases.WrapperNone) 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.WrapperNone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperNone 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.WrapperNone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperNone 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.WrapperNone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperNone 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.WrapperNone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperNone 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.WrapperNone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperNone 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.WrapperNone 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.WrapperNone 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.WrapperNone 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.WrapperNone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperNone) - build.buf.validate.conformance.cases.WrapperNoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperNone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperNone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperNone.class, build.buf.validate.conformance.cases.WrapperNone.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperNone.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperNone_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperNone getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperNone.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperNone build() { - build.buf.validate.conformance.cases.WrapperNone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperNone buildPartial() { - build.buf.validate.conformance.cases.WrapperNone result = new build.buf.validate.conformance.cases.WrapperNone(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperNone 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.WrapperNone) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperNone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperNone other) { - if (other == build.buf.validate.conformance.cases.WrapperNone.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"]; - * @return Whether the val field is set. - */ - public boolean hasVal() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.Int32Value val = 1 [json_name = "val"]; - * @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"]; - */ - 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"]; - */ - 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"]; - */ - 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"]; - */ - 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"]; - */ - public com.google.protobuf.Int32Value.Builder getValBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getValFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Int32Value val = 1 [json_name = "val"]; - */ - 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"]; - */ - 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.WrapperNone) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperNone) - private static final build.buf.validate.conformance.cases.WrapperNone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperNone(); - } - - public static build.buf.validate.conformance.cases.WrapperNone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperNone 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.WrapperNone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNoneOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNoneOrBuilder.java deleted file mode 100644 index b6c7e887..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperNoneOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperNoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperNone) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Int32Value val = 1 [json_name = "val"]; - * @return Whether the val field is set. - */ - boolean hasVal(); - /** - * .google.protobuf.Int32Value val = 1 [json_name = "val"]; - * @return The val. - */ - com.google.protobuf.Int32Value getVal(); - /** - * .google.protobuf.Int32Value val = 1 [json_name = "val"]; - */ - com.google.protobuf.Int32ValueOrBuilder getValOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidString.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidString.java deleted file mode 100644 index 91322b8c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidString.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperOptionalUuidString} - */ -public final class WrapperOptionalUuidString extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperOptionalUuidString) - WrapperOptionalUuidStringOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperOptionalUuidString.class.getName()); - } - // Use WrapperOptionalUuidString.newBuilder() to construct. - private WrapperOptionalUuidString(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperOptionalUuidString() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperOptionalUuidString.class, build.buf.validate.conformance.cases.WrapperOptionalUuidString.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.WrapperOptionalUuidString)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperOptionalUuidString other = (build.buf.validate.conformance.cases.WrapperOptionalUuidString) 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.WrapperOptionalUuidString parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperOptionalUuidString 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.WrapperOptionalUuidString parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperOptionalUuidString 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.WrapperOptionalUuidString parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperOptionalUuidString 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.WrapperOptionalUuidString parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperOptionalUuidString 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.WrapperOptionalUuidString parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperOptionalUuidString 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.WrapperOptionalUuidString 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.WrapperOptionalUuidString 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.WrapperOptionalUuidString 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.WrapperOptionalUuidString} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperOptionalUuidString) - build.buf.validate.conformance.cases.WrapperOptionalUuidStringOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperOptionalUuidString.class, build.buf.validate.conformance.cases.WrapperOptionalUuidString.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperOptionalUuidString.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperOptionalUuidString_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperOptionalUuidString getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperOptionalUuidString.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperOptionalUuidString build() { - build.buf.validate.conformance.cases.WrapperOptionalUuidString result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperOptionalUuidString buildPartial() { - build.buf.validate.conformance.cases.WrapperOptionalUuidString result = new build.buf.validate.conformance.cases.WrapperOptionalUuidString(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperOptionalUuidString 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.WrapperOptionalUuidString) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperOptionalUuidString)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperOptionalUuidString other) { - if (other == build.buf.validate.conformance.cases.WrapperOptionalUuidString.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.WrapperOptionalUuidString) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperOptionalUuidString) - private static final build.buf.validate.conformance.cases.WrapperOptionalUuidString DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperOptionalUuidString(); - } - - public static build.buf.validate.conformance.cases.WrapperOptionalUuidString getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperOptionalUuidString 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.WrapperOptionalUuidString getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidStringOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidStringOrBuilder.java deleted file mode 100644 index 8b48639b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperOptionalUuidStringOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperOptionalUuidStringOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperOptionalUuidString) - 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/WrapperRequiredEmptyString.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyString.java deleted file mode 100644 index edc754a1..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyString.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperRequiredEmptyString} - */ -public final class WrapperRequiredEmptyString extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperRequiredEmptyString) - WrapperRequiredEmptyStringOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperRequiredEmptyString.class.getName()); - } - // Use WrapperRequiredEmptyString.newBuilder() to construct. - private WrapperRequiredEmptyString(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperRequiredEmptyString() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperRequiredEmptyString.class, build.buf.validate.conformance.cases.WrapperRequiredEmptyString.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.WrapperRequiredEmptyString)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperRequiredEmptyString other = (build.buf.validate.conformance.cases.WrapperRequiredEmptyString) 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.WrapperRequiredEmptyString parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperRequiredEmptyString) - build.buf.validate.conformance.cases.WrapperRequiredEmptyStringOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperRequiredEmptyString.class, build.buf.validate.conformance.cases.WrapperRequiredEmptyString.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperRequiredEmptyString.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredEmptyString_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredEmptyString getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperRequiredEmptyString.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredEmptyString build() { - build.buf.validate.conformance.cases.WrapperRequiredEmptyString result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredEmptyString buildPartial() { - build.buf.validate.conformance.cases.WrapperRequiredEmptyString result = new build.buf.validate.conformance.cases.WrapperRequiredEmptyString(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperRequiredEmptyString 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.WrapperRequiredEmptyString) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperRequiredEmptyString)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperRequiredEmptyString other) { - if (other == build.buf.validate.conformance.cases.WrapperRequiredEmptyString.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.WrapperRequiredEmptyString) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperRequiredEmptyString) - private static final build.buf.validate.conformance.cases.WrapperRequiredEmptyString DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperRequiredEmptyString(); - } - - public static build.buf.validate.conformance.cases.WrapperRequiredEmptyString getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperRequiredEmptyString 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.WrapperRequiredEmptyString getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyStringOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyStringOrBuilder.java deleted file mode 100644 index 10cd1ecd..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredEmptyStringOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperRequiredEmptyStringOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperRequiredEmptyString) - 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/WrapperRequiredFloat.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloat.java deleted file mode 100644 index 6bb57499..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloat.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperRequiredFloat} - */ -public final class WrapperRequiredFloat extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperRequiredFloat) - WrapperRequiredFloatOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperRequiredFloat.class.getName()); - } - // Use WrapperRequiredFloat.newBuilder() to construct. - private WrapperRequiredFloat(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperRequiredFloat() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperRequiredFloat.class, build.buf.validate.conformance.cases.WrapperRequiredFloat.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.WrapperRequiredFloat)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperRequiredFloat other = (build.buf.validate.conformance.cases.WrapperRequiredFloat) 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.WrapperRequiredFloat parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredFloat 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.WrapperRequiredFloat parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredFloat 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.WrapperRequiredFloat parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredFloat 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.WrapperRequiredFloat parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperRequiredFloat 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.WrapperRequiredFloat parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperRequiredFloat 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.WrapperRequiredFloat 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.WrapperRequiredFloat 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.WrapperRequiredFloat 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.WrapperRequiredFloat} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperRequiredFloat) - build.buf.validate.conformance.cases.WrapperRequiredFloatOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperRequiredFloat.class, build.buf.validate.conformance.cases.WrapperRequiredFloat.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperRequiredFloat.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredFloat_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredFloat getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperRequiredFloat.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredFloat build() { - build.buf.validate.conformance.cases.WrapperRequiredFloat result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredFloat buildPartial() { - build.buf.validate.conformance.cases.WrapperRequiredFloat result = new build.buf.validate.conformance.cases.WrapperRequiredFloat(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperRequiredFloat 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.WrapperRequiredFloat) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperRequiredFloat)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperRequiredFloat other) { - if (other == build.buf.validate.conformance.cases.WrapperRequiredFloat.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.WrapperRequiredFloat) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperRequiredFloat) - private static final build.buf.validate.conformance.cases.WrapperRequiredFloat DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperRequiredFloat(); - } - - public static build.buf.validate.conformance.cases.WrapperRequiredFloat getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperRequiredFloat 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.WrapperRequiredFloat getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloatOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloatOrBuilder.java deleted file mode 100644 index 056cf93e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredFloatOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperRequiredFloatOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperRequiredFloat) - 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/WrapperRequiredString.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredString.java deleted file mode 100644 index eb6ac0a9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredString.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperRequiredString} - */ -public final class WrapperRequiredString extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperRequiredString) - WrapperRequiredStringOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperRequiredString.class.getName()); - } - // Use WrapperRequiredString.newBuilder() to construct. - private WrapperRequiredString(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperRequiredString() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperRequiredString.class, build.buf.validate.conformance.cases.WrapperRequiredString.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.WrapperRequiredString)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperRequiredString other = (build.buf.validate.conformance.cases.WrapperRequiredString) 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.WrapperRequiredString parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredString 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.WrapperRequiredString parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredString 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.WrapperRequiredString parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperRequiredString 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.WrapperRequiredString parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperRequiredString 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.WrapperRequiredString parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperRequiredString 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.WrapperRequiredString 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.WrapperRequiredString 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.WrapperRequiredString 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.WrapperRequiredString} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperRequiredString) - build.buf.validate.conformance.cases.WrapperRequiredStringOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperRequiredString.class, build.buf.validate.conformance.cases.WrapperRequiredString.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperRequiredString.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperRequiredString_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredString getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperRequiredString.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredString build() { - build.buf.validate.conformance.cases.WrapperRequiredString result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperRequiredString buildPartial() { - build.buf.validate.conformance.cases.WrapperRequiredString result = new build.buf.validate.conformance.cases.WrapperRequiredString(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperRequiredString 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.WrapperRequiredString) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperRequiredString)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperRequiredString other) { - if (other == build.buf.validate.conformance.cases.WrapperRequiredString.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.WrapperRequiredString) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperRequiredString) - private static final build.buf.validate.conformance.cases.WrapperRequiredString DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperRequiredString(); - } - - public static build.buf.validate.conformance.cases.WrapperRequiredString getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperRequiredString 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.WrapperRequiredString getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredStringOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredStringOrBuilder.java deleted file mode 100644 index 4b8f772b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperRequiredStringOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperRequiredStringOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperRequiredString) - 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/WrapperString.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperString.java deleted file mode 100644 index 7348089c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperString.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperString} - */ -public final class WrapperString extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperString) - WrapperStringOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperString.class.getName()); - } - // Use WrapperString.newBuilder() to construct. - private WrapperString(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperString() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperString.class, build.buf.validate.conformance.cases.WrapperString.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.WrapperString)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperString other = (build.buf.validate.conformance.cases.WrapperString) 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.WrapperString parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperString 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.WrapperString parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperString 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.WrapperString parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperString 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.WrapperString parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperString 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.WrapperString parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperString 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.WrapperString 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.WrapperString 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.WrapperString 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.WrapperString} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperString) - build.buf.validate.conformance.cases.WrapperStringOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperString_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperString_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperString.class, build.buf.validate.conformance.cases.WrapperString.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperString.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperString_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperString getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperString.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperString build() { - build.buf.validate.conformance.cases.WrapperString result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperString buildPartial() { - build.buf.validate.conformance.cases.WrapperString result = new build.buf.validate.conformance.cases.WrapperString(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperString 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.WrapperString) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperString)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperString other) { - if (other == build.buf.validate.conformance.cases.WrapperString.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.WrapperString) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperString) - private static final build.buf.validate.conformance.cases.WrapperString DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperString(); - } - - public static build.buf.validate.conformance.cases.WrapperString getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperString 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.WrapperString getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperStringOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperStringOrBuilder.java deleted file mode 100644 index 4182b2e5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperStringOrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperStringOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperString) - 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/WrapperUInt32.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32.java deleted file mode 100644 index 23dd9dbb..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperUInt32} - */ -public final class WrapperUInt32 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperUInt32) - WrapperUInt32OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperUInt32.class.getName()); - } - // Use WrapperUInt32.newBuilder() to construct. - private WrapperUInt32(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperUInt32() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt32_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt32_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperUInt32.class, build.buf.validate.conformance.cases.WrapperUInt32.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.WrapperUInt32)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperUInt32 other = (build.buf.validate.conformance.cases.WrapperUInt32) 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.WrapperUInt32 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperUInt32 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.WrapperUInt32 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperUInt32 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.WrapperUInt32 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperUInt32 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.WrapperUInt32 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperUInt32 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.WrapperUInt32 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperUInt32 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.WrapperUInt32 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.WrapperUInt32 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.WrapperUInt32 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.WrapperUInt32} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperUInt32) - build.buf.validate.conformance.cases.WrapperUInt32OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt32_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt32_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperUInt32.class, build.buf.validate.conformance.cases.WrapperUInt32.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperUInt32.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt32_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperUInt32 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperUInt32.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperUInt32 build() { - build.buf.validate.conformance.cases.WrapperUInt32 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperUInt32 buildPartial() { - build.buf.validate.conformance.cases.WrapperUInt32 result = new build.buf.validate.conformance.cases.WrapperUInt32(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperUInt32 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.WrapperUInt32) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperUInt32)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperUInt32 other) { - if (other == build.buf.validate.conformance.cases.WrapperUInt32.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.WrapperUInt32) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperUInt32) - private static final build.buf.validate.conformance.cases.WrapperUInt32 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperUInt32(); - } - - public static build.buf.validate.conformance.cases.WrapperUInt32 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperUInt32 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.WrapperUInt32 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32OrBuilder.java deleted file mode 100644 index 5117b5aa..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt32OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperUInt32OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperUInt32) - 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/WrapperUInt64.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64.java deleted file mode 100644 index 79ec039f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64.java +++ /dev/null @@ -1,558 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -/** - * Protobuf type {@code buf.validate.conformance.cases.WrapperUInt64} - */ -public final class WrapperUInt64 extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.WrapperUInt64) - WrapperUInt64OrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - WrapperUInt64.class.getName()); - } - // Use WrapperUInt64.newBuilder() to construct. - private WrapperUInt64(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private WrapperUInt64() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt64_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt64_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperUInt64.class, build.buf.validate.conformance.cases.WrapperUInt64.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.WrapperUInt64)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.WrapperUInt64 other = (build.buf.validate.conformance.cases.WrapperUInt64) 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.WrapperUInt64 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperUInt64 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.WrapperUInt64 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperUInt64 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.WrapperUInt64 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.WrapperUInt64 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.WrapperUInt64 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.WrapperUInt64 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.WrapperUInt64 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.WrapperUInt64 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.WrapperUInt64 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.WrapperUInt64 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.WrapperUInt64 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.WrapperUInt64} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.WrapperUInt64) - build.buf.validate.conformance.cases.WrapperUInt64OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt64_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt64_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.WrapperUInt64.class, build.buf.validate.conformance.cases.WrapperUInt64.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.WrapperUInt64.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.WktWrappersProto.internal_static_buf_validate_conformance_cases_WrapperUInt64_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperUInt64 getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.WrapperUInt64.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperUInt64 build() { - build.buf.validate.conformance.cases.WrapperUInt64 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.WrapperUInt64 buildPartial() { - build.buf.validate.conformance.cases.WrapperUInt64 result = new build.buf.validate.conformance.cases.WrapperUInt64(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.WrapperUInt64 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.WrapperUInt64) { - return mergeFrom((build.buf.validate.conformance.cases.WrapperUInt64)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.WrapperUInt64 other) { - if (other == build.buf.validate.conformance.cases.WrapperUInt64.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.WrapperUInt64) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.WrapperUInt64) - private static final build.buf.validate.conformance.cases.WrapperUInt64 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.WrapperUInt64(); - } - - public static build.buf.validate.conformance.cases.WrapperUInt64 getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WrapperUInt64 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.WrapperUInt64 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64OrBuilder.java deleted file mode 100644 index 3f93bb4d..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/WrapperUInt64OrBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/wkt_wrappers.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases; - -public interface WrapperUInt64OrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.WrapperUInt64) - 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/custom_constraints/CustomConstraintsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/CustomConstraintsProto.java deleted file mode 100644 index ad607a64..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/CustomConstraintsProto.java +++ /dev/null @@ -1,223 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public final class CustomConstraintsProto { - private CustomConstraintsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - CustomConstraintsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\nJbuf/validate/conformance/cases/custom_" + - "constraints/custom_constraints.proto\0221bu" + - "f.validate.conformance.cases.custom_cons" + - "traints\032\033buf/validate/validate.proto\"\305\001\n" + - "\rNoExpressions\022\014\n\001a\030\001 \001(\005R\001a\022E\n\001b\030\002 \001(\0162" + - "7.buf.validate.conformance.cases.custom_" + - "constraints.EnumR\001b\022U\n\001c\030\003 \001(\0132G.buf.val" + - "idate.conformance.cases.custom_constrain" + - "ts.NoExpressions.NestedR\001c\032\010\n\006Nested\"\303\005\n" + - "\022MessageExpressions\022\014\n\001a\030\001 \001(\005R\001a\022\014\n\001b\030\002" + - " \001(\005R\001b\022E\n\001c\030\003 \001(\01627.buf.validate.confor" + - "mance.cases.custom_constraints.EnumR\001c\022E" + - "\n\001d\030\004 \001(\01627.buf.validate.conformance.cas" + - "es.custom_constraints.EnumR\001d\022Z\n\001e\030\005 \001(\013" + - "2L.buf.validate.conformance.cases.custom" + - "_constraints.MessageExpressions.NestedR\001" + - "e\022Z\n\001f\030\006 \001(\0132L.buf.validate.conformance." + - "cases.custom_constraints.MessageExpressi" + - "ons.NestedR\001f\032x\n\006Nested\022\014\n\001a\030\001 \001(\005R\001a\022\014\n" + - "\001b\030\002 \001(\005R\001b:R\272HO\032M\n\031message_expression_n" + - "ested\0320this.a > this.b ? \'\': \'a must be " + - "greater than b\':\320\001\272H\314\001\032C\n\031message_expres" + - "sion_scalar\022\025a must be less than b\032\017this" + - ".a < this.b\032?\n\027message_expression_enum\022\022" + - "c must not equal d\032\020this.c != this.d\032D\n\030" + - "message_expression_embed\022\022e.a must equal" + - " f.a\032\024this.e.a == this.f.a\"\366\003\n\020FieldExpr" + - "essions\022Z\n\001a\030\001 \001(\005BL\272HI\272\001F\n\027field_expres" + - "sion_scalar\032+this > 42 ? \'\': \'a must be " + - "greater than 42\'R\001a\022\177\n\001b\030\002 \001(\01627.buf.val" + - "idate.conformance.cases.custom_constrain" + - "ts.EnumB8\272H5\272\0012\n\025field_expression_enum\022\016" + - "b must be ~ONE\032\tthis == 1R\001b\022\246\001\n\001c\030\003 \001(\013" + - "2J.buf.validate.conformance.cases.custom" + - "_constraints.FieldExpressions.NestedBL\272H" + - "I\272\001F\n\026field_expression_embed\022\033c.a must b" + - "e a multiple of 4\032\017this.a % 4 == 0R\001c\032\\\n" + - "\006Nested\022R\n\001a\030\001 \001(\005BD\272HA\272\001>\n\027field_expres" + - "sion_nested\032#this > 0 ? \'\': \'a must be p" + - "ositive\'R\001a\"R\n\014MissingField\022\014\n\001a\030\001 \001(\005R\001" + - "a:4\272H1\032/\n\rmissing_field\022\022b must be posit" + - "ive\032\nthis.b > 0\"g\n\rIncorrectType\022\014\n\001a\030\001 " + - "\001(\005R\001a:H\272HE\032C\n\016incorrect_type\022\027a must st" + - "art with \'foo\'\032\030this.a.startsWith(\'foo\')" + - "\"}\n\017DynRuntimeError\022\014\n\001a\030\001 \001(\005R\001a:\\\272HY\032W" + - "\n\017dyn_runtime_err\022.dynamic type tries to" + - " use a non-existent field\032\024dyn(this).b =" + - "= \'foo\'\"\\\n\014NowEqualsNow:L\272HI\032G\n\016now_equa" + - "ls_now\022)now should equal now within an e" + - "xpression\032\nnow == now**\n\004Enum\022\024\n\020ENUM_UN" + - "SPECIFIED\020\000\022\014\n\010ENUM_ONE\020\001B\267\002\n7build.buf." + - "validate.conformance.cases.custom_constr" + - "aintsB\026CustomConstraintsProtoP\001\242\002\005BVCCC\252" + - "\0020Buf.Validate.Conformance.Cases.CustomC" + - "onstraints\312\0020Buf\\Validate\\Conformance\\Ca" + - "ses\\CustomConstraints\342\002 builder) { - super(builder); - } - private DynRuntimeError() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.class, build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - 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.custom_constraints.DynRuntimeError)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError other = (build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError) obj; - - if (getA() - != other.getA()) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError 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.custom_constraints.DynRuntimeError} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.DynRuntimeError) - build.buf.validate.conformance.cases.custom_constraints.DynRuntimeErrorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.class, build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_DynRuntimeError_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError build() { - build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError result = new build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a"]; - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a"]; - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.DynRuntimeError) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.DynRuntimeError) - private static final build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DynRuntimeError 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.custom_constraints.DynRuntimeError getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/DynRuntimeErrorOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/DynRuntimeErrorOrBuilder.java deleted file mode 100644 index de25215b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/DynRuntimeErrorOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface DynRuntimeErrorOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.DynRuntimeError) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - int getA(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/Enum.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/Enum.java deleted file mode 100644 index 36319f15..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/Enum.java +++ /dev/null @@ -1,124 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - * Protobuf enum {@code buf.validate.conformance.cases.custom_constraints.Enum} - */ -public enum Enum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ENUM_UNSPECIFIED = 0; - */ - ENUM_UNSPECIFIED(0), - /** - * ENUM_ONE = 1; - */ - ENUM_ONE(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Enum.class.getName()); - } - /** - * ENUM_UNSPECIFIED = 0; - */ - public static final int ENUM_UNSPECIFIED_VALUE = 0; - /** - * ENUM_ONE = 1; - */ - public static final int ENUM_ONE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Enum valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Enum forNumber(int value) { - switch (value) { - case 0: return ENUM_UNSPECIFIED; - case 1: return ENUM_ONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Enum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Enum findValueByNumber(int number) { - return Enum.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Enum[] VALUES = values(); - - public static Enum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Enum(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.custom_constraints.Enum) -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressions.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressions.java deleted file mode 100644 index 183a8437..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressions.java +++ /dev/null @@ -1,1152 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.FieldExpressions} - */ -public final class FieldExpressions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.FieldExpressions) - FieldExpressionsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FieldExpressions.class.getName()); - } - // Use FieldExpressions.newBuilder() to construct. - private FieldExpressions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FieldExpressions() { - b_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.class, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Builder.class); - } - - public interface NestedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - int getA(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested} - */ - public static final class Nested extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) - NestedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Nested.class.getName()); - } - // Use Nested.newBuilder() to construct. - private Nested(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Nested() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.class, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - 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.custom_constraints.FieldExpressions.Nested)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested other = (build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) obj; - - if (getA() - != other.getA()) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested 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.custom_constraints.FieldExpressions.Nested} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.class, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_Nested_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested build() { - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested result = new build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested) - private static final build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Nested 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.custom_constraints.FieldExpressions.Nested getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private int b_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for b. - */ - @java.lang.Override public int getBValue() { - return b_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - @java.lang.Override public build.buf.validate.conformance.cases.custom_constraints.Enum getB() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(b_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - - public static final int C_FIELD_NUMBER = 3; - private build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c_; - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - @java.lang.Override - public boolean hasC() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested getC() { - return c_ == null ? build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance() : c_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder getCOrBuilder() { - return c_ == null ? build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance() : c_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - if (b_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(2, b_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getC()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - if (b_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, b_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getC()); - } - 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.custom_constraints.FieldExpressions)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions other = (build.buf.validate.conformance.cases.custom_constraints.FieldExpressions) obj; - - if (getA() - != other.getA()) return false; - if (b_ != other.b_) return false; - if (hasC() != other.hasC()) return false; - if (hasC()) { - if (!getC() - .equals(other.getC())) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + b_; - if (hasC()) { - hash = (37 * hash) + C_FIELD_NUMBER; - hash = (53 * hash) + getC().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions 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.custom_constraints.FieldExpressions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.FieldExpressions) - build.buf.validate.conformance.cases.custom_constraints.FieldExpressionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.class, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getCFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = 0; - c_ = null; - if (cBuilder_ != null) { - cBuilder_.dispose(); - cBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_FieldExpressions_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions build() { - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions result = new build.buf.validate.conformance.cases.custom_constraints.FieldExpressions(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.FieldExpressions result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = b_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.c_ = cBuilder_ == null - ? c_ - : cBuilder_.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.custom_constraints.FieldExpressions) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.FieldExpressions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.FieldExpressions other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - if (other.b_ != 0) { - setBValue(other.getBValue()); - } - if (other.hasC()) { - mergeC(other.getC()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - b_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getCFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private int b_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for b. - */ - @java.lang.Override public int getBValue() { - return b_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for b to set. - * @return This builder for chaining. - */ - public Builder setBValue(int value) { - b_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.Enum getB() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(b_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB(build.buf.validate.conformance.cases.custom_constraints.Enum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - b_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = 0; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder> cBuilder_; - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - public boolean hasC() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested getC() { - if (cBuilder_ == null) { - return c_ == null ? build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance() : c_; - } else { - return cBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - public Builder setC(build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested value) { - if (cBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - c_ = value; - } else { - cBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - public Builder setC( - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder builderForValue) { - if (cBuilder_ == null) { - c_ = builderForValue.build(); - } else { - cBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - public Builder mergeC(build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested value) { - if (cBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - c_ != null && - c_ != build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance()) { - getCBuilder().mergeFrom(value); - } else { - c_ = value; - } - } else { - cBuilder_.mergeFrom(value); - } - if (c_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - public Builder clearC() { - bitField0_ = (bitField0_ & ~0x00000004); - c_ = null; - if (cBuilder_ != null) { - cBuilder_.dispose(); - cBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder getCBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getCFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - public build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder getCOrBuilder() { - if (cBuilder_ != null) { - return cBuilder_.getMessageOrBuilder(); - } else { - return c_ == null ? - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.getDefaultInstance() : c_; - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder> - getCFieldBuilder() { - if (cBuilder_ == null) { - cBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder>( - getC(), - getParentForChildren(), - isClean()); - c_ = null; - } - return cBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.FieldExpressions) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.FieldExpressions) - private static final build.buf.validate.conformance.cases.custom_constraints.FieldExpressions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.FieldExpressions(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.FieldExpressions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FieldExpressions 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.custom_constraints.FieldExpressions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressionsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressionsOrBuilder.java deleted file mode 100644 index 27aa7e96..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/FieldExpressionsOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface FieldExpressionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.FieldExpressions) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } - * @return The a. - */ - int getA(); - - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for b. - */ - int getBValue(); - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b", (.buf.validate.field) = { ... } - * @return The b. - */ - build.buf.validate.conformance.cases.custom_constraints.Enum getB(); - - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - * @return Whether the c field is set. - */ - boolean hasC(); - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - * @return The c. - */ - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested getC(); - /** - * .buf.validate.conformance.cases.custom_constraints.FieldExpressions.Nested c = 3 [json_name = "c", (.buf.validate.field) = { ... } - */ - build.buf.validate.conformance.cases.custom_constraints.FieldExpressions.NestedOrBuilder getCOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectType.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectType.java deleted file mode 100644 index dafb40d8..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectType.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.IncorrectType} - */ -public final class IncorrectType extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.IncorrectType) - IncorrectTypeOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - IncorrectType.class.getName()); - } - // Use IncorrectType.newBuilder() to construct. - private IncorrectType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private IncorrectType() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.IncorrectType.class, build.buf.validate.conformance.cases.custom_constraints.IncorrectType.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - 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.custom_constraints.IncorrectType)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.IncorrectType other = (build.buf.validate.conformance.cases.custom_constraints.IncorrectType) obj; - - if (getA() - != other.getA()) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType 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.custom_constraints.IncorrectType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.IncorrectType) - build.buf.validate.conformance.cases.custom_constraints.IncorrectTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.IncorrectType.class, build.buf.validate.conformance.cases.custom_constraints.IncorrectType.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.IncorrectType.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_IncorrectType_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.IncorrectType getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.IncorrectType.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.IncorrectType build() { - build.buf.validate.conformance.cases.custom_constraints.IncorrectType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.IncorrectType buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.IncorrectType result = new build.buf.validate.conformance.cases.custom_constraints.IncorrectType(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.IncorrectType result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.IncorrectType) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.IncorrectType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.IncorrectType other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.IncorrectType.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a"]; - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a"]; - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.IncorrectType) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.IncorrectType) - private static final build.buf.validate.conformance.cases.custom_constraints.IncorrectType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.IncorrectType(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.IncorrectType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IncorrectType 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.custom_constraints.IncorrectType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectTypeOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectTypeOrBuilder.java deleted file mode 100644 index 3138469c..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/IncorrectTypeOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface IncorrectTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.IncorrectType) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - int getA(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressions.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressions.java deleted file mode 100644 index fe29d059..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressions.java +++ /dev/null @@ -1,1577 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - *
- * A message with message-level custom expressions
- * 
- * - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.MessageExpressions} - */ -public final class MessageExpressions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.MessageExpressions) - MessageExpressionsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageExpressions.class.getName()); - } - // Use MessageExpressions.newBuilder() to construct. - private MessageExpressions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageExpressions() { - c_ = 0; - d_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.class, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Builder.class); - } - - public interface NestedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - int getA(); - - /** - * int32 b = 2 [json_name = "b"]; - * @return The b. - */ - int getB(); - } - /** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested} - */ - public static final class Nested extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) - NestedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Nested.class.getName()); - } - // Use Nested.newBuilder() to construct. - private Nested(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Nested() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.class, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private int b_ = 0; - /** - * int32 b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public int getB() { - return b_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - if (b_ != 0) { - output.writeInt32(2, b_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - if (b_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, b_); - } - 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.custom_constraints.MessageExpressions.Nested)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested other = (build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) obj; - - if (getA() - != other.getA()) return false; - if (getB() - != other.getB()) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested 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.custom_constraints.MessageExpressions.Nested} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.class, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_Nested_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested build() { - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested result = new build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = b_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - if (other.getB() != 0) { - setB(other.getB()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - b_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a"]; - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a"]; - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private int b_ ; - /** - * int32 b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public int getB() { - return b_; - } - /** - * int32 b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB(int value) { - - b_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * int32 b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested) - private static final build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Nested 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.custom_constraints.MessageExpressions.Nested getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private int b_ = 0; - /** - * int32 b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public int getB() { - return b_; - } - - public static final int C_FIELD_NUMBER = 3; - private int c_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return The enum numeric value on the wire for c. - */ - @java.lang.Override public int getCValue() { - return c_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return The c. - */ - @java.lang.Override public build.buf.validate.conformance.cases.custom_constraints.Enum getC() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(c_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - - public static final int D_FIELD_NUMBER = 4; - private int d_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return The enum numeric value on the wire for d. - */ - @java.lang.Override public int getDValue() { - return d_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return The d. - */ - @java.lang.Override public build.buf.validate.conformance.cases.custom_constraints.Enum getD() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(d_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - - public static final int E_FIELD_NUMBER = 5; - private build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e_; - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - * @return Whether the e field is set. - */ - @java.lang.Override - public boolean hasE() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - * @return The e. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getE() { - return e_ == null ? build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : e_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder getEOrBuilder() { - return e_ == null ? build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : e_; - } - - public static final int F_FIELD_NUMBER = 6; - private build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f_; - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - * @return Whether the f field is set. - */ - @java.lang.Override - public boolean hasF() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - * @return The f. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getF() { - return f_ == null ? build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : f_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder getFOrBuilder() { - return f_ == null ? build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : f_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - if (b_ != 0) { - output.writeInt32(2, b_); - } - if (c_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(3, c_); - } - if (d_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(4, d_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getE()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(6, getF()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - if (b_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, b_); - } - if (c_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, c_); - } - if (d_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, d_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getE()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getF()); - } - 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.custom_constraints.MessageExpressions)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions other = (build.buf.validate.conformance.cases.custom_constraints.MessageExpressions) obj; - - if (getA() - != other.getA()) return false; - if (getB() - != other.getB()) return false; - if (c_ != other.c_) return false; - if (d_ != other.d_) return false; - if (hasE() != other.hasE()) return false; - if (hasE()) { - if (!getE() - .equals(other.getE())) return false; - } - if (hasF() != other.hasF()) return false; - if (hasF()) { - if (!getF() - .equals(other.getF())) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB(); - hash = (37 * hash) + C_FIELD_NUMBER; - hash = (53 * hash) + c_; - hash = (37 * hash) + D_FIELD_NUMBER; - hash = (53 * hash) + d_; - if (hasE()) { - hash = (37 * hash) + E_FIELD_NUMBER; - hash = (53 * hash) + getE().hashCode(); - } - if (hasF()) { - hash = (37 * hash) + F_FIELD_NUMBER; - hash = (53 * hash) + getF().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions 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.custom_constraints.MessageExpressions 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; - } - /** - *
-   * A message with message-level custom expressions
-   * 
- * - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.MessageExpressions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.MessageExpressions) - build.buf.validate.conformance.cases.custom_constraints.MessageExpressionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.class, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getEFieldBuilder(); - getFFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = 0; - c_ = 0; - d_ = 0; - e_ = null; - if (eBuilder_ != null) { - eBuilder_.dispose(); - eBuilder_ = null; - } - f_ = null; - if (fBuilder_ != null) { - fBuilder_.dispose(); - fBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MessageExpressions_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions build() { - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions result = new build.buf.validate.conformance.cases.custom_constraints.MessageExpressions(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = b_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.c_ = c_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.d_ = d_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.e_ = eBuilder_ == null - ? e_ - : eBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.f_ = fBuilder_ == null - ? f_ - : fBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.MessageExpressions) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.MessageExpressions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - if (other.getB() != 0) { - setB(other.getB()); - } - if (other.c_ != 0) { - setCValue(other.getCValue()); - } - if (other.d_ != 0) { - setDValue(other.getDValue()); - } - if (other.hasE()) { - mergeE(other.getE()); - } - if (other.hasF()) { - mergeF(other.getF()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - b_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - c_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: { - d_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: { - input.readMessage( - getEFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: { - input.readMessage( - getFFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a"]; - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a"]; - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private int b_ ; - /** - * int32 b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public int getB() { - return b_; - } - /** - * int32 b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB(int value) { - - b_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * int32 b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = 0; - onChanged(); - return this; - } - - private int c_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return The enum numeric value on the wire for c. - */ - @java.lang.Override public int getCValue() { - return c_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @param value The enum numeric value on the wire for c to set. - * @return This builder for chaining. - */ - public Builder setCValue(int value) { - c_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return The c. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.Enum getC() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(c_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @param value The c to set. - * @return This builder for chaining. - */ - public Builder setC(build.buf.validate.conformance.cases.custom_constraints.Enum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - c_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return This builder for chaining. - */ - public Builder clearC() { - bitField0_ = (bitField0_ & ~0x00000004); - c_ = 0; - onChanged(); - return this; - } - - private int d_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return The enum numeric value on the wire for d. - */ - @java.lang.Override public int getDValue() { - return d_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @param value The enum numeric value on the wire for d to set. - * @return This builder for chaining. - */ - public Builder setDValue(int value) { - d_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return The d. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.Enum getD() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(d_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @param value The d to set. - * @return This builder for chaining. - */ - public Builder setD(build.buf.validate.conformance.cases.custom_constraints.Enum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - d_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return This builder for chaining. - */ - public Builder clearD() { - bitField0_ = (bitField0_ & ~0x00000008); - d_ = 0; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder> eBuilder_; - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - * @return Whether the e field is set. - */ - public boolean hasE() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - * @return The e. - */ - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getE() { - if (eBuilder_ == null) { - return e_ == null ? build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : e_; - } else { - return eBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - public Builder setE(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested value) { - if (eBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - e_ = value; - } else { - eBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - public Builder setE( - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder builderForValue) { - if (eBuilder_ == null) { - e_ = builderForValue.build(); - } else { - eBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - public Builder mergeE(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested value) { - if (eBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - e_ != null && - e_ != build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance()) { - getEBuilder().mergeFrom(value); - } else { - e_ = value; - } - } else { - eBuilder_.mergeFrom(value); - } - if (e_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - public Builder clearE() { - bitField0_ = (bitField0_ & ~0x00000010); - e_ = null; - if (eBuilder_ != null) { - eBuilder_.dispose(); - eBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder getEBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getEFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder getEOrBuilder() { - if (eBuilder_ != null) { - return eBuilder_.getMessageOrBuilder(); - } else { - return e_ == null ? - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : e_; - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder> - getEFieldBuilder() { - if (eBuilder_ == null) { - eBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder>( - getE(), - getParentForChildren(), - isClean()); - e_ = null; - } - return eBuilder_; - } - - private build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder> fBuilder_; - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - * @return Whether the f field is set. - */ - public boolean hasF() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - * @return The f. - */ - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getF() { - if (fBuilder_ == null) { - return f_ == null ? build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : f_; - } else { - return fBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - public Builder setF(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested value) { - if (fBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - f_ = value; - } else { - fBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - public Builder setF( - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder builderForValue) { - if (fBuilder_ == null) { - f_ = builderForValue.build(); - } else { - fBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - public Builder mergeF(build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested value) { - if (fBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && - f_ != null && - f_ != build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance()) { - getFBuilder().mergeFrom(value); - } else { - f_ = value; - } - } else { - fBuilder_.mergeFrom(value); - } - if (f_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - public Builder clearF() { - bitField0_ = (bitField0_ & ~0x00000020); - f_ = null; - if (fBuilder_ != null) { - fBuilder_.dispose(); - fBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder getFBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getFFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - public build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder getFOrBuilder() { - if (fBuilder_ != null) { - return fBuilder_.getMessageOrBuilder(); - } else { - return f_ == null ? - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.getDefaultInstance() : f_; - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder> - getFFieldBuilder() { - if (fBuilder_ == null) { - fBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder>( - getF(), - getParentForChildren(), - isClean()); - f_ = null; - } - return fBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.MessageExpressions) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.MessageExpressions) - private static final build.buf.validate.conformance.cases.custom_constraints.MessageExpressions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.MessageExpressions(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.MessageExpressions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageExpressions 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.custom_constraints.MessageExpressions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressionsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressionsOrBuilder.java deleted file mode 100644 index 79f0678e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MessageExpressionsOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface MessageExpressionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.MessageExpressions) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - int getA(); - - /** - * int32 b = 2 [json_name = "b"]; - * @return The b. - */ - int getB(); - - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return The enum numeric value on the wire for c. - */ - int getCValue(); - /** - * .buf.validate.conformance.cases.custom_constraints.Enum c = 3 [json_name = "c"]; - * @return The c. - */ - build.buf.validate.conformance.cases.custom_constraints.Enum getC(); - - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return The enum numeric value on the wire for d. - */ - int getDValue(); - /** - * .buf.validate.conformance.cases.custom_constraints.Enum d = 4 [json_name = "d"]; - * @return The d. - */ - build.buf.validate.conformance.cases.custom_constraints.Enum getD(); - - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - * @return Whether the e field is set. - */ - boolean hasE(); - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - * @return The e. - */ - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getE(); - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested e = 5 [json_name = "e"]; - */ - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder getEOrBuilder(); - - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - * @return Whether the f field is set. - */ - boolean hasF(); - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - * @return The f. - */ - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested getF(); - /** - * .buf.validate.conformance.cases.custom_constraints.MessageExpressions.Nested f = 6 [json_name = "f"]; - */ - build.buf.validate.conformance.cases.custom_constraints.MessageExpressions.NestedOrBuilder getFOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingField.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingField.java deleted file mode 100644 index 5e1b0867..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingField.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.MissingField} - */ -public final class MissingField extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.MissingField) - MissingFieldOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MissingField.class.getName()); - } - // Use MissingField.newBuilder() to construct. - private MissingField(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MissingField() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.MissingField.class, build.buf.validate.conformance.cases.custom_constraints.MissingField.Builder.class); - } - - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - 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.custom_constraints.MissingField)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.MissingField other = (build.buf.validate.conformance.cases.custom_constraints.MissingField) obj; - - if (getA() - != other.getA()) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.MissingField parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MissingField 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.custom_constraints.MissingField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MissingField 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.custom_constraints.MissingField parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.MissingField 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.custom_constraints.MissingField parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.MissingField 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.custom_constraints.MissingField parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.MissingField 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.custom_constraints.MissingField 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.custom_constraints.MissingField 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.custom_constraints.MissingField 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.custom_constraints.MissingField} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.MissingField) - build.buf.validate.conformance.cases.custom_constraints.MissingFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.MissingField.class, build.buf.validate.conformance.cases.custom_constraints.MissingField.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.MissingField.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_MissingField_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MissingField getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.MissingField.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MissingField build() { - build.buf.validate.conformance.cases.custom_constraints.MissingField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.MissingField buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.MissingField result = new build.buf.validate.conformance.cases.custom_constraints.MissingField(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.MissingField result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.MissingField) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.MissingField)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.MissingField other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.MissingField.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a"]; - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a"]; - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.MissingField) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.MissingField) - private static final build.buf.validate.conformance.cases.custom_constraints.MissingField DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.MissingField(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.MissingField getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MissingField 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.custom_constraints.MissingField getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingFieldOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingFieldOrBuilder.java deleted file mode 100644 index 9e4af008..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/MissingFieldOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface MissingFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.MissingField) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - int getA(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressions.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressions.java deleted file mode 100644 index 336de784..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressions.java +++ /dev/null @@ -1,1081 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - *
- * A message that does not contain any expressions
- * 
- * - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.NoExpressions} - */ -public final class NoExpressions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.NoExpressions) - NoExpressionsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - NoExpressions.class.getName()); - } - // Use NoExpressions.newBuilder() to construct. - private NoExpressions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NoExpressions() { - b_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.class, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Builder.class); - } - - public interface NestedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested} - */ - public static final class Nested extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) - NestedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Nested.class.getName()); - } - // Use Nested.newBuilder() to construct. - private Nested(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Nested() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.class, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder.class); - } - - 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 { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.custom_constraints.NoExpressions.Nested)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested other = (build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) obj; - - 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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested 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.custom_constraints.NoExpressions.Nested} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.class, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_Nested_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested build() { - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested result = new build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance()) return this; - 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; - 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; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested) - private static final build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Nested 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.custom_constraints.NoExpressions.Nested getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int A_FIELD_NUMBER = 1; - private int a_ = 0; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - - public static final int B_FIELD_NUMBER = 2; - private int b_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return The enum numeric value on the wire for b. - */ - @java.lang.Override public int getBValue() { - return b_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override public build.buf.validate.conformance.cases.custom_constraints.Enum getB() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(b_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - - public static final int C_FIELD_NUMBER = 3; - private build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c_; - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - * @return Whether the c field is set. - */ - @java.lang.Override - public boolean hasC() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - * @return The c. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested getC() { - return c_ == null ? build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance() : c_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder getCOrBuilder() { - return c_ == null ? build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance() : c_; - } - - 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 (a_ != 0) { - output.writeInt32(1, a_); - } - if (b_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(2, b_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getC()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (a_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); - } - if (b_ != build.buf.validate.conformance.cases.custom_constraints.Enum.ENUM_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, b_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getC()); - } - 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.custom_constraints.NoExpressions)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.NoExpressions other = (build.buf.validate.conformance.cases.custom_constraints.NoExpressions) obj; - - if (getA() - != other.getA()) return false; - if (b_ != other.b_) return false; - if (hasC() != other.hasC()) return false; - if (hasC()) { - if (!getC() - .equals(other.getC())) 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(); - hash = (37 * hash) + A_FIELD_NUMBER; - hash = (53 * hash) + getA(); - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + b_; - if (hasC()) { - hash = (37 * hash) + C_FIELD_NUMBER; - hash = (53 * hash) + getC().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions 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.custom_constraints.NoExpressions 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; - } - /** - *
-   * A message that does not contain any expressions
-   * 
- * - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.NoExpressions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.NoExpressions) - build.buf.validate.conformance.cases.custom_constraints.NoExpressionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.class, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.NoExpressions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getCFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - a_ = 0; - b_ = 0; - c_ = null; - if (cBuilder_ != null) { - cBuilder_.dispose(); - cBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NoExpressions_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.NoExpressions.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions build() { - build.buf.validate.conformance.cases.custom_constraints.NoExpressions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.NoExpressions result = new build.buf.validate.conformance.cases.custom_constraints.NoExpressions(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.custom_constraints.NoExpressions result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.a_ = a_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.b_ = b_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.c_ = cBuilder_ == null - ? c_ - : cBuilder_.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.custom_constraints.NoExpressions) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.NoExpressions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.NoExpressions other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.NoExpressions.getDefaultInstance()) return this; - if (other.getA() != 0) { - setA(other.getA()); - } - if (other.b_ != 0) { - setBValue(other.getBValue()); - } - if (other.hasC()) { - mergeC(other.getC()); - } - 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 8: { - a_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - b_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getCFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - 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 int a_ ; - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - @java.lang.Override - public int getA() { - return a_; - } - /** - * int32 a = 1 [json_name = "a"]; - * @param value The a to set. - * @return This builder for chaining. - */ - public Builder setA(int value) { - - a_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int32 a = 1 [json_name = "a"]; - * @return This builder for chaining. - */ - public Builder clearA() { - bitField0_ = (bitField0_ & ~0x00000001); - a_ = 0; - onChanged(); - return this; - } - - private int b_ = 0; - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return The enum numeric value on the wire for b. - */ - @java.lang.Override public int getBValue() { - return b_; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @param value The enum numeric value on the wire for b to set. - * @return This builder for chaining. - */ - public Builder setBValue(int value) { - b_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return The b. - */ - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.Enum getB() { - build.buf.validate.conformance.cases.custom_constraints.Enum result = build.buf.validate.conformance.cases.custom_constraints.Enum.forNumber(b_); - return result == null ? build.buf.validate.conformance.cases.custom_constraints.Enum.UNRECOGNIZED : result; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @param value The b to set. - * @return This builder for chaining. - */ - public Builder setB(build.buf.validate.conformance.cases.custom_constraints.Enum value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - b_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return This builder for chaining. - */ - public Builder clearB() { - bitField0_ = (bitField0_ & ~0x00000002); - b_ = 0; - onChanged(); - return this; - } - - private build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder> cBuilder_; - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - * @return Whether the c field is set. - */ - public boolean hasC() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - * @return The c. - */ - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested getC() { - if (cBuilder_ == null) { - return c_ == null ? build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance() : c_; - } else { - return cBuilder_.getMessage(); - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - public Builder setC(build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested value) { - if (cBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - c_ = value; - } else { - cBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - public Builder setC( - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder builderForValue) { - if (cBuilder_ == null) { - c_ = builderForValue.build(); - } else { - cBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - public Builder mergeC(build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested value) { - if (cBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - c_ != null && - c_ != build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance()) { - getCBuilder().mergeFrom(value); - } else { - c_ = value; - } - } else { - cBuilder_.mergeFrom(value); - } - if (c_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - public Builder clearC() { - bitField0_ = (bitField0_ & ~0x00000004); - c_ = null; - if (cBuilder_ != null) { - cBuilder_.dispose(); - cBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder getCBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getCFieldBuilder().getBuilder(); - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - public build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder getCOrBuilder() { - if (cBuilder_ != null) { - return cBuilder_.getMessageOrBuilder(); - } else { - return c_ == null ? - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.getDefaultInstance() : c_; - } - } - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder> - getCFieldBuilder() { - if (cBuilder_ == null) { - cBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested.Builder, build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder>( - getC(), - getParentForChildren(), - isClean()); - c_ = null; - } - return cBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.NoExpressions) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.NoExpressions) - private static final build.buf.validate.conformance.cases.custom_constraints.NoExpressions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.NoExpressions(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.NoExpressions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NoExpressions 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.custom_constraints.NoExpressions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressionsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressionsOrBuilder.java deleted file mode 100644 index ae53da2e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NoExpressionsOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface NoExpressionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.NoExpressions) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 a = 1 [json_name = "a"]; - * @return The a. - */ - int getA(); - - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return The enum numeric value on the wire for b. - */ - int getBValue(); - /** - * .buf.validate.conformance.cases.custom_constraints.Enum b = 2 [json_name = "b"]; - * @return The b. - */ - build.buf.validate.conformance.cases.custom_constraints.Enum getB(); - - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - * @return Whether the c field is set. - */ - boolean hasC(); - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - * @return The c. - */ - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested getC(); - /** - * .buf.validate.conformance.cases.custom_constraints.NoExpressions.Nested c = 3 [json_name = "c"]; - */ - build.buf.validate.conformance.cases.custom_constraints.NoExpressions.NestedOrBuilder getCOrBuilder(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNow.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNow.java deleted file mode 100644 index ca196a0a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNow.java +++ /dev/null @@ -1,358 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -/** - * Protobuf type {@code buf.validate.conformance.cases.custom_constraints.NowEqualsNow} - */ -public final class NowEqualsNow extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.custom_constraints.NowEqualsNow) - NowEqualsNowOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - NowEqualsNow.class.getName()); - } - // Use NowEqualsNow.newBuilder() to construct. - private NowEqualsNow(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NowEqualsNow() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.class, build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.Builder.class); - } - - 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 { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.custom_constraints.NowEqualsNow)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow other = (build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow) obj; - - 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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow 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.custom_constraints.NowEqualsNow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.custom_constraints.NowEqualsNow) - build.buf.validate.conformance.cases.custom_constraints.NowEqualsNowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.class, build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.custom_constraints.CustomConstraintsProto.internal_static_buf_validate_conformance_cases_custom_constraints_NowEqualsNow_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow build() { - build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow buildPartial() { - build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow result = new build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow) { - return mergeFrom((build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow other) { - if (other == build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow.getDefaultInstance()) return this; - 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; - 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; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.custom_constraints.NowEqualsNow) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.custom_constraints.NowEqualsNow) - private static final build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow(); - } - - public static build.buf.validate.conformance.cases.custom_constraints.NowEqualsNow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NowEqualsNow 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.custom_constraints.NowEqualsNow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNowOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNowOrBuilder.java deleted file mode 100644 index eda8e2e6..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/custom_constraints/NowEqualsNowOrBuilder.java +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/custom_constraints/custom_constraints.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.custom_constraints; - -public interface NowEqualsNowOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.custom_constraints.NowEqualsNow) - com.google.protobuf.MessageOrBuilder { -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/Embed.java b/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/Embed.java deleted file mode 100644 index 67082877..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/Embed.java +++ /dev/null @@ -1,1029 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/other_package/embed.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.other_package; - -/** - *
- * Validate message embedding across packages.
- * 
- * - * Protobuf type {@code buf.validate.conformance.cases.other_package.Embed} - */ -public final class Embed extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.other_package.Embed) - EmbedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Embed.class.getName()); - } - // Use Embed.newBuilder() to construct. - private Embed(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Embed() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.other_package.Embed.class, build.buf.validate.conformance.cases.other_package.Embed.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.other_package.Embed.Enumerated} - */ - public enum Enumerated - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ENUMERATED_UNSPECIFIED = 0; - */ - ENUMERATED_UNSPECIFIED(0), - /** - * ENUMERATED_VALUE = 1; - */ - ENUMERATED_VALUE(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Enumerated.class.getName()); - } - /** - * ENUMERATED_UNSPECIFIED = 0; - */ - public static final int ENUMERATED_UNSPECIFIED_VALUE = 0; - /** - * ENUMERATED_VALUE = 1; - */ - public static final int ENUMERATED_VALUE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Enumerated valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Enumerated forNumber(int value) { - switch (value) { - case 0: return ENUMERATED_UNSPECIFIED; - case 1: return ENUMERATED_VALUE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Enumerated> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Enumerated findValueByNumber(int number) { - return Enumerated.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.other_package.Embed.getDescriptor().getEnumTypes().get(0); - } - - private static final Enumerated[] VALUES = values(); - - public static Enumerated valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Enumerated(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.other_package.Embed.Enumerated) - } - - public interface DoubleEmbedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code buf.validate.conformance.cases.other_package.Embed.DoubleEmbed} - */ - public static final class DoubleEmbed extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) - DoubleEmbedOrBuilder { - private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleEmbed.class.getName()); - } - // Use DoubleEmbed.newBuilder() to construct. - private DoubleEmbed(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DoubleEmbed() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.class, build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated} - */ - public enum DoubleEnumerated - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DOUBLE_ENUMERATED_UNSPECIFIED = 0; - */ - DOUBLE_ENUMERATED_UNSPECIFIED(0), - /** - * DOUBLE_ENUMERATED_VALUE = 1; - */ - DOUBLE_ENUMERATED_VALUE(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleEnumerated.class.getName()); - } - /** - * DOUBLE_ENUMERATED_UNSPECIFIED = 0; - */ - public static final int DOUBLE_ENUMERATED_UNSPECIFIED_VALUE = 0; - /** - * DOUBLE_ENUMERATED_VALUE = 1; - */ - public static final int DOUBLE_ENUMERATED_VALUE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DoubleEnumerated valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DoubleEnumerated forNumber(int value) { - switch (value) { - case 0: return DOUBLE_ENUMERATED_UNSPECIFIED; - case 1: return DOUBLE_ENUMERATED_VALUE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DoubleEnumerated> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DoubleEnumerated findValueByNumber(int number) { - return DoubleEnumerated.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.getDescriptor().getEnumTypes().get(0); - } - - private static final DoubleEnumerated[] VALUES = values(); - - public static DoubleEnumerated valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DoubleEnumerated(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.DoubleEnumerated) - } - - 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 { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.other_package.Embed.DoubleEmbed)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed other = (build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) obj; - - 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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed 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.other_package.Embed.DoubleEmbed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.class, build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed build() { - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed buildPartial() { - build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed result = new build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) { - return mergeFrom((build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed other) { - if (other == build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed.getDefaultInstance()) return this; - 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; - 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; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.other_package.Embed.DoubleEmbed) - private static final build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed(); - } - - public static build.buf.validate.conformance.cases.other_package.Embed.DoubleEmbed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleEmbed 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.other_package.Embed.DoubleEmbed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.other_package.Embed)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.other_package.Embed other = (build.buf.validate.conformance.cases.other_package.Embed) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.other_package.Embed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.other_package.Embed 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.other_package.Embed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.other_package.Embed 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.other_package.Embed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.other_package.Embed 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.other_package.Embed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.other_package.Embed 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.other_package.Embed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.other_package.Embed 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.other_package.Embed 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.other_package.Embed 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.other_package.Embed 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; - } - /** - *
-   * Validate message embedding across packages.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.cases.other_package.Embed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.other_package.Embed) - build.buf.validate.conformance.cases.other_package.EmbedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.other_package.Embed.class, build.buf.validate.conformance.cases.other_package.Embed.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.other_package.Embed.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.other_package.EmbedProto.internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed build() { - build.buf.validate.conformance.cases.other_package.Embed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.other_package.Embed buildPartial() { - build.buf.validate.conformance.cases.other_package.Embed result = new build.buf.validate.conformance.cases.other_package.Embed(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.other_package.Embed result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.other_package.Embed) { - return mergeFrom((build.buf.validate.conformance.cases.other_package.Embed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.other_package.Embed other) { - if (other == build.buf.validate.conformance.cases.other_package.Embed.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.other_package.Embed) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.other_package.Embed) - private static final build.buf.validate.conformance.cases.other_package.Embed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.other_package.Embed(); - } - - public static build.buf.validate.conformance.cases.other_package.Embed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Embed 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.other_package.Embed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedOrBuilder.java deleted file mode 100644 index 2ed00b86..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedOrBuilder.java +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/other_package/embed.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.other_package; - -public interface EmbedOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.other_package.Embed) - com.google.protobuf.MessageOrBuilder { - - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedProto.java deleted file mode 100644 index 4729677b..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/other_package/EmbedProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/other_package/embed.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.other_package; - -public final class EmbedProto { - private EmbedProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EmbedProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_other_package_Embed_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n8buf/validate/conformance/cases/other_p" + - "ackage/embed.proto\022,buf.validate.conform" + - "ance.cases.other_package\032\033buf/validate/v" + - "alidate.proto\"\305\001\n\005Embed\022\031\n\003val\030\001 \001(\003B\007\272H" + - "\004\"\002 \000R\003val\032a\n\013DoubleEmbed\"R\n\020DoubleEnume" + - "rated\022!\n\035DOUBLE_ENUMERATED_UNSPECIFIED\020\000" + - "\022\033\n\027DOUBLE_ENUMERATED_VALUE\020\001\">\n\nEnumera" + - "ted\022\032\n\026ENUMERATED_UNSPECIFIED\020\000\022\024\n\020ENUME" + - "RATED_VALUE\020\001B\222\002\n2build.buf.validate.con" + - "formance.cases.other_packageB\nEmbedProto" + - "P\001\242\002\005BVCCO\252\002+Buf.Validate.Conformance.Ca" + - "ses.OtherPackage\312\002+Buf\\Validate\\Conforma" + - "nce\\Cases\\OtherPackage\342\0027Buf\\Validate\\Co" + - "nformance\\Cases\\OtherPackage\\GPBMetadata" + - "\352\002/Buf::Validate::Conformance::Cases::Ot" + - "herPackageb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_cases_other_package_Embed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor, - new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_descriptor = - internal_static_buf_validate_conformance_cases_other_package_Embed_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_cases_other_package_Embed_DoubleEmbed_descriptor, - new java.lang.String[] { }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.field); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/subdirectory/InSubdirectoryProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/subdirectory/InSubdirectoryProto.java deleted file mode 100644 index 7cb030fc..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/subdirectory/InSubdirectoryProto.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/subdirectory/in_subdirectory.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.subdirectory; - -public final class InSubdirectoryProto { - private InSubdirectoryProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - InSubdirectoryProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\nAbuf/validate/conformance/cases/subdire" + - "ctory/in_subdirectory.proto\022+buf.validat" + - "e.conformance.cases.subdirectory\032\033buf/va" + - "lidate/validate.protoB\232\002\n1build.buf.vali" + - "date.conformance.cases.subdirectoryB\023InS" + - "ubdirectoryProtoP\001\242\002\005BVCCS\252\002+Buf.Validat" + - "e.Conformance.Cases.Subdirectory\312\002+Buf\\V" + - "alidate\\Conformance\\Cases\\Subdirectory\342\002" + - "7Buf\\Validate\\Conformance\\Cases\\Subdirec" + - "tory\\GPBMetadata\352\002/Buf::Validate::Confor" + - "mance::Cases::Subdirectoryb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed.java b/conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed.java deleted file mode 100644 index 7096bafe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed.java +++ /dev/null @@ -1,557 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/yet_another_package/embed2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.yet_another_package; - -/** - *
- * Validate message embedding across packages.
- * 
- * - * Protobuf type {@code buf.validate.conformance.cases.yet_another_package.Embed} - */ -public final class Embed extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.yet_another_package.Embed) - EmbedOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Embed.class.getName()); - } - // Use Embed.newBuilder() to construct. - private Embed(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Embed() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.internal_static_buf_validate_conformance_cases_yet_another_package_Embed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.internal_static_buf_validate_conformance_cases_yet_another_package_Embed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.yet_another_package.Embed.class, build.buf.validate.conformance.cases.yet_another_package.Embed.Builder.class); - } - - /** - * Protobuf enum {@code buf.validate.conformance.cases.yet_another_package.Embed.Enumerated} - */ - public enum Enumerated - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ENUMERATED_UNSPECIFIED = 0; - */ - ENUMERATED_UNSPECIFIED(0), - /** - * ENUMERATED_VALUE = 1; - */ - ENUMERATED_VALUE(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Enumerated.class.getName()); - } - /** - * ENUMERATED_UNSPECIFIED = 0; - */ - public static final int ENUMERATED_UNSPECIFIED_VALUE = 0; - /** - * ENUMERATED_VALUE = 1; - */ - public static final int ENUMERATED_VALUE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Enumerated valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Enumerated forNumber(int value) { - switch (value) { - case 0: return ENUMERATED_UNSPECIFIED; - case 1: return ENUMERATED_VALUE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Enumerated> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Enumerated findValueByNumber(int number) { - return Enumerated.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.conformance.cases.yet_another_package.Embed.getDescriptor().getEnumTypes().get(0); - } - - private static final Enumerated[] VALUES = values(); - - public static Enumerated valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Enumerated(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.conformance.cases.yet_another_package.Embed.Enumerated) - } - - public static final int VAL_FIELD_NUMBER = 1; - private long val_ = 0L; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return 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 (val_ != 0L) { - output.writeInt64(1, val_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (val_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, val_); - } - 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.yet_another_package.Embed)) { - return super.equals(obj); - } - build.buf.validate.conformance.cases.yet_another_package.Embed other = (build.buf.validate.conformance.cases.yet_another_package.Embed) obj; - - if (getVal() - != 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(); - hash = (37 * hash) + VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getVal()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.cases.yet_another_package.Embed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.yet_another_package.Embed 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.yet_another_package.Embed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.yet_another_package.Embed 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.yet_another_package.Embed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.cases.yet_another_package.Embed 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.yet_another_package.Embed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.cases.yet_another_package.Embed 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.yet_another_package.Embed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.cases.yet_another_package.Embed 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.yet_another_package.Embed 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.yet_another_package.Embed 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.yet_another_package.Embed 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; - } - /** - *
-   * Validate message embedding across packages.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.cases.yet_another_package.Embed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.yet_another_package.Embed) - build.buf.validate.conformance.cases.yet_another_package.EmbedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.internal_static_buf_validate_conformance_cases_yet_another_package_Embed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.internal_static_buf_validate_conformance_cases_yet_another_package_Embed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.cases.yet_another_package.Embed.class, build.buf.validate.conformance.cases.yet_another_package.Embed.Builder.class); - } - - // Construct using build.buf.validate.conformance.cases.yet_another_package.Embed.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - val_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.cases.yet_another_package.Embed2Proto.internal_static_buf_validate_conformance_cases_yet_another_package_Embed_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.yet_another_package.Embed getDefaultInstanceForType() { - return build.buf.validate.conformance.cases.yet_another_package.Embed.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.cases.yet_another_package.Embed build() { - build.buf.validate.conformance.cases.yet_another_package.Embed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.cases.yet_another_package.Embed buildPartial() { - build.buf.validate.conformance.cases.yet_another_package.Embed result = new build.buf.validate.conformance.cases.yet_another_package.Embed(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.cases.yet_another_package.Embed result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.val_ = val_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.cases.yet_another_package.Embed) { - return mergeFrom((build.buf.validate.conformance.cases.yet_another_package.Embed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.cases.yet_another_package.Embed other) { - if (other == build.buf.validate.conformance.cases.yet_another_package.Embed.getDefaultInstance()) return this; - if (other.getVal() != 0L) { - setVal(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 8: { - val_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 long val_ ; - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - @java.lang.Override - public long getVal() { - return val_; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @param value The val to set. - * @return This builder for chaining. - */ - public Builder setVal(long value) { - - val_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearVal() { - bitField0_ = (bitField0_ & ~0x00000001); - val_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.yet_another_package.Embed) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.yet_another_package.Embed) - private static final build.buf.validate.conformance.cases.yet_another_package.Embed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.yet_another_package.Embed(); - } - - public static build.buf.validate.conformance.cases.yet_another_package.Embed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Embed 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.yet_another_package.Embed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed2Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed2Proto.java deleted file mode 100644 index 66168bff..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/yet_another_package/Embed2Proto.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/cases/yet_another_package/embed2.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.cases.yet_another_package; - -public final class Embed2Proto { - private Embed2Proto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Embed2Proto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_cases_yet_another_package_Embed_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_cases_yet_another_package_Embed_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n?buf/validate/conformance/cases/yet_ano" + - "ther_package/embed2.proto\0222buf.validate." + - "conformance.cases.yet_another_package\032\033b" + - "uf/validate/validate.proto\"b\n\005Embed\022\031\n\003v" + - "al\030\001 \001(\003B\007\272H\004\"\002 \000R\003val\">\n\nEnumerated\022\032\n\026" + - "ENUMERATED_UNSPECIFIED\020\000\022\024\n\020ENUMERATED_V" + - "ALUE\020\001B\255\002\n8build.buf.validate.conformanc" + - "e.cases.yet_another_packageB\013Embed2Proto" + - "P\001\242\002\005BVCCY\252\0020Buf.Validate.Conformance.Ca" + - "ses.YetAnotherPackage\312\0020Buf\\Validate\\Con" + - "formance\\Cases\\YetAnotherPackage\342\002int64 val = 1 [json_name = "val", (.buf.validate.field) = { ... } - * @return The val. - */ - long getVal(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/CaseResult.java b/conformance/src/main/java/build/buf/validate/conformance/harness/CaseResult.java deleted file mode 100644 index 07740c11..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/CaseResult.java +++ /dev/null @@ -1,1410 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * A case result is a single test case result.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.CaseResult} - */ -public final class CaseResult extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.CaseResult) - CaseResultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - CaseResult.class.getName()); - } - // Use CaseResult.newBuilder() to construct. - private CaseResult(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private CaseResult() { - name_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_CaseResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_CaseResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.CaseResult.class, build.buf.validate.conformance.harness.CaseResult.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The case name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The case name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUCCESS_FIELD_NUMBER = 2; - private boolean success_ = false; - /** - *
-   * Success state of the test case. True if the test case succeeded.
-   * 
- * - * bool success = 2 [json_name = "success"]; - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - return success_; - } - - public static final int WANTED_FIELD_NUMBER = 3; - private build.buf.validate.conformance.harness.TestResult wanted_; - /** - *
-   * The expected result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - * @return Whether the wanted field is set. - */ - @java.lang.Override - public boolean hasWanted() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * The expected result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - * @return The wanted. - */ - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult getWanted() { - return wanted_ == null ? build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : wanted_; - } - /** - *
-   * The expected result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.TestResultOrBuilder getWantedOrBuilder() { - return wanted_ == null ? build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : wanted_; - } - - public static final int GOT_FIELD_NUMBER = 4; - private build.buf.validate.conformance.harness.TestResult got_; - /** - *
-   * The actual result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - * @return Whether the got field is set. - */ - @java.lang.Override - public boolean hasGot() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * The actual result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - * @return The got. - */ - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult getGot() { - return got_ == null ? build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : got_; - } - /** - *
-   * The actual result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.TestResultOrBuilder getGotOrBuilder() { - return got_ == null ? build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : got_; - } - - public static final int INPUT_FIELD_NUMBER = 5; - private com.google.protobuf.Any input_; - /** - *
-   * The input used to invoke the test case.
-   * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - * @return Whether the input field is set. - */ - @java.lang.Override - public boolean hasInput() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * The input used to invoke the test case.
-   * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.Any getInput() { - return input_ == null ? com.google.protobuf.Any.getDefaultInstance() : input_; - } - /** - *
-   * The input used to invoke the test case.
-   * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getInputOrBuilder() { - return input_ == null ? com.google.protobuf.Any.getDefaultInstance() : input_; - } - - public static final int EXPECTED_FAILURE_FIELD_NUMBER = 6; - private boolean expectedFailure_ = false; - /** - *
-   * Denotes if the test is expected to fail. True, if the test case was expected to fail.
-   * 
- * - * bool expected_failure = 6 [json_name = "expectedFailure"]; - * @return The expectedFailure. - */ - @java.lang.Override - public boolean getExpectedFailure() { - return expectedFailure_; - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (success_ != false) { - output.writeBool(2, success_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getWanted()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getGot()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(5, getInput()); - } - if (expectedFailure_ != false) { - output.writeBool(6, expectedFailure_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (success_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, success_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getWanted()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getGot()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getInput()); - } - if (expectedFailure_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, expectedFailure_); - } - 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.harness.CaseResult)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.CaseResult other = (build.buf.validate.conformance.harness.CaseResult) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getSuccess() - != other.getSuccess()) return false; - if (hasWanted() != other.hasWanted()) return false; - if (hasWanted()) { - if (!getWanted() - .equals(other.getWanted())) return false; - } - if (hasGot() != other.hasGot()) return false; - if (hasGot()) { - if (!getGot() - .equals(other.getGot())) return false; - } - if (hasInput() != other.hasInput()) return false; - if (hasInput()) { - if (!getInput() - .equals(other.getInput())) return false; - } - if (getExpectedFailure() - != other.getExpectedFailure()) 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(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SUCCESS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getSuccess()); - if (hasWanted()) { - hash = (37 * hash) + WANTED_FIELD_NUMBER; - hash = (53 * hash) + getWanted().hashCode(); - } - if (hasGot()) { - hash = (37 * hash) + GOT_FIELD_NUMBER; - hash = (53 * hash) + getGot().hashCode(); - } - if (hasInput()) { - hash = (37 * hash) + INPUT_FIELD_NUMBER; - hash = (53 * hash) + getInput().hashCode(); - } - hash = (37 * hash) + EXPECTED_FAILURE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExpectedFailure()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.CaseResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.CaseResult 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.harness.CaseResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.CaseResult 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.harness.CaseResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.CaseResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.CaseResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.CaseResult 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.harness.CaseResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.CaseResult 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.harness.CaseResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.CaseResult 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.harness.CaseResult 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; - } - /** - *
-   * A case result is a single test case result.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.CaseResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.CaseResult) - build.buf.validate.conformance.harness.CaseResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_CaseResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_CaseResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.CaseResult.class, build.buf.validate.conformance.harness.CaseResult.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.CaseResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getWantedFieldBuilder(); - getGotFieldBuilder(); - getInputFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - success_ = false; - wanted_ = null; - if (wantedBuilder_ != null) { - wantedBuilder_.dispose(); - wantedBuilder_ = null; - } - got_ = null; - if (gotBuilder_ != null) { - gotBuilder_.dispose(); - gotBuilder_ = null; - } - input_ = null; - if (inputBuilder_ != null) { - inputBuilder_.dispose(); - inputBuilder_ = null; - } - expectedFailure_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_CaseResult_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.CaseResult getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.CaseResult.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.CaseResult build() { - build.buf.validate.conformance.harness.CaseResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.CaseResult buildPartial() { - build.buf.validate.conformance.harness.CaseResult result = new build.buf.validate.conformance.harness.CaseResult(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.harness.CaseResult result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.success_ = success_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.wanted_ = wantedBuilder_ == null - ? wanted_ - : wantedBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.got_ = gotBuilder_ == null - ? got_ - : gotBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.input_ = inputBuilder_ == null - ? input_ - : inputBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.expectedFailure_ = expectedFailure_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.CaseResult) { - return mergeFrom((build.buf.validate.conformance.harness.CaseResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.CaseResult other) { - if (other == build.buf.validate.conformance.harness.CaseResult.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getSuccess() != false) { - setSuccess(other.getSuccess()); - } - if (other.hasWanted()) { - mergeWanted(other.getWanted()); - } - if (other.hasGot()) { - mergeGot(other.getGot()); - } - if (other.hasInput()) { - mergeInput(other.getInput()); - } - if (other.getExpectedFailure() != false) { - setExpectedFailure(other.getExpectedFailure()); - } - 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: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - success_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - input.readMessage( - getWantedFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getGotFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - input.readMessage( - getInputFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 48: { - expectedFailure_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - 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.lang.Object name_ = ""; - /** - *
-     * The case name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The case name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The case name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The case name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The case name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean success_ ; - /** - *
-     * Success state of the test case. True if the test case succeeded.
-     * 
- * - * bool success = 2 [json_name = "success"]; - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - return success_; - } - /** - *
-     * Success state of the test case. True if the test case succeeded.
-     * 
- * - * bool success = 2 [json_name = "success"]; - * @param value The success to set. - * @return This builder for chaining. - */ - public Builder setSuccess(boolean value) { - - success_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Success state of the test case. True if the test case succeeded.
-     * 
- * - * bool success = 2 [json_name = "success"]; - * @return This builder for chaining. - */ - public Builder clearSuccess() { - bitField0_ = (bitField0_ & ~0x00000002); - success_ = false; - onChanged(); - return this; - } - - private build.buf.validate.conformance.harness.TestResult wanted_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder, build.buf.validate.conformance.harness.TestResultOrBuilder> wantedBuilder_; - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - * @return Whether the wanted field is set. - */ - public boolean hasWanted() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - * @return The wanted. - */ - public build.buf.validate.conformance.harness.TestResult getWanted() { - if (wantedBuilder_ == null) { - return wanted_ == null ? build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : wanted_; - } else { - return wantedBuilder_.getMessage(); - } - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - public Builder setWanted(build.buf.validate.conformance.harness.TestResult value) { - if (wantedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - wanted_ = value; - } else { - wantedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - public Builder setWanted( - build.buf.validate.conformance.harness.TestResult.Builder builderForValue) { - if (wantedBuilder_ == null) { - wanted_ = builderForValue.build(); - } else { - wantedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - public Builder mergeWanted(build.buf.validate.conformance.harness.TestResult value) { - if (wantedBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - wanted_ != null && - wanted_ != build.buf.validate.conformance.harness.TestResult.getDefaultInstance()) { - getWantedBuilder().mergeFrom(value); - } else { - wanted_ = value; - } - } else { - wantedBuilder_.mergeFrom(value); - } - if (wanted_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - public Builder clearWanted() { - bitField0_ = (bitField0_ & ~0x00000004); - wanted_ = null; - if (wantedBuilder_ != null) { - wantedBuilder_.dispose(); - wantedBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - public build.buf.validate.conformance.harness.TestResult.Builder getWantedBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getWantedFieldBuilder().getBuilder(); - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - public build.buf.validate.conformance.harness.TestResultOrBuilder getWantedOrBuilder() { - if (wantedBuilder_ != null) { - return wantedBuilder_.getMessageOrBuilder(); - } else { - return wanted_ == null ? - build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : wanted_; - } - } - /** - *
-     * The expected result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder, build.buf.validate.conformance.harness.TestResultOrBuilder> - getWantedFieldBuilder() { - if (wantedBuilder_ == null) { - wantedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder, build.buf.validate.conformance.harness.TestResultOrBuilder>( - getWanted(), - getParentForChildren(), - isClean()); - wanted_ = null; - } - return wantedBuilder_; - } - - private build.buf.validate.conformance.harness.TestResult got_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder, build.buf.validate.conformance.harness.TestResultOrBuilder> gotBuilder_; - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - * @return Whether the got field is set. - */ - public boolean hasGot() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - * @return The got. - */ - public build.buf.validate.conformance.harness.TestResult getGot() { - if (gotBuilder_ == null) { - return got_ == null ? build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : got_; - } else { - return gotBuilder_.getMessage(); - } - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - public Builder setGot(build.buf.validate.conformance.harness.TestResult value) { - if (gotBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - got_ = value; - } else { - gotBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - public Builder setGot( - build.buf.validate.conformance.harness.TestResult.Builder builderForValue) { - if (gotBuilder_ == null) { - got_ = builderForValue.build(); - } else { - gotBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - public Builder mergeGot(build.buf.validate.conformance.harness.TestResult value) { - if (gotBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - got_ != null && - got_ != build.buf.validate.conformance.harness.TestResult.getDefaultInstance()) { - getGotBuilder().mergeFrom(value); - } else { - got_ = value; - } - } else { - gotBuilder_.mergeFrom(value); - } - if (got_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - public Builder clearGot() { - bitField0_ = (bitField0_ & ~0x00000008); - got_ = null; - if (gotBuilder_ != null) { - gotBuilder_.dispose(); - gotBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - public build.buf.validate.conformance.harness.TestResult.Builder getGotBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getGotFieldBuilder().getBuilder(); - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - public build.buf.validate.conformance.harness.TestResultOrBuilder getGotOrBuilder() { - if (gotBuilder_ != null) { - return gotBuilder_.getMessageOrBuilder(); - } else { - return got_ == null ? - build.buf.validate.conformance.harness.TestResult.getDefaultInstance() : got_; - } - } - /** - *
-     * The actual result.
-     * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder, build.buf.validate.conformance.harness.TestResultOrBuilder> - getGotFieldBuilder() { - if (gotBuilder_ == null) { - gotBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder, build.buf.validate.conformance.harness.TestResultOrBuilder>( - getGot(), - getParentForChildren(), - isClean()); - got_ = null; - } - return gotBuilder_; - } - - private com.google.protobuf.Any input_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> inputBuilder_; - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - * @return Whether the input field is set. - */ - public boolean hasInput() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - * @return The input. - */ - public com.google.protobuf.Any getInput() { - if (inputBuilder_ == null) { - return input_ == null ? com.google.protobuf.Any.getDefaultInstance() : input_; - } else { - return inputBuilder_.getMessage(); - } - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - public Builder setInput(com.google.protobuf.Any value) { - if (inputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - input_ = value; - } else { - inputBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - public Builder setInput( - com.google.protobuf.Any.Builder builderForValue) { - if (inputBuilder_ == null) { - input_ = builderForValue.build(); - } else { - inputBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - public Builder mergeInput(com.google.protobuf.Any value) { - if (inputBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - input_ != null && - input_ != com.google.protobuf.Any.getDefaultInstance()) { - getInputBuilder().mergeFrom(value); - } else { - input_ = value; - } - } else { - inputBuilder_.mergeFrom(value); - } - if (input_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - public Builder clearInput() { - bitField0_ = (bitField0_ & ~0x00000010); - input_ = null; - if (inputBuilder_ != null) { - inputBuilder_.dispose(); - inputBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - public com.google.protobuf.Any.Builder getInputBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getInputFieldBuilder().getBuilder(); - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - public com.google.protobuf.AnyOrBuilder getInputOrBuilder() { - if (inputBuilder_ != null) { - return inputBuilder_.getMessageOrBuilder(); - } else { - return input_ == null ? - com.google.protobuf.Any.getDefaultInstance() : input_; - } - } - /** - *
-     * The input used to invoke the test case.
-     * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getInputFieldBuilder() { - if (inputBuilder_ == null) { - inputBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getInput(), - getParentForChildren(), - isClean()); - input_ = null; - } - return inputBuilder_; - } - - private boolean expectedFailure_ ; - /** - *
-     * Denotes if the test is expected to fail. True, if the test case was expected to fail.
-     * 
- * - * bool expected_failure = 6 [json_name = "expectedFailure"]; - * @return The expectedFailure. - */ - @java.lang.Override - public boolean getExpectedFailure() { - return expectedFailure_; - } - /** - *
-     * Denotes if the test is expected to fail. True, if the test case was expected to fail.
-     * 
- * - * bool expected_failure = 6 [json_name = "expectedFailure"]; - * @param value The expectedFailure to set. - * @return This builder for chaining. - */ - public Builder setExpectedFailure(boolean value) { - - expectedFailure_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Denotes if the test is expected to fail. True, if the test case was expected to fail.
-     * 
- * - * bool expected_failure = 6 [json_name = "expectedFailure"]; - * @return This builder for chaining. - */ - public Builder clearExpectedFailure() { - bitField0_ = (bitField0_ & ~0x00000020); - expectedFailure_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.CaseResult) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.CaseResult) - private static final build.buf.validate.conformance.harness.CaseResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.CaseResult(); - } - - public static build.buf.validate.conformance.harness.CaseResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CaseResult 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.harness.CaseResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/CaseResultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/CaseResultOrBuilder.java deleted file mode 100644 index 71d25174..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/CaseResultOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface CaseResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.CaseResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The case name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The case name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Success state of the test case. True if the test case succeeded.
-   * 
- * - * bool success = 2 [json_name = "success"]; - * @return The success. - */ - boolean getSuccess(); - - /** - *
-   * The expected result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - * @return Whether the wanted field is set. - */ - boolean hasWanted(); - /** - *
-   * The expected result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - * @return The wanted. - */ - build.buf.validate.conformance.harness.TestResult getWanted(); - /** - *
-   * The expected result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult wanted = 3 [json_name = "wanted"]; - */ - build.buf.validate.conformance.harness.TestResultOrBuilder getWantedOrBuilder(); - - /** - *
-   * The actual result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - * @return Whether the got field is set. - */ - boolean hasGot(); - /** - *
-   * The actual result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - * @return The got. - */ - build.buf.validate.conformance.harness.TestResult getGot(); - /** - *
-   * The actual result.
-   * 
- * - * .buf.validate.conformance.harness.TestResult got = 4 [json_name = "got"]; - */ - build.buf.validate.conformance.harness.TestResultOrBuilder getGotOrBuilder(); - - /** - *
-   * The input used to invoke the test case.
-   * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - * @return Whether the input field is set. - */ - boolean hasInput(); - /** - *
-   * The input used to invoke the test case.
-   * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - * @return The input. - */ - com.google.protobuf.Any getInput(); - /** - *
-   * The input used to invoke the test case.
-   * 
- * - * .google.protobuf.Any input = 5 [json_name = "input"]; - */ - com.google.protobuf.AnyOrBuilder getInputOrBuilder(); - - /** - *
-   * Denotes if the test is expected to fail. True, if the test case was expected to fail.
-   * 
- * - * bool expected_failure = 6 [json_name = "expectedFailure"]; - * @return The expectedFailure. - */ - boolean getExpectedFailure(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/HarnessProto.java b/conformance/src/main/java/build/buf/validate/conformance/harness/HarnessProto.java deleted file mode 100644 index 194a50f7..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/HarnessProto.java +++ /dev/null @@ -1,136 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public final class HarnessProto { - private HarnessProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - HarnessProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_TestConformanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_TestConformanceRequest_CasesEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_TestConformanceRequest_CasesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_TestConformanceResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_TestConformanceResponse_ResultsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_TestConformanceResponse_ResultsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_TestResult_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_TestResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n.buf/validate/conformance/harness/harne" + - "ss.proto\022 buf.validate.conformance.harne" + - "ss\032\033buf/validate/validate.proto\032\031google/" + - "protobuf/any.proto\032 google/protobuf/desc" + - "riptor.proto\"\375\001\n\026TestConformanceRequest\022" + - "8\n\005fdset\030\002 \001(\0132\".google.protobuf.FileDes" + - "criptorSetR\005fdset\022Y\n\005cases\030\003 \003(\0132C.buf.v" + - "alidate.conformance.harness.TestConforma" + - "nceRequest.CasesEntryR\005cases\032N\n\nCasesEnt" + - "ry\022\020\n\003key\030\001 \001(\tR\003key\022*\n\005value\030\002 \001(\0132\024.go" + - "ogle.protobuf.AnyR\005value:\0028\001\"\345\001\n\027TestCon" + - "formanceResponse\022`\n\007results\030\001 \003(\0132F.buf." + - "validate.conformance.harness.TestConform" + - "anceResponse.ResultsEntryR\007results\032h\n\014Re" + - "sultsEntry\022\020\n\003key\030\001 \001(\tR\003key\022B\n\005value\030\002 " + - "\001(\0132,.buf.validate.conformance.harness.T" + - "estResultR\005value:\0028\001\"\374\001\n\nTestResult\022\032\n\007s" + - "uccess\030\001 \001(\010H\000R\007success\022E\n\020validation_er" + - "ror\030\002 \001(\0132\030.buf.validate.ViolationsH\000R\017v" + - "alidationError\022-\n\021compilation_error\030\003 \001(" + - "\tH\000R\020compilationError\022%\n\rruntime_error\030\004" + - " \001(\tH\000R\014runtimeError\022+\n\020unexpected_error" + - "\030\005 \001(\tH\000R\017unexpectedErrorB\010\n\006resultB\332\001\n&" + - "build.buf.validate.conformance.harnessB\014" + - "HarnessProtoP\001\242\002\004BVCH\252\002 Buf.Validate.Con" + - "formance.Harness\312\002 Buf\\Validate\\Conforma" + - "nce\\Harness\342\002,Buf\\Validate\\Conformance\\H" + - "arness\\GPBMetadata\352\002#Buf::Validate::Conf" + - "ormance::Harnessb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.ValidateProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.DescriptorProtos.getDescriptor(), - }); - internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_harness_TestConformanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor, - new java.lang.String[] { "Fdset", "Cases", }); - internal_static_buf_validate_conformance_harness_TestConformanceRequest_CasesEntry_descriptor = - internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_harness_TestConformanceRequest_CasesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_TestConformanceRequest_CasesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_harness_TestConformanceResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor, - new java.lang.String[] { "Results", }); - internal_static_buf_validate_conformance_harness_TestConformanceResponse_ResultsEntry_descriptor = - internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor.getNestedTypes().get(0); - internal_static_buf_validate_conformance_harness_TestConformanceResponse_ResultsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_TestConformanceResponse_ResultsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_buf_validate_conformance_harness_TestResult_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_harness_TestResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_TestResult_descriptor, - new java.lang.String[] { "Success", "ValidationError", "CompilationError", "RuntimeError", "UnexpectedError", "Result", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.ValidateProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.DescriptorProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptions.java b/conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptions.java deleted file mode 100644 index 3b28a55e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptions.java +++ /dev/null @@ -1,1035 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * ResultOptions are the options passed to the test runner to configure the
- * test run.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.ResultOptions} - */ -public final class ResultOptions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.ResultOptions) - ResultOptionsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - ResultOptions.class.getName()); - } - // Use ResultOptions.newBuilder() to construct. - private ResultOptions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ResultOptions() { - suiteFilter_ = ""; - caseFilter_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.ResultOptions.class, build.buf.validate.conformance.harness.ResultOptions.Builder.class); - } - - public static final int SUITE_FILTER_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object suiteFilter_ = ""; - /** - *
-   * The suite filter is a regex that matches against the suite name.
-   * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return The suiteFilter. - */ - @java.lang.Override - public java.lang.String getSuiteFilter() { - java.lang.Object ref = suiteFilter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - suiteFilter_ = s; - return s; - } - } - /** - *
-   * The suite filter is a regex that matches against the suite name.
-   * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return The bytes for suiteFilter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSuiteFilterBytes() { - java.lang.Object ref = suiteFilter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - suiteFilter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CASE_FILTER_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object caseFilter_ = ""; - /** - *
-   * The case filter is a regex that matches against the case name.
-   * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return The caseFilter. - */ - @java.lang.Override - public java.lang.String getCaseFilter() { - java.lang.Object ref = caseFilter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - caseFilter_ = s; - return s; - } - } - /** - *
-   * The case filter is a regex that matches against the case name.
-   * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return The bytes for caseFilter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCaseFilterBytes() { - java.lang.Object ref = caseFilter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - caseFilter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERBOSE_FIELD_NUMBER = 3; - private boolean verbose_ = false; - /** - *
-   * If the test runner should print verbose output.
-   * 
- * - * bool verbose = 3 [json_name = "verbose"]; - * @return The verbose. - */ - @java.lang.Override - public boolean getVerbose() { - return verbose_; - } - - public static final int STRICT_FIELD_NUMBER = 4; - private boolean strict_ = false; - /** - *
-   * If the violation type must be an exact match.
-   * 
- * - * bool strict = 4 [json_name = "strict"]; - * @return The strict. - */ - @java.lang.Override - public boolean getStrict() { - return strict_; - } - - public static final int STRICT_MESSAGE_FIELD_NUMBER = 5; - private boolean strictMessage_ = false; - /** - *
-   * If the violation message must be an exact match.
-   * 
- * - * bool strict_message = 5 [json_name = "strictMessage"]; - * @return The strictMessage. - */ - @java.lang.Override - public boolean getStrictMessage() { - return strictMessage_; - } - - public static final int STRICT_ERROR_FIELD_NUMBER = 6; - private boolean strictError_ = false; - /** - *
-   * If the distinction between runtime and compile time errors must be exact.
-   * 
- * - * bool strict_error = 6 [json_name = "strictError"]; - * @return The strictError. - */ - @java.lang.Override - public boolean getStrictError() { - return strictError_; - } - - 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(suiteFilter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, suiteFilter_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(caseFilter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, caseFilter_); - } - if (verbose_ != false) { - output.writeBool(3, verbose_); - } - if (strict_ != false) { - output.writeBool(4, strict_); - } - if (strictMessage_ != false) { - output.writeBool(5, strictMessage_); - } - if (strictError_ != false) { - output.writeBool(6, strictError_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(suiteFilter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, suiteFilter_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(caseFilter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, caseFilter_); - } - if (verbose_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, verbose_); - } - if (strict_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, strict_); - } - if (strictMessage_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, strictMessage_); - } - if (strictError_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, strictError_); - } - 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.harness.ResultOptions)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.ResultOptions other = (build.buf.validate.conformance.harness.ResultOptions) obj; - - if (!getSuiteFilter() - .equals(other.getSuiteFilter())) return false; - if (!getCaseFilter() - .equals(other.getCaseFilter())) return false; - if (getVerbose() - != other.getVerbose()) return false; - if (getStrict() - != other.getStrict()) return false; - if (getStrictMessage() - != other.getStrictMessage()) return false; - if (getStrictError() - != other.getStrictError()) 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(); - hash = (37 * hash) + SUITE_FILTER_FIELD_NUMBER; - hash = (53 * hash) + getSuiteFilter().hashCode(); - hash = (37 * hash) + CASE_FILTER_FIELD_NUMBER; - hash = (53 * hash) + getCaseFilter().hashCode(); - hash = (37 * hash) + VERBOSE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getVerbose()); - hash = (37 * hash) + STRICT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getStrict()); - hash = (37 * hash) + STRICT_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getStrictMessage()); - hash = (37 * hash) + STRICT_ERROR_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getStrictError()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.ResultOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.ResultOptions 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.harness.ResultOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.ResultOptions 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.harness.ResultOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.ResultOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.ResultOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.ResultOptions 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.harness.ResultOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.ResultOptions 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.harness.ResultOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.ResultOptions 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.harness.ResultOptions 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; - } - /** - *
-   * ResultOptions are the options passed to the test runner to configure the
-   * test run.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.ResultOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.ResultOptions) - build.buf.validate.conformance.harness.ResultOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.ResultOptions.class, build.buf.validate.conformance.harness.ResultOptions.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.ResultOptions.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - suiteFilter_ = ""; - caseFilter_ = ""; - verbose_ = false; - strict_ = false; - strictMessage_ = false; - strictError_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultOptions_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.ResultOptions getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.ResultOptions build() { - build.buf.validate.conformance.harness.ResultOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.ResultOptions buildPartial() { - build.buf.validate.conformance.harness.ResultOptions result = new build.buf.validate.conformance.harness.ResultOptions(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.harness.ResultOptions result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.suiteFilter_ = suiteFilter_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.caseFilter_ = caseFilter_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.verbose_ = verbose_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.strict_ = strict_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.strictMessage_ = strictMessage_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.strictError_ = strictError_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.ResultOptions) { - return mergeFrom((build.buf.validate.conformance.harness.ResultOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.ResultOptions other) { - if (other == build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance()) return this; - if (!other.getSuiteFilter().isEmpty()) { - suiteFilter_ = other.suiteFilter_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getCaseFilter().isEmpty()) { - caseFilter_ = other.caseFilter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getVerbose() != false) { - setVerbose(other.getVerbose()); - } - if (other.getStrict() != false) { - setStrict(other.getStrict()); - } - if (other.getStrictMessage() != false) { - setStrictMessage(other.getStrictMessage()); - } - if (other.getStrictError() != false) { - setStrictError(other.getStrictError()); - } - 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: { - suiteFilter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - caseFilter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: { - verbose_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: { - strict_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: { - strictMessage_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 48: { - strictError_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - 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.lang.Object suiteFilter_ = ""; - /** - *
-     * The suite filter is a regex that matches against the suite name.
-     * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return The suiteFilter. - */ - public java.lang.String getSuiteFilter() { - java.lang.Object ref = suiteFilter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - suiteFilter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The suite filter is a regex that matches against the suite name.
-     * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return The bytes for suiteFilter. - */ - public com.google.protobuf.ByteString - getSuiteFilterBytes() { - java.lang.Object ref = suiteFilter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - suiteFilter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The suite filter is a regex that matches against the suite name.
-     * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @param value The suiteFilter to set. - * @return This builder for chaining. - */ - public Builder setSuiteFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - suiteFilter_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The suite filter is a regex that matches against the suite name.
-     * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return This builder for chaining. - */ - public Builder clearSuiteFilter() { - suiteFilter_ = getDefaultInstance().getSuiteFilter(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The suite filter is a regex that matches against the suite name.
-     * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @param value The bytes for suiteFilter to set. - * @return This builder for chaining. - */ - public Builder setSuiteFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - suiteFilter_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object caseFilter_ = ""; - /** - *
-     * The case filter is a regex that matches against the case name.
-     * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return The caseFilter. - */ - public java.lang.String getCaseFilter() { - java.lang.Object ref = caseFilter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - caseFilter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The case filter is a regex that matches against the case name.
-     * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return The bytes for caseFilter. - */ - public com.google.protobuf.ByteString - getCaseFilterBytes() { - java.lang.Object ref = caseFilter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - caseFilter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The case filter is a regex that matches against the case name.
-     * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @param value The caseFilter to set. - * @return This builder for chaining. - */ - public Builder setCaseFilter( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - caseFilter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * The case filter is a regex that matches against the case name.
-     * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return This builder for chaining. - */ - public Builder clearCaseFilter() { - caseFilter_ = getDefaultInstance().getCaseFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The case filter is a regex that matches against the case name.
-     * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @param value The bytes for caseFilter to set. - * @return This builder for chaining. - */ - public Builder setCaseFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - caseFilter_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private boolean verbose_ ; - /** - *
-     * If the test runner should print verbose output.
-     * 
- * - * bool verbose = 3 [json_name = "verbose"]; - * @return The verbose. - */ - @java.lang.Override - public boolean getVerbose() { - return verbose_; - } - /** - *
-     * If the test runner should print verbose output.
-     * 
- * - * bool verbose = 3 [json_name = "verbose"]; - * @param value The verbose to set. - * @return This builder for chaining. - */ - public Builder setVerbose(boolean value) { - - verbose_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * If the test runner should print verbose output.
-     * 
- * - * bool verbose = 3 [json_name = "verbose"]; - * @return This builder for chaining. - */ - public Builder clearVerbose() { - bitField0_ = (bitField0_ & ~0x00000004); - verbose_ = false; - onChanged(); - return this; - } - - private boolean strict_ ; - /** - *
-     * If the violation type must be an exact match.
-     * 
- * - * bool strict = 4 [json_name = "strict"]; - * @return The strict. - */ - @java.lang.Override - public boolean getStrict() { - return strict_; - } - /** - *
-     * If the violation type must be an exact match.
-     * 
- * - * bool strict = 4 [json_name = "strict"]; - * @param value The strict to set. - * @return This builder for chaining. - */ - public Builder setStrict(boolean value) { - - strict_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * If the violation type must be an exact match.
-     * 
- * - * bool strict = 4 [json_name = "strict"]; - * @return This builder for chaining. - */ - public Builder clearStrict() { - bitField0_ = (bitField0_ & ~0x00000008); - strict_ = false; - onChanged(); - return this; - } - - private boolean strictMessage_ ; - /** - *
-     * If the violation message must be an exact match.
-     * 
- * - * bool strict_message = 5 [json_name = "strictMessage"]; - * @return The strictMessage. - */ - @java.lang.Override - public boolean getStrictMessage() { - return strictMessage_; - } - /** - *
-     * If the violation message must be an exact match.
-     * 
- * - * bool strict_message = 5 [json_name = "strictMessage"]; - * @param value The strictMessage to set. - * @return This builder for chaining. - */ - public Builder setStrictMessage(boolean value) { - - strictMessage_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * If the violation message must be an exact match.
-     * 
- * - * bool strict_message = 5 [json_name = "strictMessage"]; - * @return This builder for chaining. - */ - public Builder clearStrictMessage() { - bitField0_ = (bitField0_ & ~0x00000010); - strictMessage_ = false; - onChanged(); - return this; - } - - private boolean strictError_ ; - /** - *
-     * If the distinction between runtime and compile time errors must be exact.
-     * 
- * - * bool strict_error = 6 [json_name = "strictError"]; - * @return The strictError. - */ - @java.lang.Override - public boolean getStrictError() { - return strictError_; - } - /** - *
-     * If the distinction between runtime and compile time errors must be exact.
-     * 
- * - * bool strict_error = 6 [json_name = "strictError"]; - * @param value The strictError to set. - * @return This builder for chaining. - */ - public Builder setStrictError(boolean value) { - - strictError_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * If the distinction between runtime and compile time errors must be exact.
-     * 
- * - * bool strict_error = 6 [json_name = "strictError"]; - * @return This builder for chaining. - */ - public Builder clearStrictError() { - bitField0_ = (bitField0_ & ~0x00000020); - strictError_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.ResultOptions) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.ResultOptions) - private static final build.buf.validate.conformance.harness.ResultOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.ResultOptions(); - } - - public static build.buf.validate.conformance.harness.ResultOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResultOptions 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.harness.ResultOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptionsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptionsOrBuilder.java deleted file mode 100644 index 95fa481a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultOptionsOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface ResultOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.ResultOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The suite filter is a regex that matches against the suite name.
-   * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return The suiteFilter. - */ - java.lang.String getSuiteFilter(); - /** - *
-   * The suite filter is a regex that matches against the suite name.
-   * 
- * - * string suite_filter = 1 [json_name = "suiteFilter"]; - * @return The bytes for suiteFilter. - */ - com.google.protobuf.ByteString - getSuiteFilterBytes(); - - /** - *
-   * The case filter is a regex that matches against the case name.
-   * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return The caseFilter. - */ - java.lang.String getCaseFilter(); - /** - *
-   * The case filter is a regex that matches against the case name.
-   * 
- * - * string case_filter = 2 [json_name = "caseFilter"]; - * @return The bytes for caseFilter. - */ - com.google.protobuf.ByteString - getCaseFilterBytes(); - - /** - *
-   * If the test runner should print verbose output.
-   * 
- * - * bool verbose = 3 [json_name = "verbose"]; - * @return The verbose. - */ - boolean getVerbose(); - - /** - *
-   * If the violation type must be an exact match.
-   * 
- * - * bool strict = 4 [json_name = "strict"]; - * @return The strict. - */ - boolean getStrict(); - - /** - *
-   * If the violation message must be an exact match.
-   * 
- * - * bool strict_message = 5 [json_name = "strictMessage"]; - * @return The strictMessage. - */ - boolean getStrictMessage(); - - /** - *
-   * If the distinction between runtime and compile time errors must be exact.
-   * 
- * - * bool strict_error = 6 [json_name = "strictError"]; - * @return The strictError. - */ - boolean getStrictError(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultSet.java b/conformance/src/main/java/build/buf/validate/conformance/harness/ResultSet.java deleted file mode 100644 index 51add2d2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultSet.java +++ /dev/null @@ -1,1318 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * A result is the result of a test run.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.ResultSet} - */ -public final class ResultSet extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.ResultSet) - ResultSetOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - ResultSet.class.getName()); - } - // Use ResultSet.newBuilder() to construct. - private ResultSet(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ResultSet() { - suites_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.ResultSet.class, build.buf.validate.conformance.harness.ResultSet.Builder.class); - } - - private int bitField0_; - public static final int SUCCESSES_FIELD_NUMBER = 1; - private int successes_ = 0; - /** - *
-   * Count of successes.
-   * 
- * - * int32 successes = 1 [json_name = "successes"]; - * @return The successes. - */ - @java.lang.Override - public int getSuccesses() { - return successes_; - } - - public static final int FAILURES_FIELD_NUMBER = 2; - private int failures_ = 0; - /** - *
-   * Count of failures.
-   * 
- * - * int32 failures = 2 [json_name = "failures"]; - * @return The failures. - */ - @java.lang.Override - public int getFailures() { - return failures_; - } - - public static final int SUITES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List suites_; - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - @java.lang.Override - public java.util.List getSuitesList() { - return suites_; - } - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - @java.lang.Override - public java.util.List - getSuitesOrBuilderList() { - return suites_; - } - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - @java.lang.Override - public int getSuitesCount() { - return suites_.size(); - } - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.SuiteResults getSuites(int index) { - return suites_.get(index); - } - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.SuiteResultsOrBuilder getSuitesOrBuilder( - int index) { - return suites_.get(index); - } - - public static final int OPTIONS_FIELD_NUMBER = 4; - private build.buf.validate.conformance.harness.ResultOptions options_; - /** - *
-   * Options used to generate this result.
-   * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - * @return Whether the options field is set. - */ - @java.lang.Override - public boolean hasOptions() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Options used to generate this result.
-   * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - * @return The options. - */ - @java.lang.Override - public build.buf.validate.conformance.harness.ResultOptions getOptions() { - return options_ == null ? build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance() : options_; - } - /** - *
-   * Options used to generate this result.
-   * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.ResultOptionsOrBuilder getOptionsOrBuilder() { - return options_ == null ? build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance() : options_; - } - - public static final int EXPECTED_FAILURES_FIELD_NUMBER = 5; - private int expectedFailures_ = 0; - /** - *
-   * Count of expected failures.
-   * 
- * - * int32 expected_failures = 5 [json_name = "expectedFailures"]; - * @return The expectedFailures. - */ - @java.lang.Override - public int getExpectedFailures() { - return expectedFailures_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - for (int i = 0; i < getSuitesCount(); i++) { - if (!getSuites(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (successes_ != 0) { - output.writeInt32(1, successes_); - } - if (failures_ != 0) { - output.writeInt32(2, failures_); - } - for (int i = 0; i < suites_.size(); i++) { - output.writeMessage(3, suites_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getOptions()); - } - if (expectedFailures_ != 0) { - output.writeInt32(5, expectedFailures_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (successes_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, successes_); - } - if (failures_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, failures_); - } - for (int i = 0; i < suites_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, suites_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getOptions()); - } - if (expectedFailures_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, expectedFailures_); - } - 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.harness.ResultSet)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.ResultSet other = (build.buf.validate.conformance.harness.ResultSet) obj; - - if (getSuccesses() - != other.getSuccesses()) return false; - if (getFailures() - != other.getFailures()) return false; - if (!getSuitesList() - .equals(other.getSuitesList())) return false; - if (hasOptions() != other.hasOptions()) return false; - if (hasOptions()) { - if (!getOptions() - .equals(other.getOptions())) return false; - } - if (getExpectedFailures() - != other.getExpectedFailures()) 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(); - hash = (37 * hash) + SUCCESSES_FIELD_NUMBER; - hash = (53 * hash) + getSuccesses(); - hash = (37 * hash) + FAILURES_FIELD_NUMBER; - hash = (53 * hash) + getFailures(); - if (getSuitesCount() > 0) { - hash = (37 * hash) + SUITES_FIELD_NUMBER; - hash = (53 * hash) + getSuitesList().hashCode(); - } - if (hasOptions()) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptions().hashCode(); - } - hash = (37 * hash) + EXPECTED_FAILURES_FIELD_NUMBER; - hash = (53 * hash) + getExpectedFailures(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.ResultSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.ResultSet 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.harness.ResultSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.ResultSet 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.harness.ResultSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.ResultSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.ResultSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.ResultSet 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.harness.ResultSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.ResultSet 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.harness.ResultSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.ResultSet 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.harness.ResultSet 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; - } - /** - *
-   * A result is the result of a test run.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.ResultSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.ResultSet) - build.buf.validate.conformance.harness.ResultSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.ResultSet.class, build.buf.validate.conformance.harness.ResultSet.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.ResultSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getSuitesFieldBuilder(); - getOptionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - successes_ = 0; - failures_ = 0; - if (suitesBuilder_ == null) { - suites_ = java.util.Collections.emptyList(); - } else { - suites_ = null; - suitesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - options_ = null; - if (optionsBuilder_ != null) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - } - expectedFailures_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_ResultSet_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.ResultSet getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.ResultSet.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.ResultSet build() { - build.buf.validate.conformance.harness.ResultSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.ResultSet buildPartial() { - build.buf.validate.conformance.harness.ResultSet result = new build.buf.validate.conformance.harness.ResultSet(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.harness.ResultSet result) { - if (suitesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - suites_ = java.util.Collections.unmodifiableList(suites_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.suites_ = suites_; - } else { - result.suites_ = suitesBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.conformance.harness.ResultSet result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.successes_ = successes_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.failures_ = failures_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.options_ = optionsBuilder_ == null - ? options_ - : optionsBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.expectedFailures_ = expectedFailures_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.ResultSet) { - return mergeFrom((build.buf.validate.conformance.harness.ResultSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.ResultSet other) { - if (other == build.buf.validate.conformance.harness.ResultSet.getDefaultInstance()) return this; - if (other.getSuccesses() != 0) { - setSuccesses(other.getSuccesses()); - } - if (other.getFailures() != 0) { - setFailures(other.getFailures()); - } - if (suitesBuilder_ == null) { - if (!other.suites_.isEmpty()) { - if (suites_.isEmpty()) { - suites_ = other.suites_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSuitesIsMutable(); - suites_.addAll(other.suites_); - } - onChanged(); - } - } else { - if (!other.suites_.isEmpty()) { - if (suitesBuilder_.isEmpty()) { - suitesBuilder_.dispose(); - suitesBuilder_ = null; - suites_ = other.suites_; - bitField0_ = (bitField0_ & ~0x00000004); - suitesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSuitesFieldBuilder() : null; - } else { - suitesBuilder_.addAllMessages(other.suites_); - } - } - } - if (other.hasOptions()) { - mergeOptions(other.getOptions()); - } - if (other.getExpectedFailures() != 0) { - setExpectedFailures(other.getExpectedFailures()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - for (int i = 0; i < getSuitesCount(); i++) { - if (!getSuites(i).isInitialized()) { - return false; - } - } - 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 8: { - successes_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - failures_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: { - build.buf.validate.conformance.harness.SuiteResults m = - input.readMessage( - build.buf.validate.conformance.harness.SuiteResults.parser(), - extensionRegistry); - if (suitesBuilder_ == null) { - ensureSuitesIsMutable(); - suites_.add(m); - } else { - suitesBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: { - input.readMessage( - getOptionsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: { - expectedFailures_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 40 - 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 int successes_ ; - /** - *
-     * Count of successes.
-     * 
- * - * int32 successes = 1 [json_name = "successes"]; - * @return The successes. - */ - @java.lang.Override - public int getSuccesses() { - return successes_; - } - /** - *
-     * Count of successes.
-     * 
- * - * int32 successes = 1 [json_name = "successes"]; - * @param value The successes to set. - * @return This builder for chaining. - */ - public Builder setSuccesses(int value) { - - successes_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Count of successes.
-     * 
- * - * int32 successes = 1 [json_name = "successes"]; - * @return This builder for chaining. - */ - public Builder clearSuccesses() { - bitField0_ = (bitField0_ & ~0x00000001); - successes_ = 0; - onChanged(); - return this; - } - - private int failures_ ; - /** - *
-     * Count of failures.
-     * 
- * - * int32 failures = 2 [json_name = "failures"]; - * @return The failures. - */ - @java.lang.Override - public int getFailures() { - return failures_; - } - /** - *
-     * Count of failures.
-     * 
- * - * int32 failures = 2 [json_name = "failures"]; - * @param value The failures to set. - * @return This builder for chaining. - */ - public Builder setFailures(int value) { - - failures_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Count of failures.
-     * 
- * - * int32 failures = 2 [json_name = "failures"]; - * @return This builder for chaining. - */ - public Builder clearFailures() { - bitField0_ = (bitField0_ & ~0x00000002); - failures_ = 0; - onChanged(); - return this; - } - - private java.util.List suites_ = - java.util.Collections.emptyList(); - private void ensureSuitesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - suites_ = new java.util.ArrayList(suites_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.harness.SuiteResults, build.buf.validate.conformance.harness.SuiteResults.Builder, build.buf.validate.conformance.harness.SuiteResultsOrBuilder> suitesBuilder_; - - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public java.util.List getSuitesList() { - if (suitesBuilder_ == null) { - return java.util.Collections.unmodifiableList(suites_); - } else { - return suitesBuilder_.getMessageList(); - } - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public int getSuitesCount() { - if (suitesBuilder_ == null) { - return suites_.size(); - } else { - return suitesBuilder_.getCount(); - } - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public build.buf.validate.conformance.harness.SuiteResults getSuites(int index) { - if (suitesBuilder_ == null) { - return suites_.get(index); - } else { - return suitesBuilder_.getMessage(index); - } - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder setSuites( - int index, build.buf.validate.conformance.harness.SuiteResults value) { - if (suitesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSuitesIsMutable(); - suites_.set(index, value); - onChanged(); - } else { - suitesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder setSuites( - int index, build.buf.validate.conformance.harness.SuiteResults.Builder builderForValue) { - if (suitesBuilder_ == null) { - ensureSuitesIsMutable(); - suites_.set(index, builderForValue.build()); - onChanged(); - } else { - suitesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder addSuites(build.buf.validate.conformance.harness.SuiteResults value) { - if (suitesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSuitesIsMutable(); - suites_.add(value); - onChanged(); - } else { - suitesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder addSuites( - int index, build.buf.validate.conformance.harness.SuiteResults value) { - if (suitesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSuitesIsMutable(); - suites_.add(index, value); - onChanged(); - } else { - suitesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder addSuites( - build.buf.validate.conformance.harness.SuiteResults.Builder builderForValue) { - if (suitesBuilder_ == null) { - ensureSuitesIsMutable(); - suites_.add(builderForValue.build()); - onChanged(); - } else { - suitesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder addSuites( - int index, build.buf.validate.conformance.harness.SuiteResults.Builder builderForValue) { - if (suitesBuilder_ == null) { - ensureSuitesIsMutable(); - suites_.add(index, builderForValue.build()); - onChanged(); - } else { - suitesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder addAllSuites( - java.lang.Iterable values) { - if (suitesBuilder_ == null) { - ensureSuitesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, suites_); - onChanged(); - } else { - suitesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder clearSuites() { - if (suitesBuilder_ == null) { - suites_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - suitesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public Builder removeSuites(int index) { - if (suitesBuilder_ == null) { - ensureSuitesIsMutable(); - suites_.remove(index); - onChanged(); - } else { - suitesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public build.buf.validate.conformance.harness.SuiteResults.Builder getSuitesBuilder( - int index) { - return getSuitesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public build.buf.validate.conformance.harness.SuiteResultsOrBuilder getSuitesOrBuilder( - int index) { - if (suitesBuilder_ == null) { - return suites_.get(index); } else { - return suitesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public java.util.List - getSuitesOrBuilderList() { - if (suitesBuilder_ != null) { - return suitesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(suites_); - } - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public build.buf.validate.conformance.harness.SuiteResults.Builder addSuitesBuilder() { - return getSuitesFieldBuilder().addBuilder( - build.buf.validate.conformance.harness.SuiteResults.getDefaultInstance()); - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public build.buf.validate.conformance.harness.SuiteResults.Builder addSuitesBuilder( - int index) { - return getSuitesFieldBuilder().addBuilder( - index, build.buf.validate.conformance.harness.SuiteResults.getDefaultInstance()); - } - /** - *
-     * List of suite results.
-     * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - public java.util.List - getSuitesBuilderList() { - return getSuitesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.harness.SuiteResults, build.buf.validate.conformance.harness.SuiteResults.Builder, build.buf.validate.conformance.harness.SuiteResultsOrBuilder> - getSuitesFieldBuilder() { - if (suitesBuilder_ == null) { - suitesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.harness.SuiteResults, build.buf.validate.conformance.harness.SuiteResults.Builder, build.buf.validate.conformance.harness.SuiteResultsOrBuilder>( - suites_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - suites_ = null; - } - return suitesBuilder_; - } - - private build.buf.validate.conformance.harness.ResultOptions options_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.ResultOptions, build.buf.validate.conformance.harness.ResultOptions.Builder, build.buf.validate.conformance.harness.ResultOptionsOrBuilder> optionsBuilder_; - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - * @return Whether the options field is set. - */ - public boolean hasOptions() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - * @return The options. - */ - public build.buf.validate.conformance.harness.ResultOptions getOptions() { - if (optionsBuilder_ == null) { - return options_ == null ? build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance() : options_; - } else { - return optionsBuilder_.getMessage(); - } - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - public Builder setOptions(build.buf.validate.conformance.harness.ResultOptions value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - options_ = value; - } else { - optionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - public Builder setOptions( - build.buf.validate.conformance.harness.ResultOptions.Builder builderForValue) { - if (optionsBuilder_ == null) { - options_ = builderForValue.build(); - } else { - optionsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - public Builder mergeOptions(build.buf.validate.conformance.harness.ResultOptions value) { - if (optionsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - options_ != null && - options_ != build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance()) { - getOptionsBuilder().mergeFrom(value); - } else { - options_ = value; - } - } else { - optionsBuilder_.mergeFrom(value); - } - if (options_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - public Builder clearOptions() { - bitField0_ = (bitField0_ & ~0x00000008); - options_ = null; - if (optionsBuilder_ != null) { - optionsBuilder_.dispose(); - optionsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - public build.buf.validate.conformance.harness.ResultOptions.Builder getOptionsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - public build.buf.validate.conformance.harness.ResultOptionsOrBuilder getOptionsOrBuilder() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilder(); - } else { - return options_ == null ? - build.buf.validate.conformance.harness.ResultOptions.getDefaultInstance() : options_; - } - } - /** - *
-     * Options used to generate this result.
-     * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.ResultOptions, build.buf.validate.conformance.harness.ResultOptions.Builder, build.buf.validate.conformance.harness.ResultOptionsOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.conformance.harness.ResultOptions, build.buf.validate.conformance.harness.ResultOptions.Builder, build.buf.validate.conformance.harness.ResultOptionsOrBuilder>( - getOptions(), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - - private int expectedFailures_ ; - /** - *
-     * Count of expected failures.
-     * 
- * - * int32 expected_failures = 5 [json_name = "expectedFailures"]; - * @return The expectedFailures. - */ - @java.lang.Override - public int getExpectedFailures() { - return expectedFailures_; - } - /** - *
-     * Count of expected failures.
-     * 
- * - * int32 expected_failures = 5 [json_name = "expectedFailures"]; - * @param value The expectedFailures to set. - * @return This builder for chaining. - */ - public Builder setExpectedFailures(int value) { - - expectedFailures_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * Count of expected failures.
-     * 
- * - * int32 expected_failures = 5 [json_name = "expectedFailures"]; - * @return This builder for chaining. - */ - public Builder clearExpectedFailures() { - bitField0_ = (bitField0_ & ~0x00000010); - expectedFailures_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.ResultSet) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.ResultSet) - private static final build.buf.validate.conformance.harness.ResultSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.ResultSet(); - } - - public static build.buf.validate.conformance.harness.ResultSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResultSet 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.harness.ResultSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultSetOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/ResultSetOrBuilder.java deleted file mode 100644 index 4d10709e..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultSetOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface ResultSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.ResultSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Count of successes.
-   * 
- * - * int32 successes = 1 [json_name = "successes"]; - * @return The successes. - */ - int getSuccesses(); - - /** - *
-   * Count of failures.
-   * 
- * - * int32 failures = 2 [json_name = "failures"]; - * @return The failures. - */ - int getFailures(); - - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - java.util.List - getSuitesList(); - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - build.buf.validate.conformance.harness.SuiteResults getSuites(int index); - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - int getSuitesCount(); - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - java.util.List - getSuitesOrBuilderList(); - /** - *
-   * List of suite results.
-   * 
- * - * repeated .buf.validate.conformance.harness.SuiteResults suites = 3 [json_name = "suites"]; - */ - build.buf.validate.conformance.harness.SuiteResultsOrBuilder getSuitesOrBuilder( - int index); - - /** - *
-   * Options used to generate this result.
-   * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - * @return Whether the options field is set. - */ - boolean hasOptions(); - /** - *
-   * Options used to generate this result.
-   * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - * @return The options. - */ - build.buf.validate.conformance.harness.ResultOptions getOptions(); - /** - *
-   * Options used to generate this result.
-   * 
- * - * .buf.validate.conformance.harness.ResultOptions options = 4 [json_name = "options"]; - */ - build.buf.validate.conformance.harness.ResultOptionsOrBuilder getOptionsOrBuilder(); - - /** - *
-   * Count of expected failures.
-   * 
- * - * int32 expected_failures = 5 [json_name = "expectedFailures"]; - * @return The expectedFailures. - */ - int getExpectedFailures(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultsProto.java b/conformance/src/main/java/build/buf/validate/conformance/harness/ResultsProto.java deleted file mode 100644 index 76929f27..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/ResultsProto.java +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public final class ResultsProto { - private ResultsProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - ResultsProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_ResultOptions_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_ResultOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_ResultSet_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_ResultSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_SuiteResults_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_SuiteResults_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_conformance_harness_CaseResult_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_conformance_harness_CaseResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n.buf/validate/conformance/harness/resul" + - "ts.proto\022 buf.validate.conformance.harne" + - "ss\032.buf/validate/conformance/harness/har" + - "ness.proto\032\031google/protobuf/any.proto\032 g" + - "oogle/protobuf/descriptor.proto\"\317\001\n\rResu" + - "ltOptions\022!\n\014suite_filter\030\001 \001(\tR\013suiteFi" + - "lter\022\037\n\013case_filter\030\002 \001(\tR\ncaseFilter\022\030\n" + - "\007verbose\030\003 \001(\010R\007verbose\022\026\n\006strict\030\004 \001(\010R" + - "\006strict\022%\n\016strict_message\030\005 \001(\010R\rstrictM" + - "essage\022!\n\014strict_error\030\006 \001(\010R\013strictErro" + - "r\"\205\002\n\tResultSet\022\034\n\tsuccesses\030\001 \001(\005R\tsucc" + - "esses\022\032\n\010failures\030\002 \001(\005R\010failures\022F\n\006sui" + - "tes\030\003 \003(\0132..buf.validate.conformance.har" + - "ness.SuiteResultsR\006suites\022I\n\007options\030\004 \001" + - "(\0132/.buf.validate.conformance.harness.Re" + - "sultOptionsR\007options\022+\n\021expected_failure" + - "s\030\005 \001(\005R\020expectedFailures\"\207\002\n\014SuiteResul" + - "ts\022\022\n\004name\030\001 \001(\tR\004name\022\034\n\tsuccesses\030\002 \001(" + - "\005R\tsuccesses\022\032\n\010failures\030\003 \001(\005R\010failures" + - "\022B\n\005cases\030\004 \003(\0132,.buf.validate.conforman" + - "ce.harness.CaseResultR\005cases\0228\n\005fdset\030\005 " + - "\001(\0132\".google.protobuf.FileDescriptorSetR" + - "\005fdset\022+\n\021expected_failures\030\006 \001(\005R\020expec" + - "tedFailures\"\227\002\n\nCaseResult\022\022\n\004name\030\001 \001(\t" + - "R\004name\022\030\n\007success\030\002 \001(\010R\007success\022D\n\006want" + - "ed\030\003 \001(\0132,.buf.validate.conformance.harn" + - "ess.TestResultR\006wanted\022>\n\003got\030\004 \001(\0132,.bu" + - "f.validate.conformance.harness.TestResul" + - "tR\003got\022*\n\005input\030\005 \001(\0132\024.google.protobuf." + - "AnyR\005input\022)\n\020expected_failure\030\006 \001(\010R\017ex" + - "pectedFailureB\332\001\n&build.buf.validate.con" + - "formance.harnessB\014ResultsProtoP\001\242\002\004BVCH\252" + - "\002 Buf.Validate.Conformance.Harness\312\002 Buf" + - "\\Validate\\Conformance\\Harness\342\002,Buf\\Vali" + - "date\\Conformance\\Harness\\GPBMetadata\352\002#B" + - "uf::Validate::Conformance::Harnessb\006prot" + - "o3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - build.buf.validate.conformance.harness.HarnessProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.DescriptorProtos.getDescriptor(), - }); - internal_static_buf_validate_conformance_harness_ResultOptions_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_conformance_harness_ResultOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_ResultOptions_descriptor, - new java.lang.String[] { "SuiteFilter", "CaseFilter", "Verbose", "Strict", "StrictMessage", "StrictError", }); - internal_static_buf_validate_conformance_harness_ResultSet_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_conformance_harness_ResultSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_ResultSet_descriptor, - new java.lang.String[] { "Successes", "Failures", "Suites", "Options", "ExpectedFailures", }); - internal_static_buf_validate_conformance_harness_SuiteResults_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_conformance_harness_SuiteResults_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_SuiteResults_descriptor, - new java.lang.String[] { "Name", "Successes", "Failures", "Cases", "Fdset", "ExpectedFailures", }); - internal_static_buf_validate_conformance_harness_CaseResult_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_conformance_harness_CaseResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_conformance_harness_CaseResult_descriptor, - new java.lang.String[] { "Name", "Success", "Wanted", "Got", "Input", "ExpectedFailure", }); - descriptor.resolveAllFeaturesImmutable(); - build.buf.validate.conformance.harness.HarnessProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.DescriptorProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResults.java b/conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResults.java deleted file mode 100644 index a5e288fe..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResults.java +++ /dev/null @@ -1,1482 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * A suite result is a single test suite result.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.SuiteResults} - */ -public final class SuiteResults extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.SuiteResults) - SuiteResultsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SuiteResults.class.getName()); - } - // Use SuiteResults.newBuilder() to construct. - private SuiteResults(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SuiteResults() { - name_ = ""; - cases_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_SuiteResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_SuiteResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.SuiteResults.class, build.buf.validate.conformance.harness.SuiteResults.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * The suite name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The suite name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUCCESSES_FIELD_NUMBER = 2; - private int successes_ = 0; - /** - *
-   * Count of successes.
-   * 
- * - * int32 successes = 2 [json_name = "successes"]; - * @return The successes. - */ - @java.lang.Override - public int getSuccesses() { - return successes_; - } - - public static final int FAILURES_FIELD_NUMBER = 3; - private int failures_ = 0; - /** - *
-   * Count of failures.
-   * 
- * - * int32 failures = 3 [json_name = "failures"]; - * @return The failures. - */ - @java.lang.Override - public int getFailures() { - return failures_; - } - - public static final int CASES_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List cases_; - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - @java.lang.Override - public java.util.List getCasesList() { - return cases_; - } - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - @java.lang.Override - public java.util.List - getCasesOrBuilderList() { - return cases_; - } - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - @java.lang.Override - public int getCasesCount() { - return cases_.size(); - } - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.CaseResult getCases(int index) { - return cases_.get(index); - } - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.CaseResultOrBuilder getCasesOrBuilder( - int index) { - return cases_.get(index); - } - - public static final int FDSET_FIELD_NUMBER = 5; - private com.google.protobuf.DescriptorProtos.FileDescriptorSet fdset_; - /** - *
-   * The file descriptor set used to generate this result.
-   * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - * @return Whether the fdset field is set. - */ - @java.lang.Override - public boolean hasFdset() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * The file descriptor set used to generate this result.
-   * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - * @return The fdset. - */ - @java.lang.Override - public com.google.protobuf.DescriptorProtos.FileDescriptorSet getFdset() { - return fdset_ == null ? com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } - /** - *
-   * The file descriptor set used to generate this result.
-   * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - @java.lang.Override - public com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder getFdsetOrBuilder() { - return fdset_ == null ? com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } - - public static final int EXPECTED_FAILURES_FIELD_NUMBER = 6; - private int expectedFailures_ = 0; - /** - *
-   * Count of expected failures.
-   * 
- * - * int32 expected_failures = 6 [json_name = "expectedFailures"]; - * @return The expectedFailures. - */ - @java.lang.Override - public int getExpectedFailures() { - return expectedFailures_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasFdset()) { - if (!getFdset().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (successes_ != 0) { - output.writeInt32(2, successes_); - } - if (failures_ != 0) { - output.writeInt32(3, failures_); - } - for (int i = 0; i < cases_.size(); i++) { - output.writeMessage(4, cases_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getFdset()); - } - if (expectedFailures_ != 0) { - output.writeInt32(6, expectedFailures_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (successes_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, successes_); - } - if (failures_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, failures_); - } - for (int i = 0; i < cases_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, cases_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getFdset()); - } - if (expectedFailures_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, expectedFailures_); - } - 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.harness.SuiteResults)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.SuiteResults other = (build.buf.validate.conformance.harness.SuiteResults) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getSuccesses() - != other.getSuccesses()) return false; - if (getFailures() - != other.getFailures()) return false; - if (!getCasesList() - .equals(other.getCasesList())) return false; - if (hasFdset() != other.hasFdset()) return false; - if (hasFdset()) { - if (!getFdset() - .equals(other.getFdset())) return false; - } - if (getExpectedFailures() - != other.getExpectedFailures()) 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(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SUCCESSES_FIELD_NUMBER; - hash = (53 * hash) + getSuccesses(); - hash = (37 * hash) + FAILURES_FIELD_NUMBER; - hash = (53 * hash) + getFailures(); - if (getCasesCount() > 0) { - hash = (37 * hash) + CASES_FIELD_NUMBER; - hash = (53 * hash) + getCasesList().hashCode(); - } - if (hasFdset()) { - hash = (37 * hash) + FDSET_FIELD_NUMBER; - hash = (53 * hash) + getFdset().hashCode(); - } - hash = (37 * hash) + EXPECTED_FAILURES_FIELD_NUMBER; - hash = (53 * hash) + getExpectedFailures(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.SuiteResults parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.SuiteResults 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.harness.SuiteResults parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.SuiteResults 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.harness.SuiteResults parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.SuiteResults parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.SuiteResults parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.SuiteResults 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.harness.SuiteResults parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.SuiteResults 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.harness.SuiteResults parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.SuiteResults 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.harness.SuiteResults 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; - } - /** - *
-   * A suite result is a single test suite result.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.SuiteResults} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.SuiteResults) - build.buf.validate.conformance.harness.SuiteResultsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_SuiteResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_SuiteResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.SuiteResults.class, build.buf.validate.conformance.harness.SuiteResults.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.SuiteResults.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getCasesFieldBuilder(); - getFdsetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - successes_ = 0; - failures_ = 0; - if (casesBuilder_ == null) { - cases_ = java.util.Collections.emptyList(); - } else { - cases_ = null; - casesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - fdset_ = null; - if (fdsetBuilder_ != null) { - fdsetBuilder_.dispose(); - fdsetBuilder_ = null; - } - expectedFailures_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.ResultsProto.internal_static_buf_validate_conformance_harness_SuiteResults_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.SuiteResults getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.SuiteResults.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.SuiteResults build() { - build.buf.validate.conformance.harness.SuiteResults result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.SuiteResults buildPartial() { - build.buf.validate.conformance.harness.SuiteResults result = new build.buf.validate.conformance.harness.SuiteResults(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.conformance.harness.SuiteResults result) { - if (casesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - cases_ = java.util.Collections.unmodifiableList(cases_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.cases_ = cases_; - } else { - result.cases_ = casesBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.conformance.harness.SuiteResults result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.successes_ = successes_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.failures_ = failures_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.fdset_ = fdsetBuilder_ == null - ? fdset_ - : fdsetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.expectedFailures_ = expectedFailures_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.SuiteResults) { - return mergeFrom((build.buf.validate.conformance.harness.SuiteResults)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.SuiteResults other) { - if (other == build.buf.validate.conformance.harness.SuiteResults.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getSuccesses() != 0) { - setSuccesses(other.getSuccesses()); - } - if (other.getFailures() != 0) { - setFailures(other.getFailures()); - } - if (casesBuilder_ == null) { - if (!other.cases_.isEmpty()) { - if (cases_.isEmpty()) { - cases_ = other.cases_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCasesIsMutable(); - cases_.addAll(other.cases_); - } - onChanged(); - } - } else { - if (!other.cases_.isEmpty()) { - if (casesBuilder_.isEmpty()) { - casesBuilder_.dispose(); - casesBuilder_ = null; - cases_ = other.cases_; - bitField0_ = (bitField0_ & ~0x00000008); - casesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCasesFieldBuilder() : null; - } else { - casesBuilder_.addAllMessages(other.cases_); - } - } - } - if (other.hasFdset()) { - mergeFdset(other.getFdset()); - } - if (other.getExpectedFailures() != 0) { - setExpectedFailures(other.getExpectedFailures()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (hasFdset()) { - if (!getFdset().isInitialized()) { - return false; - } - } - 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: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - successes_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - failures_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - build.buf.validate.conformance.harness.CaseResult m = - input.readMessage( - build.buf.validate.conformance.harness.CaseResult.parser(), - extensionRegistry); - if (casesBuilder_ == null) { - ensureCasesIsMutable(); - cases_.add(m); - } else { - casesBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: { - input.readMessage( - getFdsetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 48: { - expectedFailures_ = input.readInt32(); - bitField0_ |= 0x00000020; - break; - } // case 48 - 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.lang.Object name_ = ""; - /** - *
-     * The suite name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The suite name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The suite name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The suite name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The suite name.
-     * 
- * - * string name = 1 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int successes_ ; - /** - *
-     * Count of successes.
-     * 
- * - * int32 successes = 2 [json_name = "successes"]; - * @return The successes. - */ - @java.lang.Override - public int getSuccesses() { - return successes_; - } - /** - *
-     * Count of successes.
-     * 
- * - * int32 successes = 2 [json_name = "successes"]; - * @param value The successes to set. - * @return This builder for chaining. - */ - public Builder setSuccesses(int value) { - - successes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Count of successes.
-     * 
- * - * int32 successes = 2 [json_name = "successes"]; - * @return This builder for chaining. - */ - public Builder clearSuccesses() { - bitField0_ = (bitField0_ & ~0x00000002); - successes_ = 0; - onChanged(); - return this; - } - - private int failures_ ; - /** - *
-     * Count of failures.
-     * 
- * - * int32 failures = 3 [json_name = "failures"]; - * @return The failures. - */ - @java.lang.Override - public int getFailures() { - return failures_; - } - /** - *
-     * Count of failures.
-     * 
- * - * int32 failures = 3 [json_name = "failures"]; - * @param value The failures to set. - * @return This builder for chaining. - */ - public Builder setFailures(int value) { - - failures_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Count of failures.
-     * 
- * - * int32 failures = 3 [json_name = "failures"]; - * @return This builder for chaining. - */ - public Builder clearFailures() { - bitField0_ = (bitField0_ & ~0x00000004); - failures_ = 0; - onChanged(); - return this; - } - - private java.util.List cases_ = - java.util.Collections.emptyList(); - private void ensureCasesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - cases_ = new java.util.ArrayList(cases_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.harness.CaseResult, build.buf.validate.conformance.harness.CaseResult.Builder, build.buf.validate.conformance.harness.CaseResultOrBuilder> casesBuilder_; - - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public java.util.List getCasesList() { - if (casesBuilder_ == null) { - return java.util.Collections.unmodifiableList(cases_); - } else { - return casesBuilder_.getMessageList(); - } - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public int getCasesCount() { - if (casesBuilder_ == null) { - return cases_.size(); - } else { - return casesBuilder_.getCount(); - } - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public build.buf.validate.conformance.harness.CaseResult getCases(int index) { - if (casesBuilder_ == null) { - return cases_.get(index); - } else { - return casesBuilder_.getMessage(index); - } - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder setCases( - int index, build.buf.validate.conformance.harness.CaseResult value) { - if (casesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCasesIsMutable(); - cases_.set(index, value); - onChanged(); - } else { - casesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder setCases( - int index, build.buf.validate.conformance.harness.CaseResult.Builder builderForValue) { - if (casesBuilder_ == null) { - ensureCasesIsMutable(); - cases_.set(index, builderForValue.build()); - onChanged(); - } else { - casesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder addCases(build.buf.validate.conformance.harness.CaseResult value) { - if (casesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCasesIsMutable(); - cases_.add(value); - onChanged(); - } else { - casesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder addCases( - int index, build.buf.validate.conformance.harness.CaseResult value) { - if (casesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCasesIsMutable(); - cases_.add(index, value); - onChanged(); - } else { - casesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder addCases( - build.buf.validate.conformance.harness.CaseResult.Builder builderForValue) { - if (casesBuilder_ == null) { - ensureCasesIsMutable(); - cases_.add(builderForValue.build()); - onChanged(); - } else { - casesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder addCases( - int index, build.buf.validate.conformance.harness.CaseResult.Builder builderForValue) { - if (casesBuilder_ == null) { - ensureCasesIsMutable(); - cases_.add(index, builderForValue.build()); - onChanged(); - } else { - casesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder addAllCases( - java.lang.Iterable values) { - if (casesBuilder_ == null) { - ensureCasesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cases_); - onChanged(); - } else { - casesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder clearCases() { - if (casesBuilder_ == null) { - cases_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - casesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public Builder removeCases(int index) { - if (casesBuilder_ == null) { - ensureCasesIsMutable(); - cases_.remove(index); - onChanged(); - } else { - casesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public build.buf.validate.conformance.harness.CaseResult.Builder getCasesBuilder( - int index) { - return getCasesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public build.buf.validate.conformance.harness.CaseResultOrBuilder getCasesOrBuilder( - int index) { - if (casesBuilder_ == null) { - return cases_.get(index); } else { - return casesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public java.util.List - getCasesOrBuilderList() { - if (casesBuilder_ != null) { - return casesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cases_); - } - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public build.buf.validate.conformance.harness.CaseResult.Builder addCasesBuilder() { - return getCasesFieldBuilder().addBuilder( - build.buf.validate.conformance.harness.CaseResult.getDefaultInstance()); - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public build.buf.validate.conformance.harness.CaseResult.Builder addCasesBuilder( - int index) { - return getCasesFieldBuilder().addBuilder( - index, build.buf.validate.conformance.harness.CaseResult.getDefaultInstance()); - } - /** - *
-     * List of case results.
-     * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - public java.util.List - getCasesBuilderList() { - return getCasesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.harness.CaseResult, build.buf.validate.conformance.harness.CaseResult.Builder, build.buf.validate.conformance.harness.CaseResultOrBuilder> - getCasesFieldBuilder() { - if (casesBuilder_ == null) { - casesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.conformance.harness.CaseResult, build.buf.validate.conformance.harness.CaseResult.Builder, build.buf.validate.conformance.harness.CaseResultOrBuilder>( - cases_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - cases_ = null; - } - return casesBuilder_; - } - - private com.google.protobuf.DescriptorProtos.FileDescriptorSet fdset_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder> fdsetBuilder_; - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - * @return Whether the fdset field is set. - */ - public boolean hasFdset() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - * @return The fdset. - */ - public com.google.protobuf.DescriptorProtos.FileDescriptorSet getFdset() { - if (fdsetBuilder_ == null) { - return fdset_ == null ? com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } else { - return fdsetBuilder_.getMessage(); - } - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - public Builder setFdset(com.google.protobuf.DescriptorProtos.FileDescriptorSet value) { - if (fdsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdset_ = value; - } else { - fdsetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - public Builder setFdset( - com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder builderForValue) { - if (fdsetBuilder_ == null) { - fdset_ = builderForValue.build(); - } else { - fdsetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - public Builder mergeFdset(com.google.protobuf.DescriptorProtos.FileDescriptorSet value) { - if (fdsetBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - fdset_ != null && - fdset_ != com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance()) { - getFdsetBuilder().mergeFrom(value); - } else { - fdset_ = value; - } - } else { - fdsetBuilder_.mergeFrom(value); - } - if (fdset_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - public Builder clearFdset() { - bitField0_ = (bitField0_ & ~0x00000010); - fdset_ = null; - if (fdsetBuilder_ != null) { - fdsetBuilder_.dispose(); - fdsetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - public com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder getFdsetBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getFdsetFieldBuilder().getBuilder(); - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - public com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder getFdsetOrBuilder() { - if (fdsetBuilder_ != null) { - return fdsetBuilder_.getMessageOrBuilder(); - } else { - return fdset_ == null ? - com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } - } - /** - *
-     * The file descriptor set used to generate this result.
-     * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder> - getFdsetFieldBuilder() { - if (fdsetBuilder_ == null) { - fdsetBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder>( - getFdset(), - getParentForChildren(), - isClean()); - fdset_ = null; - } - return fdsetBuilder_; - } - - private int expectedFailures_ ; - /** - *
-     * Count of expected failures.
-     * 
- * - * int32 expected_failures = 6 [json_name = "expectedFailures"]; - * @return The expectedFailures. - */ - @java.lang.Override - public int getExpectedFailures() { - return expectedFailures_; - } - /** - *
-     * Count of expected failures.
-     * 
- * - * int32 expected_failures = 6 [json_name = "expectedFailures"]; - * @param value The expectedFailures to set. - * @return This builder for chaining. - */ - public Builder setExpectedFailures(int value) { - - expectedFailures_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * Count of expected failures.
-     * 
- * - * int32 expected_failures = 6 [json_name = "expectedFailures"]; - * @return This builder for chaining. - */ - public Builder clearExpectedFailures() { - bitField0_ = (bitField0_ & ~0x00000020); - expectedFailures_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.SuiteResults) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.SuiteResults) - private static final build.buf.validate.conformance.harness.SuiteResults DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.SuiteResults(); - } - - public static build.buf.validate.conformance.harness.SuiteResults getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SuiteResults 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.harness.SuiteResults getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResultsOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResultsOrBuilder.java deleted file mode 100644 index 3568ce7f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/SuiteResultsOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/results.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface SuiteResultsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.SuiteResults) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The suite name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The suite name.
-   * 
- * - * string name = 1 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Count of successes.
-   * 
- * - * int32 successes = 2 [json_name = "successes"]; - * @return The successes. - */ - int getSuccesses(); - - /** - *
-   * Count of failures.
-   * 
- * - * int32 failures = 3 [json_name = "failures"]; - * @return The failures. - */ - int getFailures(); - - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - java.util.List - getCasesList(); - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - build.buf.validate.conformance.harness.CaseResult getCases(int index); - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - int getCasesCount(); - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - java.util.List - getCasesOrBuilderList(); - /** - *
-   * List of case results.
-   * 
- * - * repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; - */ - build.buf.validate.conformance.harness.CaseResultOrBuilder getCasesOrBuilder( - int index); - - /** - *
-   * The file descriptor set used to generate this result.
-   * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - * @return Whether the fdset field is set. - */ - boolean hasFdset(); - /** - *
-   * The file descriptor set used to generate this result.
-   * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - * @return The fdset. - */ - com.google.protobuf.DescriptorProtos.FileDescriptorSet getFdset(); - /** - *
-   * The file descriptor set used to generate this result.
-   * 
- * - * .google.protobuf.FileDescriptorSet fdset = 5 [json_name = "fdset"]; - */ - com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder getFdsetOrBuilder(); - - /** - *
-   * Count of expected failures.
-   * 
- * - * int32 expected_failures = 6 [json_name = "expectedFailures"]; - * @return The expectedFailures. - */ - int getExpectedFailures(); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequest.java b/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequest.java deleted file mode 100644 index 2d57a1f9..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequest.java +++ /dev/null @@ -1,887 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * TestConformanceRequest is the request for Conformance Tests.
- * The FileDescriptorSet is the FileDescriptorSet to test against.
- * The cases map is a map of case name to the Any message that represents the case.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.TestConformanceRequest} - */ -public final class TestConformanceRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.TestConformanceRequest) - TestConformanceRequestOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestConformanceRequest.class.getName()); - } - // Use TestConformanceRequest.newBuilder() to construct. - private TestConformanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TestConformanceRequest() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetCases(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.TestConformanceRequest.class, build.buf.validate.conformance.harness.TestConformanceRequest.Builder.class); - } - - private int bitField0_; - public static final int FDSET_FIELD_NUMBER = 2; - private com.google.protobuf.DescriptorProtos.FileDescriptorSet fdset_; - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - * @return Whether the fdset field is set. - */ - @java.lang.Override - public boolean hasFdset() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - * @return The fdset. - */ - @java.lang.Override - public com.google.protobuf.DescriptorProtos.FileDescriptorSet getFdset() { - return fdset_ == null ? com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - @java.lang.Override - public com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder getFdsetOrBuilder() { - return fdset_ == null ? com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } - - public static final int CASES_FIELD_NUMBER = 3; - private static final class CasesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.protobuf.Any> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceRequest_CasesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Any.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.protobuf.Any> cases_; - private com.google.protobuf.MapField - internalGetCases() { - if (cases_ == null) { - return com.google.protobuf.MapField.emptyMapField( - CasesDefaultEntryHolder.defaultEntry); - } - return cases_; - } - public int getCasesCount() { - return internalGetCases().getMap().size(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public boolean containsCases( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetCases().getMap().containsKey(key); - } - /** - * Use {@link #getCasesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getCases() { - return getCasesMap(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public java.util.Map getCasesMap() { - return internalGetCases().getMap(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Any getCasesOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Any defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetCases().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public com.google.protobuf.Any getCasesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetCases().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasFdset()) { - if (!getFdset().isInitialized()) { - memoizedIsInitialized = 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(2, getFdset()); - } - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetCases(), - CasesDefaultEntryHolder.defaultEntry, - 3); - 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(2, getFdset()); - } - for (java.util.Map.Entry entry - : internalGetCases().getMap().entrySet()) { - com.google.protobuf.MapEntry - cases__ = CasesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, cases__); - } - 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.harness.TestConformanceRequest)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.TestConformanceRequest other = (build.buf.validate.conformance.harness.TestConformanceRequest) obj; - - if (hasFdset() != other.hasFdset()) return false; - if (hasFdset()) { - if (!getFdset() - .equals(other.getFdset())) return false; - } - if (!internalGetCases().equals( - other.internalGetCases())) 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 (hasFdset()) { - hash = (37 * hash) + FDSET_FIELD_NUMBER; - hash = (53 * hash) + getFdset().hashCode(); - } - if (!internalGetCases().getMap().isEmpty()) { - hash = (37 * hash) + CASES_FIELD_NUMBER; - hash = (53 * hash) + internalGetCases().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.TestConformanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestConformanceRequest 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.harness.TestConformanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestConformanceRequest 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.harness.TestConformanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestConformanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.TestConformanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.TestConformanceRequest 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.harness.TestConformanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.TestConformanceRequest 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.harness.TestConformanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.TestConformanceRequest 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.harness.TestConformanceRequest 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; - } - /** - *
-   * TestConformanceRequest is the request for Conformance Tests.
-   * The FileDescriptorSet is the FileDescriptorSet to test against.
-   * The cases map is a map of case name to the Any message that represents the case.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.TestConformanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.TestConformanceRequest) - build.buf.validate.conformance.harness.TestConformanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetCases(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableCases(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.TestConformanceRequest.class, build.buf.validate.conformance.harness.TestConformanceRequest.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.TestConformanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getFdsetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fdset_ = null; - if (fdsetBuilder_ != null) { - fdsetBuilder_.dispose(); - fdsetBuilder_ = null; - } - internalGetMutableCases().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceRequest_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestConformanceRequest getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.TestConformanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestConformanceRequest build() { - build.buf.validate.conformance.harness.TestConformanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestConformanceRequest buildPartial() { - build.buf.validate.conformance.harness.TestConformanceRequest result = new build.buf.validate.conformance.harness.TestConformanceRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.harness.TestConformanceRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fdset_ = fdsetBuilder_ == null - ? fdset_ - : fdsetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.cases_ = internalGetCases().build(CasesDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.TestConformanceRequest) { - return mergeFrom((build.buf.validate.conformance.harness.TestConformanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.TestConformanceRequest other) { - if (other == build.buf.validate.conformance.harness.TestConformanceRequest.getDefaultInstance()) return this; - if (other.hasFdset()) { - mergeFdset(other.getFdset()); - } - internalGetMutableCases().mergeFrom( - other.internalGetCases()); - bitField0_ |= 0x00000002; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (hasFdset()) { - if (!getFdset().isInitialized()) { - return false; - } - } - 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 18: { - input.readMessage( - getFdsetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 18 - case 26: { - com.google.protobuf.MapEntry - cases__ = input.readMessage( - CasesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableCases().ensureBuilderMap().put( - cases__.getKey(), cases__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 26 - 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.DescriptorProtos.FileDescriptorSet fdset_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder> fdsetBuilder_; - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - * @return Whether the fdset field is set. - */ - public boolean hasFdset() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - * @return The fdset. - */ - public com.google.protobuf.DescriptorProtos.FileDescriptorSet getFdset() { - if (fdsetBuilder_ == null) { - return fdset_ == null ? com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } else { - return fdsetBuilder_.getMessage(); - } - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - public Builder setFdset(com.google.protobuf.DescriptorProtos.FileDescriptorSet value) { - if (fdsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdset_ = value; - } else { - fdsetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - public Builder setFdset( - com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder builderForValue) { - if (fdsetBuilder_ == null) { - fdset_ = builderForValue.build(); - } else { - fdsetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - public Builder mergeFdset(com.google.protobuf.DescriptorProtos.FileDescriptorSet value) { - if (fdsetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - fdset_ != null && - fdset_ != com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance()) { - getFdsetBuilder().mergeFrom(value); - } else { - fdset_ = value; - } - } else { - fdsetBuilder_.mergeFrom(value); - } - if (fdset_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - public Builder clearFdset() { - bitField0_ = (bitField0_ & ~0x00000001); - fdset_ = null; - if (fdsetBuilder_ != null) { - fdsetBuilder_.dispose(); - fdsetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - public com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder getFdsetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getFdsetFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - public com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder getFdsetOrBuilder() { - if (fdsetBuilder_ != null) { - return fdsetBuilder_.getMessageOrBuilder(); - } else { - return fdset_ == null ? - com.google.protobuf.DescriptorProtos.FileDescriptorSet.getDefaultInstance() : fdset_; - } - } - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder> - getFdsetFieldBuilder() { - if (fdsetBuilder_ == null) { - fdsetBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.DescriptorProtos.FileDescriptorSet, com.google.protobuf.DescriptorProtos.FileDescriptorSet.Builder, com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder>( - getFdset(), - getParentForChildren(), - isClean()); - fdset_ = null; - } - return fdsetBuilder_; - } - - private static final class CasesConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.google.protobuf.Any build(com.google.protobuf.AnyOrBuilder val) { - if (val instanceof com.google.protobuf.Any) { return (com.google.protobuf.Any) val; } - return ((com.google.protobuf.Any.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return CasesDefaultEntryHolder.defaultEntry; - } - }; - private static final CasesConverter casesConverter = new CasesConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> cases_; - private com.google.protobuf.MapFieldBuilder - internalGetCases() { - if (cases_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(casesConverter); - } - return cases_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableCases() { - if (cases_ == null) { - cases_ = new com.google.protobuf.MapFieldBuilder<>(casesConverter); - } - bitField0_ |= 0x00000002; - onChanged(); - return cases_; - } - public int getCasesCount() { - return internalGetCases().ensureBuilderMap().size(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public boolean containsCases( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetCases().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getCasesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getCases() { - return getCasesMap(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public java.util.Map getCasesMap() { - return internalGetCases().getImmutableMap(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public /* nullable */ -com.google.protobuf.Any getCasesOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Any defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableCases().ensureBuilderMap(); - return map.containsKey(key) ? casesConverter.build(map.get(key)) : defaultValue; - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - @java.lang.Override - public com.google.protobuf.Any getCasesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableCases().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return casesConverter.build(map.get(key)); - } - public Builder clearCases() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableCases().clear(); - return this; - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - public Builder removeCases( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableCases().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableCases() { - bitField0_ |= 0x00000002; - return internalGetMutableCases().ensureMessageMap(); - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - public Builder putCases( - java.lang.String key, - com.google.protobuf.Any value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableCases().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - public Builder putAllCases( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableCases().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000002; - return this; - } - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - public com.google.protobuf.Any.Builder putCasesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableCases().ensureBuilderMap(); - com.google.protobuf.AnyOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Any.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Any) { - entry = ((com.google.protobuf.Any) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Any.Builder) entry; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.TestConformanceRequest) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.TestConformanceRequest) - private static final build.buf.validate.conformance.harness.TestConformanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.TestConformanceRequest(); - } - - public static build.buf.validate.conformance.harness.TestConformanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestConformanceRequest 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.harness.TestConformanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequestOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequestOrBuilder.java deleted file mode 100644 index 30961e3a..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceRequestOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface TestConformanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.TestConformanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - * @return Whether the fdset field is set. - */ - boolean hasFdset(); - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - * @return The fdset. - */ - com.google.protobuf.DescriptorProtos.FileDescriptorSet getFdset(); - /** - * .google.protobuf.FileDescriptorSet fdset = 2 [json_name = "fdset"]; - */ - com.google.protobuf.DescriptorProtos.FileDescriptorSetOrBuilder getFdsetOrBuilder(); - - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - int getCasesCount(); - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - boolean containsCases( - java.lang.String key); - /** - * Use {@link #getCasesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getCases(); - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - java.util.Map - getCasesMap(); - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - /* nullable */ -com.google.protobuf.Any getCasesOrDefault( - java.lang.String key, - /* nullable */ -com.google.protobuf.Any defaultValue); - /** - * map<string, .google.protobuf.Any> cases = 3 [json_name = "cases"]; - */ - com.google.protobuf.Any getCasesOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponse.java b/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponse.java deleted file mode 100644 index c72181a2..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponse.java +++ /dev/null @@ -1,681 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * TestConformanceResponse is the response for Conformance Tests.
- * The results map is a map of case name to the TestResult.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.TestConformanceResponse} - */ -public final class TestConformanceResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.TestConformanceResponse) - TestConformanceResponseOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestConformanceResponse.class.getName()); - } - // Use TestConformanceResponse.newBuilder() to construct. - private TestConformanceResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TestConformanceResponse() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetResults(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.TestConformanceResponse.class, build.buf.validate.conformance.harness.TestConformanceResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 1; - private static final class ResultsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, build.buf.validate.conformance.harness.TestResult> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceResponse_ResultsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - build.buf.validate.conformance.harness.TestResult.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, build.buf.validate.conformance.harness.TestResult> results_; - private com.google.protobuf.MapField - internalGetResults() { - if (results_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResultsDefaultEntryHolder.defaultEntry); - } - return results_; - } - public int getResultsCount() { - return internalGetResults().getMap().size(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public boolean containsResults( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResults().getMap().containsKey(key); - } - /** - * Use {@link #getResultsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResults() { - return getResultsMap(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public java.util.Map getResultsMap() { - return internalGetResults().getMap(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.harness.TestResult getResultsOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.harness.TestResult defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResults().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult getResultsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResults().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - 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 { - com.google.protobuf.GeneratedMessage - .serializeStringMapTo( - output, - internalGetResults(), - ResultsDefaultEntryHolder.defaultEntry, - 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetResults().getMap().entrySet()) { - com.google.protobuf.MapEntry - results__ = ResultsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, results__); - } - 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.harness.TestConformanceResponse)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.TestConformanceResponse other = (build.buf.validate.conformance.harness.TestConformanceResponse) obj; - - if (!internalGetResults().equals( - other.internalGetResults())) 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 (!internalGetResults().getMap().isEmpty()) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetResults().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.TestConformanceResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestConformanceResponse 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.harness.TestConformanceResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestConformanceResponse 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.harness.TestConformanceResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestConformanceResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.TestConformanceResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.TestConformanceResponse 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.harness.TestConformanceResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.TestConformanceResponse 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.harness.TestConformanceResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.TestConformanceResponse 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.harness.TestConformanceResponse 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; - } - /** - *
-   * TestConformanceResponse is the response for Conformance Tests.
-   * The results map is a map of case name to the TestResult.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.TestConformanceResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.TestConformanceResponse) - build.buf.validate.conformance.harness.TestConformanceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetResults(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableResults(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.TestConformanceResponse.class, build.buf.validate.conformance.harness.TestConformanceResponse.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.TestConformanceResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableResults().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestConformanceResponse_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestConformanceResponse getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.TestConformanceResponse.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestConformanceResponse build() { - build.buf.validate.conformance.harness.TestConformanceResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestConformanceResponse buildPartial() { - build.buf.validate.conformance.harness.TestConformanceResponse result = new build.buf.validate.conformance.harness.TestConformanceResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.harness.TestConformanceResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.results_ = internalGetResults().build(ResultsDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.TestConformanceResponse) { - return mergeFrom((build.buf.validate.conformance.harness.TestConformanceResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.TestConformanceResponse other) { - if (other == build.buf.validate.conformance.harness.TestConformanceResponse.getDefaultInstance()) return this; - internalGetMutableResults().mergeFrom( - other.internalGetResults()); - bitField0_ |= 0x00000001; - 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.MapEntry - results__ = input.readMessage( - ResultsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableResults().ensureBuilderMap().put( - results__.getKey(), results__.getValue()); - 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 static final class ResultsConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult build(build.buf.validate.conformance.harness.TestResultOrBuilder val) { - if (val instanceof build.buf.validate.conformance.harness.TestResult) { return (build.buf.validate.conformance.harness.TestResult) val; } - return ((build.buf.validate.conformance.harness.TestResult.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return ResultsDefaultEntryHolder.defaultEntry; - } - }; - private static final ResultsConverter resultsConverter = new ResultsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, build.buf.validate.conformance.harness.TestResultOrBuilder, build.buf.validate.conformance.harness.TestResult, build.buf.validate.conformance.harness.TestResult.Builder> results_; - private com.google.protobuf.MapFieldBuilder - internalGetResults() { - if (results_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(resultsConverter); - } - return results_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableResults() { - if (results_ == null) { - results_ = new com.google.protobuf.MapFieldBuilder<>(resultsConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return results_; - } - public int getResultsCount() { - return internalGetResults().ensureBuilderMap().size(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public boolean containsResults( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResults().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getResultsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResults() { - return getResultsMap(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public java.util.Map getResultsMap() { - return internalGetResults().getImmutableMap(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public /* nullable */ -build.buf.validate.conformance.harness.TestResult getResultsOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.harness.TestResult defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableResults().ensureBuilderMap(); - return map.containsKey(key) ? resultsConverter.build(map.get(key)) : defaultValue; - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult getResultsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableResults().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return resultsConverter.build(map.get(key)); - } - public Builder clearResults() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableResults().clear(); - return this; - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - public Builder removeResults( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableResults().ensureBuilderMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableResults() { - bitField0_ |= 0x00000001; - return internalGetMutableResults().ensureMessageMap(); - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - public Builder putResults( - java.lang.String key, - build.buf.validate.conformance.harness.TestResult value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableResults().ensureBuilderMap() - .put(key, value); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - public Builder putAllResults( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableResults().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000001; - return this; - } - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - public build.buf.validate.conformance.harness.TestResult.Builder putResultsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableResults().ensureBuilderMap(); - build.buf.validate.conformance.harness.TestResultOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = build.buf.validate.conformance.harness.TestResult.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof build.buf.validate.conformance.harness.TestResult) { - entry = ((build.buf.validate.conformance.harness.TestResult) entry).toBuilder(); - builderMap.put(key, entry); - } - return (build.buf.validate.conformance.harness.TestResult.Builder) entry; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.TestConformanceResponse) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.TestConformanceResponse) - private static final build.buf.validate.conformance.harness.TestConformanceResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.TestConformanceResponse(); - } - - public static build.buf.validate.conformance.harness.TestConformanceResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestConformanceResponse 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.harness.TestConformanceResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponseOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponseOrBuilder.java deleted file mode 100644 index e44a66c5..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/TestConformanceResponseOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface TestConformanceResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.TestConformanceResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - int getResultsCount(); - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - boolean containsResults( - java.lang.String key); - /** - * Use {@link #getResultsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getResults(); - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - java.util.Map - getResultsMap(); - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - /* nullable */ -build.buf.validate.conformance.harness.TestResult getResultsOrDefault( - java.lang.String key, - /* nullable */ -build.buf.validate.conformance.harness.TestResult defaultValue); - /** - * map<string, .buf.validate.conformance.harness.TestResult> results = 1 [json_name = "results"]; - */ - build.buf.validate.conformance.harness.TestResult getResultsOrThrow( - java.lang.String key); -} diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/TestResult.java b/conformance/src/main/java/build/buf/validate/conformance/harness/TestResult.java deleted file mode 100644 index 65fe9bad..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/TestResult.java +++ /dev/null @@ -1,1447 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -/** - *
- * TestResult is the result of a single test. Only one of the fields will be set.
- * 
- * - * Protobuf type {@code buf.validate.conformance.harness.TestResult} - */ -public final class TestResult extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.conformance.harness.TestResult) - TestResultOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TestResult.class.getName()); - } - // Use TestResult.newBuilder() to construct. - private TestResult(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TestResult() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.TestResult.class, build.buf.validate.conformance.harness.TestResult.Builder.class); - } - - private int resultCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SUCCESS(1), - VALIDATION_ERROR(2), - COMPILATION_ERROR(3), - RUNTIME_ERROR(4), - UNEXPECTED_ERROR(5), - RESULT_NOT_SET(0); - private final int value; - private ResultCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 1: return SUCCESS; - case 2: return VALIDATION_ERROR; - case 3: return COMPILATION_ERROR; - case 4: return RUNTIME_ERROR; - case 5: return UNEXPECTED_ERROR; - case 0: return RESULT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public static final int SUCCESS_FIELD_NUMBER = 1; - /** - *
-   * success is true if the test succeeded.
-   * 
- * - * bool success = 1 [json_name = "success"]; - * @return Whether the success field is set. - */ - @java.lang.Override - public boolean hasSuccess() { - return resultCase_ == 1; - } - /** - *
-   * success is true if the test succeeded.
-   * 
- * - * bool success = 1 [json_name = "success"]; - * @return The success. - */ - @java.lang.Override - public boolean getSuccess() { - if (resultCase_ == 1) { - return (java.lang.Boolean) result_; - } - return false; - } - - public static final int VALIDATION_ERROR_FIELD_NUMBER = 2; - /** - *
-   * validation_error is the error if the test failed due to validation errors.
-   * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - * @return Whether the validationError field is set. - */ - @java.lang.Override - public boolean hasValidationError() { - return resultCase_ == 2; - } - /** - *
-   * validation_error is the error if the test failed due to validation errors.
-   * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - * @return The validationError. - */ - @java.lang.Override - public build.buf.validate.Violations getValidationError() { - if (resultCase_ == 2) { - return (build.buf.validate.Violations) result_; - } - return build.buf.validate.Violations.getDefaultInstance(); - } - /** - *
-   * validation_error is the error if the test failed due to validation errors.
-   * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - @java.lang.Override - public build.buf.validate.ViolationsOrBuilder getValidationErrorOrBuilder() { - if (resultCase_ == 2) { - return (build.buf.validate.Violations) result_; - } - return build.buf.validate.Violations.getDefaultInstance(); - } - - public static final int COMPILATION_ERROR_FIELD_NUMBER = 3; - /** - *
-   * compilation_error is the error if the test failed due to compilation errors.
-   * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return Whether the compilationError field is set. - */ - public boolean hasCompilationError() { - return resultCase_ == 3; - } - /** - *
-   * compilation_error is the error if the test failed due to compilation errors.
-   * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return The compilationError. - */ - public java.lang.String getCompilationError() { - java.lang.Object ref = ""; - if (resultCase_ == 3) { - ref = result_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (resultCase_ == 3) { - result_ = s; - } - return s; - } - } - /** - *
-   * compilation_error is the error if the test failed due to compilation errors.
-   * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return The bytes for compilationError. - */ - public com.google.protobuf.ByteString - getCompilationErrorBytes() { - java.lang.Object ref = ""; - if (resultCase_ == 3) { - ref = result_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (resultCase_ == 3) { - result_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RUNTIME_ERROR_FIELD_NUMBER = 4; - /** - *
-   * runtime_error is the error if the test failed due to runtime errors.
-   * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return Whether the runtimeError field is set. - */ - public boolean hasRuntimeError() { - return resultCase_ == 4; - } - /** - *
-   * runtime_error is the error if the test failed due to runtime errors.
-   * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return The runtimeError. - */ - public java.lang.String getRuntimeError() { - java.lang.Object ref = ""; - if (resultCase_ == 4) { - ref = result_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (resultCase_ == 4) { - result_ = s; - } - return s; - } - } - /** - *
-   * runtime_error is the error if the test failed due to runtime errors.
-   * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return The bytes for runtimeError. - */ - public com.google.protobuf.ByteString - getRuntimeErrorBytes() { - java.lang.Object ref = ""; - if (resultCase_ == 4) { - ref = result_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (resultCase_ == 4) { - result_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNEXPECTED_ERROR_FIELD_NUMBER = 5; - /** - *
-   * unexpected_error is any other error that may have occurred.
-   * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return Whether the unexpectedError field is set. - */ - public boolean hasUnexpectedError() { - return resultCase_ == 5; - } - /** - *
-   * unexpected_error is any other error that may have occurred.
-   * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return The unexpectedError. - */ - public java.lang.String getUnexpectedError() { - java.lang.Object ref = ""; - if (resultCase_ == 5) { - ref = result_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (resultCase_ == 5) { - result_ = s; - } - return s; - } - } - /** - *
-   * unexpected_error is any other error that may have occurred.
-   * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return The bytes for unexpectedError. - */ - public com.google.protobuf.ByteString - getUnexpectedErrorBytes() { - java.lang.Object ref = ""; - if (resultCase_ == 5) { - ref = result_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (resultCase_ == 5) { - result_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (resultCase_ == 1) { - output.writeBool( - 1, (boolean)((java.lang.Boolean) result_)); - } - if (resultCase_ == 2) { - output.writeMessage(2, (build.buf.validate.Violations) result_); - } - if (resultCase_ == 3) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, result_); - } - if (resultCase_ == 4) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, result_); - } - if (resultCase_ == 5) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, result_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (resultCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 1, (boolean)((java.lang.Boolean) result_)); - } - if (resultCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (build.buf.validate.Violations) result_); - } - if (resultCase_ == 3) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, result_); - } - if (resultCase_ == 4) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, result_); - } - if (resultCase_ == 5) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, result_); - } - 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.harness.TestResult)) { - return super.equals(obj); - } - build.buf.validate.conformance.harness.TestResult other = (build.buf.validate.conformance.harness.TestResult) obj; - - if (!getResultCase().equals(other.getResultCase())) return false; - switch (resultCase_) { - case 1: - if (getSuccess() - != other.getSuccess()) return false; - break; - case 2: - if (!getValidationError() - .equals(other.getValidationError())) return false; - break; - case 3: - if (!getCompilationError() - .equals(other.getCompilationError())) return false; - break; - case 4: - if (!getRuntimeError() - .equals(other.getRuntimeError())) return false; - break; - case 5: - if (!getUnexpectedError() - .equals(other.getUnexpectedError())) return false; - break; - case 0: - default: - } - 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(); - switch (resultCase_) { - case 1: - hash = (37 * hash) + SUCCESS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getSuccess()); - break; - case 2: - hash = (37 * hash) + VALIDATION_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getValidationError().hashCode(); - break; - case 3: - hash = (37 * hash) + COMPILATION_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getCompilationError().hashCode(); - break; - case 4: - hash = (37 * hash) + RUNTIME_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getRuntimeError().hashCode(); - break; - case 5: - hash = (37 * hash) + UNEXPECTED_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getUnexpectedError().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.conformance.harness.TestResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestResult 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.harness.TestResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestResult 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.harness.TestResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.conformance.harness.TestResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.conformance.harness.TestResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.TestResult 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.harness.TestResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.conformance.harness.TestResult 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.harness.TestResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.conformance.harness.TestResult 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.harness.TestResult 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; - } - /** - *
-   * TestResult is the result of a single test. Only one of the fields will be set.
-   * 
- * - * Protobuf type {@code buf.validate.conformance.harness.TestResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.conformance.harness.TestResult) - build.buf.validate.conformance.harness.TestResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.conformance.harness.TestResult.class, build.buf.validate.conformance.harness.TestResult.Builder.class); - } - - // Construct using build.buf.validate.conformance.harness.TestResult.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (validationErrorBuilder_ != null) { - validationErrorBuilder_.clear(); - } - resultCase_ = 0; - result_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.conformance.harness.HarnessProto.internal_static_buf_validate_conformance_harness_TestResult_descriptor; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult getDefaultInstanceForType() { - return build.buf.validate.conformance.harness.TestResult.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult build() { - build.buf.validate.conformance.harness.TestResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.conformance.harness.TestResult buildPartial() { - build.buf.validate.conformance.harness.TestResult result = new build.buf.validate.conformance.harness.TestResult(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.conformance.harness.TestResult result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.conformance.harness.TestResult result) { - result.resultCase_ = resultCase_; - result.result_ = this.result_; - if (resultCase_ == 2 && - validationErrorBuilder_ != null) { - result.result_ = validationErrorBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.conformance.harness.TestResult) { - return mergeFrom((build.buf.validate.conformance.harness.TestResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.conformance.harness.TestResult other) { - if (other == build.buf.validate.conformance.harness.TestResult.getDefaultInstance()) return this; - switch (other.getResultCase()) { - case SUCCESS: { - setSuccess(other.getSuccess()); - break; - } - case VALIDATION_ERROR: { - mergeValidationError(other.getValidationError()); - break; - } - case COMPILATION_ERROR: { - resultCase_ = 3; - result_ = other.result_; - onChanged(); - break; - } - case RUNTIME_ERROR: { - resultCase_ = 4; - result_ = other.result_; - onChanged(); - break; - } - case UNEXPECTED_ERROR: { - resultCase_ = 5; - result_ = other.result_; - onChanged(); - break; - } - case RESULT_NOT_SET: { - break; - } - } - 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 8: { - result_ = input.readBool(); - resultCase_ = 1; - break; - } // case 8 - case 18: { - input.readMessage( - getValidationErrorFieldBuilder().getBuilder(), - extensionRegistry); - resultCase_ = 2; - break; - } // case 18 - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - resultCase_ = 3; - result_ = s; - break; - } // case 26 - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - resultCase_ = 4; - result_ = s; - break; - } // case 34 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - resultCase_ = 5; - result_ = s; - break; - } // case 42 - 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 resultCase_ = 0; - private java.lang.Object result_; - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - *
-     * success is true if the test succeeded.
-     * 
- * - * bool success = 1 [json_name = "success"]; - * @return Whether the success field is set. - */ - public boolean hasSuccess() { - return resultCase_ == 1; - } - /** - *
-     * success is true if the test succeeded.
-     * 
- * - * bool success = 1 [json_name = "success"]; - * @return The success. - */ - public boolean getSuccess() { - if (resultCase_ == 1) { - return (java.lang.Boolean) result_; - } - return false; - } - /** - *
-     * success is true if the test succeeded.
-     * 
- * - * bool success = 1 [json_name = "success"]; - * @param value The success to set. - * @return This builder for chaining. - */ - public Builder setSuccess(boolean value) { - - resultCase_ = 1; - result_ = value; - onChanged(); - return this; - } - /** - *
-     * success is true if the test succeeded.
-     * 
- * - * bool success = 1 [json_name = "success"]; - * @return This builder for chaining. - */ - public Builder clearSuccess() { - if (resultCase_ == 1) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Violations, build.buf.validate.Violations.Builder, build.buf.validate.ViolationsOrBuilder> validationErrorBuilder_; - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - * @return Whether the validationError field is set. - */ - @java.lang.Override - public boolean hasValidationError() { - return resultCase_ == 2; - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - * @return The validationError. - */ - @java.lang.Override - public build.buf.validate.Violations getValidationError() { - if (validationErrorBuilder_ == null) { - if (resultCase_ == 2) { - return (build.buf.validate.Violations) result_; - } - return build.buf.validate.Violations.getDefaultInstance(); - } else { - if (resultCase_ == 2) { - return validationErrorBuilder_.getMessage(); - } - return build.buf.validate.Violations.getDefaultInstance(); - } - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - public Builder setValidationError(build.buf.validate.Violations value) { - if (validationErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - validationErrorBuilder_.setMessage(value); - } - resultCase_ = 2; - return this; - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - public Builder setValidationError( - build.buf.validate.Violations.Builder builderForValue) { - if (validationErrorBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - validationErrorBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 2; - return this; - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - public Builder mergeValidationError(build.buf.validate.Violations value) { - if (validationErrorBuilder_ == null) { - if (resultCase_ == 2 && - result_ != build.buf.validate.Violations.getDefaultInstance()) { - result_ = build.buf.validate.Violations.newBuilder((build.buf.validate.Violations) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 2) { - validationErrorBuilder_.mergeFrom(value); - } else { - validationErrorBuilder_.setMessage(value); - } - } - resultCase_ = 2; - return this; - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - public Builder clearValidationError() { - if (validationErrorBuilder_ == null) { - if (resultCase_ == 2) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 2) { - resultCase_ = 0; - result_ = null; - } - validationErrorBuilder_.clear(); - } - return this; - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - public build.buf.validate.Violations.Builder getValidationErrorBuilder() { - return getValidationErrorFieldBuilder().getBuilder(); - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - @java.lang.Override - public build.buf.validate.ViolationsOrBuilder getValidationErrorOrBuilder() { - if ((resultCase_ == 2) && (validationErrorBuilder_ != null)) { - return validationErrorBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 2) { - return (build.buf.validate.Violations) result_; - } - return build.buf.validate.Violations.getDefaultInstance(); - } - } - /** - *
-     * validation_error is the error if the test failed due to validation errors.
-     * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Violations, build.buf.validate.Violations.Builder, build.buf.validate.ViolationsOrBuilder> - getValidationErrorFieldBuilder() { - if (validationErrorBuilder_ == null) { - if (!(resultCase_ == 2)) { - result_ = build.buf.validate.Violations.getDefaultInstance(); - } - validationErrorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Violations, build.buf.validate.Violations.Builder, build.buf.validate.ViolationsOrBuilder>( - (build.buf.validate.Violations) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 2; - onChanged(); - return validationErrorBuilder_; - } - - /** - *
-     * compilation_error is the error if the test failed due to compilation errors.
-     * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return Whether the compilationError field is set. - */ - @java.lang.Override - public boolean hasCompilationError() { - return resultCase_ == 3; - } - /** - *
-     * compilation_error is the error if the test failed due to compilation errors.
-     * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return The compilationError. - */ - @java.lang.Override - public java.lang.String getCompilationError() { - java.lang.Object ref = ""; - if (resultCase_ == 3) { - ref = result_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (resultCase_ == 3) { - result_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * compilation_error is the error if the test failed due to compilation errors.
-     * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return The bytes for compilationError. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCompilationErrorBytes() { - java.lang.Object ref = ""; - if (resultCase_ == 3) { - ref = result_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (resultCase_ == 3) { - result_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * compilation_error is the error if the test failed due to compilation errors.
-     * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @param value The compilationError to set. - * @return This builder for chaining. - */ - public Builder setCompilationError( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resultCase_ = 3; - result_ = value; - onChanged(); - return this; - } - /** - *
-     * compilation_error is the error if the test failed due to compilation errors.
-     * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return This builder for chaining. - */ - public Builder clearCompilationError() { - if (resultCase_ == 3) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - return this; - } - /** - *
-     * compilation_error is the error if the test failed due to compilation errors.
-     * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @param value The bytes for compilationError to set. - * @return This builder for chaining. - */ - public Builder setCompilationErrorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resultCase_ = 3; - result_ = value; - onChanged(); - return this; - } - - /** - *
-     * runtime_error is the error if the test failed due to runtime errors.
-     * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return Whether the runtimeError field is set. - */ - @java.lang.Override - public boolean hasRuntimeError() { - return resultCase_ == 4; - } - /** - *
-     * runtime_error is the error if the test failed due to runtime errors.
-     * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return The runtimeError. - */ - @java.lang.Override - public java.lang.String getRuntimeError() { - java.lang.Object ref = ""; - if (resultCase_ == 4) { - ref = result_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (resultCase_ == 4) { - result_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * runtime_error is the error if the test failed due to runtime errors.
-     * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return The bytes for runtimeError. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRuntimeErrorBytes() { - java.lang.Object ref = ""; - if (resultCase_ == 4) { - ref = result_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (resultCase_ == 4) { - result_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * runtime_error is the error if the test failed due to runtime errors.
-     * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @param value The runtimeError to set. - * @return This builder for chaining. - */ - public Builder setRuntimeError( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resultCase_ = 4; - result_ = value; - onChanged(); - return this; - } - /** - *
-     * runtime_error is the error if the test failed due to runtime errors.
-     * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return This builder for chaining. - */ - public Builder clearRuntimeError() { - if (resultCase_ == 4) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - return this; - } - /** - *
-     * runtime_error is the error if the test failed due to runtime errors.
-     * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @param value The bytes for runtimeError to set. - * @return This builder for chaining. - */ - public Builder setRuntimeErrorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resultCase_ = 4; - result_ = value; - onChanged(); - return this; - } - - /** - *
-     * unexpected_error is any other error that may have occurred.
-     * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return Whether the unexpectedError field is set. - */ - @java.lang.Override - public boolean hasUnexpectedError() { - return resultCase_ == 5; - } - /** - *
-     * unexpected_error is any other error that may have occurred.
-     * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return The unexpectedError. - */ - @java.lang.Override - public java.lang.String getUnexpectedError() { - java.lang.Object ref = ""; - if (resultCase_ == 5) { - ref = result_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (resultCase_ == 5) { - result_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * unexpected_error is any other error that may have occurred.
-     * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return The bytes for unexpectedError. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUnexpectedErrorBytes() { - java.lang.Object ref = ""; - if (resultCase_ == 5) { - ref = result_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (resultCase_ == 5) { - result_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * unexpected_error is any other error that may have occurred.
-     * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @param value The unexpectedError to set. - * @return This builder for chaining. - */ - public Builder setUnexpectedError( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - resultCase_ = 5; - result_ = value; - onChanged(); - return this; - } - /** - *
-     * unexpected_error is any other error that may have occurred.
-     * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return This builder for chaining. - */ - public Builder clearUnexpectedError() { - if (resultCase_ == 5) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - return this; - } - /** - *
-     * unexpected_error is any other error that may have occurred.
-     * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @param value The bytes for unexpectedError to set. - * @return This builder for chaining. - */ - public Builder setUnexpectedErrorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - resultCase_ = 5; - result_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.conformance.harness.TestResult) - } - - // @@protoc_insertion_point(class_scope:buf.validate.conformance.harness.TestResult) - private static final build.buf.validate.conformance.harness.TestResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.conformance.harness.TestResult(); - } - - public static build.buf.validate.conformance.harness.TestResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TestResult 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.harness.TestResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/conformance/src/main/java/build/buf/validate/conformance/harness/TestResultOrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/harness/TestResultOrBuilder.java deleted file mode 100644 index 16dff32f..00000000 --- a/conformance/src/main/java/build/buf/validate/conformance/harness/TestResultOrBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/conformance/harness/harness.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate.conformance.harness; - -public interface TestResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.conformance.harness.TestResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * success is true if the test succeeded.
-   * 
- * - * bool success = 1 [json_name = "success"]; - * @return Whether the success field is set. - */ - boolean hasSuccess(); - /** - *
-   * success is true if the test succeeded.
-   * 
- * - * bool success = 1 [json_name = "success"]; - * @return The success. - */ - boolean getSuccess(); - - /** - *
-   * validation_error is the error if the test failed due to validation errors.
-   * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - * @return Whether the validationError field is set. - */ - boolean hasValidationError(); - /** - *
-   * validation_error is the error if the test failed due to validation errors.
-   * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - * @return The validationError. - */ - build.buf.validate.Violations getValidationError(); - /** - *
-   * validation_error is the error if the test failed due to validation errors.
-   * 
- * - * .buf.validate.Violations validation_error = 2 [json_name = "validationError"]; - */ - build.buf.validate.ViolationsOrBuilder getValidationErrorOrBuilder(); - - /** - *
-   * compilation_error is the error if the test failed due to compilation errors.
-   * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return Whether the compilationError field is set. - */ - boolean hasCompilationError(); - /** - *
-   * compilation_error is the error if the test failed due to compilation errors.
-   * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return The compilationError. - */ - java.lang.String getCompilationError(); - /** - *
-   * compilation_error is the error if the test failed due to compilation errors.
-   * 
- * - * string compilation_error = 3 [json_name = "compilationError"]; - * @return The bytes for compilationError. - */ - com.google.protobuf.ByteString - getCompilationErrorBytes(); - - /** - *
-   * runtime_error is the error if the test failed due to runtime errors.
-   * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return Whether the runtimeError field is set. - */ - boolean hasRuntimeError(); - /** - *
-   * runtime_error is the error if the test failed due to runtime errors.
-   * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return The runtimeError. - */ - java.lang.String getRuntimeError(); - /** - *
-   * runtime_error is the error if the test failed due to runtime errors.
-   * 
- * - * string runtime_error = 4 [json_name = "runtimeError"]; - * @return The bytes for runtimeError. - */ - com.google.protobuf.ByteString - getRuntimeErrorBytes(); - - /** - *
-   * unexpected_error is any other error that may have occurred.
-   * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return Whether the unexpectedError field is set. - */ - boolean hasUnexpectedError(); - /** - *
-   * unexpected_error is any other error that may have occurred.
-   * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return The unexpectedError. - */ - java.lang.String getUnexpectedError(); - /** - *
-   * unexpected_error is any other error that may have occurred.
-   * 
- * - * string unexpected_error = 5 [json_name = "unexpectedError"]; - * @return The bytes for unexpectedError. - */ - com.google.protobuf.ByteString - getUnexpectedErrorBytes(); - - build.buf.validate.conformance.harness.TestResult.ResultCase getResultCase(); -} diff --git a/conformance/src/test/java/build/buf/protovalidate/ValidatorTest.java b/conformance/src/test/java/build/buf/protovalidate/ValidatorTest.java index acc9e7da..dc6623f4 100644 --- a/conformance/src/test/java/build/buf/protovalidate/ValidatorTest.java +++ b/conformance/src/test/java/build/buf/protovalidate/ValidatorTest.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,8 +41,10 @@ import build.buf.validate.conformance.cases.TimestampConst; import build.buf.validate.conformance.cases.TimestampWithin; import build.buf.validate.conformance.cases.WrapperDouble; -import build.buf.validate.conformance.cases.custom_constraints.DynRuntimeError; -import build.buf.validate.conformance.cases.custom_constraints.FieldExpressions; +import build.buf.validate.conformance.cases.custom_rules.DynRuntimeError; +import build.buf.validate.conformance.cases.custom_rules.FieldExpressionMultipleScalar; +import build.buf.validate.conformance.cases.custom_rules.FieldExpressionNestedScalar; +import build.buf.validate.conformance.cases.custom_rules.FieldExpressionScalar; import com.google.protobuf.ByteString; import com.google.protobuf.DoubleValue; import com.google.protobuf.Duration; @@ -58,7 +60,7 @@ public class ValidatorTest { @BeforeEach public void setUp() { Config config = Config.newBuilder().build(); - validator = new Validator(config); + validator = ValidatorFactory.newBuilder().withConfig(config).build(); } @Test @@ -139,7 +141,8 @@ public void strictWrapperDouble() throws Exception { @Test public void strictFieldExpressions() throws Exception { - FieldExpressions invalid = FieldExpressions.newBuilder().build(); + FieldExpressionMultipleScalar invalid = + FieldExpressionMultipleScalar.newBuilder().setVal(1).build(); ValidationResult validate = validator.validate(invalid); assertThat(validate.getViolations()).hasSize(2); assertThat(validate.isSuccess()).isFalse(); @@ -174,14 +177,13 @@ public void strictSFixed64In() throws Exception { @Test public void strictFieldExpressionsNested() throws Exception { - FieldExpressions invalid = - FieldExpressions.newBuilder() - .setA(42) - .setC(FieldExpressions.Nested.newBuilder().setA(-3).build()) + FieldExpressionNestedScalar invalid = + FieldExpressionNestedScalar.newBuilder() + .setNested(FieldExpressionScalar.newBuilder().setVal(2)) .build(); ValidationResult validate = validator.validate(invalid); assertThat(validate.isSuccess()).isFalse(); - assertThat(validate.getViolations()).hasSize(4); + assertThat(validate.getViolations()).hasSize(1); } @Test diff --git a/gradle.properties b/gradle.properties index 55d6e2f0..5204de59 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,11 @@ # Version of buf.build/bufbuild/protovalidate to use. -protovalidate.version = v0.8.1 +protovalidate.version = v0.13.3 # Arguments to the protovalidate-conformance CLI -protovalidate.conformance.args = --strict_message --strict_error +protovalidate.conformance.args = --strict_message --strict_error --expected_failures=expected-failures.yaml # Argument to the license-header CLI -license-header.years = 2023-2024 +license-header.years = 2023-2025 + +# Version of the cel-spec that this implementation is conformant with +cel.spec.version = v0.24.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 06737b18..a995ef33 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,34 +1,28 @@ [versions] -assertj = "3.26.3" -buf = "1.45.0" -cel = "0.5.1" -ipaddress = "5.5.1" -junit = "5.11.3" -maven-publish = "0.30.0" -# When updating, make sure to update versions in the following files to match and regenerate code with 'make generate'. -# - buf.gen.yaml -# - conformance/buf.gen.yaml -# - src/test/resources/proto/buf.gen.imports.yaml -# - src/test/resources/proto/buf.gen.noimports.yaml -protobuf = "4.28.2" +assertj = "3.27.3" +buf = "1.55.1" +cel = "0.9.1" +error-prone = "2.38.0" +junit = "5.13.1" +maven-publish = "0.33.0" +protobuf = "4.31.1" [libraries] assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" } buf = { module = "build.buf:buf", version.ref = "buf" } -cel = { module = "org.projectnessie.cel:cel-bom", version.ref = "cel" } -cel-core = { module = "org.projectnessie.cel:cel-core" } -errorprone = { module = "com.google.errorprone:error_prone_core", version = "2.35.1" } -guava = { module = "com.google.guava:guava", version = "33.3.1-jre" } -ipaddress = { module = "com.github.seancfoley:ipaddress", version.ref = "ipaddress" } -jakarta-mail-api = { module = "jakarta.mail:jakarta.mail-api", version = "2.1.3" } +cel = { module = "dev.cel:cel", version.ref = "cel" } +errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "error-prone" } +errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "error-prone" } +grpc-protobuf = { module = "io.grpc:grpc-protobuf", version = "1.73.0" } +jspecify = { module ="org.jspecify:jspecify", version = "1.0.0" } junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" } maven-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "maven-publish" } -nullaway = { module = "com.uber.nullaway:nullaway", version = "0.12.0" } +nullaway = { module = "com.uber.nullaway:nullaway", version = "0.12.7" } protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" } -spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "6.25.0" } +spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "7.0.4" } [plugins] -errorprone = { id = "net.ltgt.errorprone", version = "4.1.0" } -git = { id = "com.palantir.git-version", version = "3.1.0" } +errorprone = { id = "net.ltgt.errorprone", version = "4.2.0" } +git = { id = "com.palantir.git-version", version = "3.3.0" } maven = { id = "com.vanniktech.maven.publish.base", version.ref = "maven-publish" } osdetector = { id = "com.google.osdetector", version = "1.7.3" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b9530d66f5e68d973ea569d8e19de379189..9bbc975c742b298b441bfb90dbc124400a3751b9 100644 GIT binary patch delta 34744 zcmXuJV_+R@)3u$(Y~1X)v28cDZQE*`9qyPrXx!Mg8{4+s*nWFo&-eX5|IMs5>pW(< z=OJ4cAZzeZfy=9lI!r-0aXh8xKdlGq)X)o#ON+mC6t7t0WtgR!HN%?__cvdWdtQC< zrFQ;?l@%CxY55`8y(t7?1P_O7(6pv~(~l!kHB;z2evtUsGHzEDL+y4*no%g#AsI~i zJ%SFMv{j__Yaxnn2NtDK+!1XZX`CB}DGMIT{#8(iAk*`?VagyHx&|p8npkmz=-n!f z3D+^yIjP`D&Lfz500rpq#dJE`vM|-N7=`uN0z86BpiMcCOCS^;6CUG4o1I)W{q6Gv z1vZB6+|7An``GNoG7D!xJGJd_Qv(M-kdVdsIJ?CrXFEH^@Ts83}QX}1%P6KQFNz^-=) z<|qo#qmR!Nonr$p*Uu1Jo2c~KLTrvc*Yw%L+`IL}y|kd+t{NCrXaP=7C00CO?=pgp z!fyr#XFfFXO6z2TP5P1W{H_`$PKzUiGtJd!U52%yAJf}~tgXF`1#}@y`cZl9y{J-A zyUA&-X)+^N?W=2Fm_ce2w$C6>YWp7MgXa{7=kwwy9guBx26=MnPpuSt zB4}vo3{qxa+*{^oHxe7;JMNMp>F`iNv>0!MsFtnb+5eEZ$WI z0M9}rA&cgQ^Q8t_ojofiHaKuhvIB{B9I}3`Dsy3vW8ibigX}Kc912|UZ1uhH?RuHU=i&ePe2w%65)nBkHr7Bx5WwMZj%1B53sUEj0bxI( zEbS%WOUw)3-B0`-m0!{mk7Q%={B#7C^Si>C04@P|qm7$Oxn3ki)G_oNQBTh6CN6d_kt@UKx1Ezdo5)J0Gdf@TcW|{ zdz1V?a>zldA7_5*Pjn6kDj|sbUqt-7X z5+oajeC}*6oi~vxZ#Ac&85cYcC$5OKUnYPv$Y~>H@)mnTtALo*>>5&=0QMr5{5?S; zCDF=RI@94n(!~sa`4Y{JLxgcvRqMM&T!}rRd~Kl#_X4Z&85;})o4W*g>?TaAVXSWB zeY#!8qz^hmC6FERsjTnC)1Xu1UPd7_LfuNvuVqF8(}Jfar=T-K9iChEuZi-FH(P%u zzLrjpq|?}8?g1Vnw^&{eqw~QY0f*9c71&*<5#9f5JlhJmG~IuV*8~nEBLr`KrvOvs zkOLdlZ58K?u>1{vAU0CtT>Il<I{Q8#A!lO7#73V&iN13;oV?Hl?N5xDK63)Rp3%5reb&3n5OQ|9H zDpYEI%JQXcrs^o*SCFY~iYf-VM<`7Tl@+kQS3tfR-fyH_JDaz5SYEMU-bTCLQ=JVG ze?ZPcj95Tci|bVvSZk3^enqQ?pIcZn24V=YT{cf-L|P&{-%%^ql$)^Vu~)Ida=h$bZAMQEi$MM|&b zY8;D;aEba_`W^=VdKfttW)h_zjRA&0A^T*tF*%+}TZQCOvFqKUu=xf1Bx@T?&~S(J zopXniA?s%}Q4p9~F(Ty{8wt$l4oHeT(#U6sAu4>Q+~a;}I>0>??v*wfke}0TwPaeE zj3gWtfNlD{jRgy7;S9PS?su5pnobi%Zoe0LVpw%`<)V=yT~Ht_UUXIna4YUa;p=-T4df6^;bz%;@|$F zK;s9#K@9hqZCST!66N0uPB+FT*kq22%ovtJ%<9ArE%hcX^!(Lz;3?kCZ@Ak*MThjTOKU&t+uJdN*6t$;DDmh zFStdHO>r)8L@qO}K@H~7Z);#f6WU{@Icn7Tc^|IZ`;K^ek9eCWdync`kWCt2s%D-k zE$wyPCui$@gJJ9Q`CtixbMF(GiCCbm`ut(~ce-G|Ji|PZ3~DHlG`Asn;skVhnu0r_ zgGbdmfl|er`87x@uYmd8A+!-3V95GE4&_^9N@hp4SC4 zeFU+Z3Ou&G! zlvZy|iHIIX3X2-Yb7YJ#{SYE9lCoixO+}(|u+H@Z6Rz-l1eZ7{I;vk+Y7kP7ev>hG zv|(I<4?N{EXMSvRgUhbQhDoP1&A;SEUGGep8*!@4u)fNbl3%cts<&=m5<5pi7M-HQ zPS#svbXWu2n&m*K6jL#@xm3VSMJxnxve5J6w1qGv`2>5<6F!uzGVHP1A(_xI7CWlX zm6*wpT@dmQ&pAlm`r~T;)>m5HK^H^cM`pCSoh{;-CE43rMkg<;HnZaCHfMq1LoN0S z%%7|$y~&k6wpiY@rsdCY9ZDh%9W6Pf=2^p=;iv-Ah^ACxwK3VmI}SMNneTa9n%biL z#GoojRHxa}R2zOo!G@<8M-B6vNp?)@_>#mYku#pe{O~t?~}1 zE8`)=BstIRk5W*xZw@2=89@ds?eQ~mxzkrA`y<$oR8bmaUw=rE%lFmzHY&aY8?<-N zp1|bb$(XrOMmiYy{pH#)D1GOmv5aj_?waU~*h~s{VZ&H_PhoXYz`C8Pss{ymY_hPG zt{NY&nPMH#FRvwR+T0(Xo2#T6;=oFmRgA9b-HVY72d|~YF+6v$F%sY0 zS#^LF7sTj>Itvyi!~){Hit*~3imOG*Xh51qLz+!W~`vUBVeZZ5&k34SD%Ha%5#aclSzMfoGWjiq9#rl}j zOf*8NY>VN(`W!DxaBgjBzj3oUAVlLY{R}tiZZ0o>K$vwr?+eggZ!q74m2t?lkvm9z zAmL2=W$jQJL>SSrbIOibe734A(K^B8`M@uao!`E$p+9D!rBea8Oxb|p5r3o4##G8K zMr0I9y&`21{@m=Bi+4tTJ-xy(DB_mG$kYv+qw&VBM(A9^wP9;Yo*6{#5tMpfa;m2FC+%l@ zk_cKXg-d&YUIj3(x{)aNwYGYjSHiOQK2K#yWt$vQomhbnF;Qhkxl`+;i{&+t{PrY` zp5r28&|UvmUK|&Jlv>oX4>XE87Zns?fiE6c;VP7BixT*6n}Zsbv$wd{gXyrE&Sd zhRlv!-{%~xv6yNvx@3^@JEa$={&giRpqZG>`{93 zEjM}YI1i6JSx$DJa&NWcl0M;igxX;est*nz=W16zMfJ0#+s{>Eo>bxmCi)m*43hU1 z;FL43I}nWszjSS%*F1UYt^)4?D6&pDEt1(atK(DKY1pAkNMG`a>_ec;KiT z^xMBBZ9i=;!_hNGlYp^uR0FW^lcBrs_c3ZvhcctW4*T^-DD^OU{{hK8yHahyGyCK& zL0>f0XW|wvi4f`bNTfO+P*Ao^L@8~ezagtl%l z{(2uo71sT3rKTQ-L#Y5Rsy#x)Eo+HQranZmk;r_Hf7WWkRq&QmP{?}do0X=;3U_UYspffJl7v*Y&GnW;M7$C-5ZlL*MU|q*6`Lvx$g^ z6>MRgOZ>~=OyR3>WL0pgh2_ znG)RNd_;ufNwgQ9L6U@`!5=xjzpK_UfYftHOJ)|hrycrpgn-sCKdQ{BY&OEV3`roT|=4I#PT@q`6Lx=Lem2M&k4ghOSjXPH5<%cDd>`!rE} z5;hyRQ|6o>*}@SFEzb7b%5iY}9vOMRGpIQqt%%m)iSpQ@iSAU+A{CmB^&-04fQlV9 z14~oE=?j{b{xE*X^1H)eezKTE27;-=UfNvQZ0kZ+m76{6xqAyTrEB&Oe`Mx{4N;}5 zXp%ojp}JYx6PE}Z`IBO3qWsZEfVPa4EEz0vnsFNkQ!kG8tcec&)k$+s&XmPErROoNxeTh9fATBk)w1g|9*~&S!%r0u6+FTn}dK-qa7cfK~tkJlV zMi{BX!>lQsZhSQUWAf(M6+McPrv>)j<*T&hC!*?qq{@ABJWX z@!~2Y1rhy*Z|x`DZUBuyayz}Kv5Pzrh}1wiHT{9|fh`Wl%ao=lRSwEFl*wy6BZ%vo zrt9Ocbicd1q$a{F6`4#ZQ6vJa@`}IGz+xUr*=6TF^GR?`u{1to&gqJpwf$LN0?G&! zsLNiG+}M+c{*j-Q4I zO!=lj&~{29Os}hgEv`iJ1tU)dx}=ob>DHSHKX|FVu2Y#pO|SsigHRgg4?!FX2>b3W z`m}xI<#_02adGka0TuAIg89kS?>*lKyI)T)Pa)|12XfH;k9}#=dzH6TiciCNO->e9m>!W)l&4B zd74@>_LL9OuJ&v5e0)l7ME@xW)9K@*LUd1RY}Vs_${3YC%+LfSR^H+I=(7Szh2nKB z_8bMoty|M+k9A|hGURVePvMf0XY9NYOiC@h^MLs-X@(8PV4zI7A155!RnZrBE9R1> zuI4E`=JTxyJ#d`!(9_s?T2jxEM*E`){wGI`DBFIz%ouW`Y0cKDfXAGN{};aMpLRvZ zu`PZ-3(+Tsh?UKAr)TQQ;2Jz(kv8{R#!c9Tyeev55@5@Ng*c4-ZQ6vC?o#5>6{;?gVfAIr-+^g>3b$}13U^~?gce6s6k-4ulnzWlFpq}*)2 zd0!wP{2>3U+zYiPaNr+-6O`J;M2Cb`H5hjDXw(1oKK!?dN#Y~ygl{H2|9$( zVg7`gf9*O%Db^Bm6_d808Q!r%K;IUSa(r^hW`w)~)m<)kJ(>{IbCs-LkKJ5Qk~Ujv z|5`OBU>lb7(1IAMvx%~sj+&>%6+_-Pj&OOMzMrkXW}gMmCPOw5zddR}{r9blK&1(w z^6?`m=qMI=B*p~LklFLvlX{LflRXecS#lV$LVwi$+9F8zyE29LgL> zW6R-6z&3x-zL({$nMnbhu|plRO8S_EavN?EKrr+c&Tt;Mk)NC0e|cvyXk%VKb5VIc z;|DN^5)t^}tr&-2q)SbwrF>=k$moYK;yA{Q1!I940KmPvg_Ogb81w$_)i3FgFWG+MS?k=BpkVGk-bRhBF;xJ}wnGN{)?gbry^3=P1@$k^#z9*@tmmB+TZ|L@3#3Z+x z8hJE({GEeEWj#+MnUSN^~c!=G+yW^j=cfN_0!}%(J-f1`G}w^}xi!T8BJDOCri{mGBU? zsKXxeN*=L#<-p_aj6cHtYWMJ+;F`HLeW5cpmeVAhFfy+Y=0rIqqyJ-NRIu-aE*Mvr zVnC-RDR`d1nnQu|^S79I>%9=bPNx1JLOJnB**Y`2WCq zctq<)Cq2^Z%=$*&;QxX30;642;y+=mlMLec6{KA208FQ~_S&tiFQW zp2{C3nyrmgkh+HRmG+$_y19m~0z~b`Mo+m6)Qq82p5)Z6ePn&B=!*twk7Rz%zzm-R z>Qj!PE3XMBY)N-xO(=VpO6=Cky5kpl}fQztM7QzvG#a}5$>2$f5w|}b8=3E)cNQw<%e1xAEwaRHu zhHCGB4Uzs6x3A=7uUBC0({&iNH{!7JgQHVa+ zKfQItwD}sd;587x?M_hzpR|TKtTH^4{`G7*87o_wJrFlmrEjk=jvA z6xBPKYjFB9{0Sj0rBL-z9BuBY_3c||UjVgv2kqw2m<@4#>zfx&8Uhq8u+)q68y+P~ zLT;>P#tv|UD62Nvl`H+UVUXPoFG3>Wt-!sX*=4{XxV|GSC+alg10pP~VaA>^}sRr1I4~ zffa2?H+84k=_w8oc8CQ4Ak-bhjCJIsbX{NQ1Xsi*Ad{!x=^8D6kYup?i~Kr;o`d=$ z*xal=(NL$A?w8d;U8P=`Q;4mh?g@>aqpU}kg5rnx7TExzfX4E=ozb0kFcyc?>p6P# z5=t~3MDR*d{BLI~7ZZG&APgBa4B&r^(9lJO!tGxM7=ng?Py&aN;erj&h``@-V8OA> z=sQ4diM!6K=su^WMbU@R%Tj@%jT5prt8I39 zd3t`Tcw$2G!3;f!#<>>SQ<>g6}Q{xB|sx_%QKm2`NxN|Zl%?Ck6Lu_EMC?*eRxdgS!3zYU#OnO~0&UFei zmP3k9!70^O24j5;G-fH6%T}X{EdO(%*+7ThlNGAh;l?$&{eZ-l`j281o@47x+6Z*DC`R2CkPo{1Behvlt!4${0Q?fBx)iIw$Ky zI#xvxKs1U`uMgeZg5fD>s5AYH*n=+UaRzS?ogn6WwBPK3Gib5@Jj!sZN^tm>M&*r@ zjbBoF7uXJU2MW~JK3%Xa3R}3zsP7qHEqbnC%eKsJ51+% zVAT-eRHwD)0YlfK2&rN549*};CJ8I;dj8rD^PR(>#n?Jccsqx&wF#We;Auv9Vm%-} z3HjpBGp$t5^S$XhJmYAP0q_qM@^#D}NM1FmCCyo;F|wv3_ci@$MA<3An0Aa|>_M&S z%qGjO@w{NI$VKyDF@w5W*6XK~5S`S$@ABWh@uaFIBq~VqOl99dhS}?}3N#JizIfYYt`ZKK0i_e#E;P0)VXh-V!w+qX%^-I0^ok>HAm5)tbBZlYov@XkUL zU}l}NDq{%pc=rmBC>Xi>Y5j9N2WrO58FxmLTZ=$@Fn3>(8~6sbkJ;;Uw!F8zXNoF@ zpW;OS^aL|+aN@xwRNj^&9iX;XxRUuPo`ti>k3Hi3cugt`C(EwuQ&d2lyfO` ze!0fi{eHhU1yN+o%J22|{prPvPOs1S?1eUuGUkR zmzMlCXZtW)ABWasAn53}?BqtPMJ*g>L1i6{$HmoEb@h(kILnMp(2!H!rG?MNH`1V0 zotb`;u#Yz0BZrT1ffVTCV!?{L^z8q11_21ptR0ITbOcaZ!mlWhC_AZb>?2IDV|b_y z9lVt3)0d@W=lNp1ArE;h_;DDQX^_;WtsSIO<;Ly&(#O~Xw$R0~W|xdQk*Y(b2=vLV zt8HX8=;#;$=y}!;Qku2HJbGEzF`2_~&i$&ogHUe5vhx}FLR}K_Mp)J{n*Va2<|pk$ z4tI(7v3A%Z7Z0|ZWw#7%$U#*mv+`Ujlh^N(t63xFt_%*WoJ^oq!U0j+Bx`<>q!J&0sWy4&{@#*BOr-s ztZ68f;l0UT3wf@RRC}_ufMr6rQ69Woa@1sZ50Ww|{yfp8!7rMOh_POTE;|zamq+4OObJ-VeTK|D|h?mfR$^lA{E7pk8DRDz*j&r<&fR>GaG*d zYaJ*q5#n251XIpR6F1o-w>LZ)Cb6Ma^6tCfcOItn1o;$#H?^jqOd(PA)B3HaTlJK zw!~?nh-v-_WBi5*B=IuTZOX2sa{1I!#%VMd5eGe1VcL6 zQ!aDft}>TjlwzEJ9Kr6MWh1MoNNWr$5_?z9BJ=>^_M59+CGj=}Ln)NrZ;Fja%!0oU zAg07?Nw&^fIc9udtYSulVBb-USUpElN!VfpJc>kPV`>B3S$7`SO$B21eH8mymldT} zxRNhSd-uFb&1$^B)%$-O(C$#Ug&+KvM;E9xA=CE*?PIa5wDF_ibV2lMo(Zygl8QK5 zPgH1R(6)1XT9GZ6^ol$p>4UH@5-KV66NF$AH-qOb>-b~+*7)DYsUe&Is0yTx=pn8N zs&2Z4fZ1Wk=dz>AXIfd%>ad=rb-Womi{nVVTfd26+mCx`6ukuQ?gjAROtw&Tuo&w$|&=rEzNzwpuy0 zsqq)r5`=Mst4=HCtEV^^8%+Dv2x+_}4v7qEXSjKf%dOhGh~(FDkBW<~+z&*#4T>r@ z>i7T5TGc96MfD%hr~nK9!%r{Ns9=7fui)N%GN8MvuIrox)(0nNg2{McUIC6nq>dD+ zNvX69vvf=Pw1@x}^K{@%UCL734;&AVta#($&l2E|*VUaKW@h`X*L*;1Kl4tajl}GQ z$K>;*$3y1(<^32Cg8ugi^ZII=I&ina>q@GC&~gQ#Z88(nOj;*j z1{hyEq|R_0v7LZNKB|3jqZPqZOuUG(SuM^Z>0@mzsKqVbRrkTz#TRZ0sTQ|%XiYcE zEE5{9jEB+2Sdga|veYSFZEzOuepHGusAO#pg&R(%Ob@V0Lw;AfQJ{aLUJxnbe`q(m zadg^fXYiWr+mm2akb*J?y`w(!KAL8OfFD!mVWiWrgScgp9^yoh3lNNUxd?YyvgUL z>+!2VXP7Fzq zYQ?(9-r*?N*cJCK&)pbYzuv%R{b;TB_wC1V3nO#12V0ucgp);>!N=;G=l;({KZF>) zNAo=0m|3Zu*PNLa-2v=3r5>-hVI_xYdz0m*f-zUW_=eDqiM3j4MPnS~eIRNdw466? z)yxHI@6d7gL2Qj<_@72W{GDyINBy%X6X&_cF1(##v^}87YGZ87HgfH$&epf>Jlia4 zw53K1M6=Px@YCVTUk!%_MjyBeaWy7c40i47-3B{voi|&|7aXza!(OB~E)U;f>5Wd3&@#UP~gkM*qmK=aeZ zkP}gn%JmKK34}KdEu)4E2~qN)EnAhj>)4dbq&RbLu$BD&kJSoIvr$3A#S%P~l$l1A z!96hNdtFXsta!b+enJ@G;6rv-Rd=IQ_llL#tSGk-mpQi(mhop;lObiTQIARXw~&d> zVuCSG$T&zi?#&PT-fP)`*-d@gc;+tOPDaUA*6>RIrf67& zpZ<1ie#4rJ3HEu>v7sF={4;oXv?_MwEI-^o-Lr@rW%%cd0TR2q`p=rkMOKYzOs&^$ z=xW*e)6p-B(0Ek7w8+!@Cks9>$_#zi44MLyL9X?{sDlihX%V;$%a;wd&RL*XGcb$` zvU}#qxz8wAT)*NQ+lXO>AI`^r7B&IQ3J&{cVNn0aWa)(!fQtV+mm~`vsH24+xI|q{ z4ce$OB1hrqGLn;H#=~Rx%T#b|hN`d6SXt=;Jd=DNX3LO9R8xLX@6p3>SnZO7M+96a z1s=zJKd%qy0#GWLeFgc~?fsCw^$6lG;B*54&@n#>q$#nRSr?2GA4YaSSl5~B2k}R_ zfJE-$C~{O_6Rh6BJbWFuoaeXEI!Q-YSA9EvSG_sjB~-*hf_PM~mJ6BL+IcaF)8$+; z*4A4W&+_Mn6~tF|M8Sz57BxO=W9ZJrNPtdhME>$sS6)etinxj{YkK){@Q${`Vc~dX zLT4UYjwuC>dH8AAjQb{Ji>eMvJ5rH-4a(K{4EyLrCDtta)u#>`V_AvyS?Y(;FRT8L ze`JXZP4s~Quq$m=6NI@}`( z`>o3kbSApxcHP;1Mds3&41!_0r619~@AQr9TW*Swk`Q1JNmIk%nKm(ZbZMHEi z4n%vC0MuAKNz2njKLk~w|6u!|y7FN!SXk5=7>^^p-R4w7R;~G!v<{>H3%SC-?>8jAP&ka=owuQ$sKwU4e8EVyc6V2IpBR56HthbwJ*XdwnwrW4 zcR7oGg7kCmj(q{#ka1d85mRVIo0`1v3+B--4RXv$hGb545y#j7bmu0*>BLnTRZ+mp z29%AP8Id+57Q(6`ep^<tq}GO1dvJ*8~jxjiH0quR*Poy%N3@c8rhlO6YR@LBk%l zux{&bK~LvKYq%d;Tzl|VS=?rkBUD-j$YY-xX)z`zUfH^&($ZYco(Xc1tr|9rwx}=- zk`E2Wwkh*HIVsWej-nJ6HNH)7rWDlB0@`{QG*0)&P+~Ng{m^kG#J*^p`drM(`dnd& z9$U+FH=rXh2py-N$l_0)@|JY;X1hVL`@}qxNi@Zy5hI)@(af%=1cl~L3{fxZWys9G-hLv z*%jvhoba^ePB8YL)`%d%=t6Yh*c5p1S7`+BPjOD*#q4~gv#bn0wOaf_K0SiGC{jp8 zAc_Vk31hKTSUiEU7XNk7`D}S-RUrYb<7%)k+tV0zZ7(}vQN@0C5EI<=$$qW}m7f7I zk>dMLd+kSjN4{OaxBJ^_h?FayJ`Yr)3eC$jdk1@jEzVT=a?{BSjp?&?qPX=xO!ttw zN_s#<#Ve(0i_|cRa=MC2=8MonmoT5)UtF&Wr9-b2ng>>zv{8$*UcIBIXSZ3)x727q zy{r>bdOh?E;ZI(^io=P3`o*tLdsjkjM!rGae!v5QH<3-OBW(XcRhvM!(b)Yas?oK? z$5)Y*YS^_d9H-ZP^_iVooK6EE1(akYvmNkXQGH1`kXg()p94|_F8B@_ABt*7QTmYk z47RyNSjX8nMW&@VZIQ`1WB%-*W4oN#|M}EKDCC_@HQ9!BenOQ{0{i#>IaQkyU-HOT z#8ueeQdKezCP`+p0{|o?!axX6WB@{OJTR;qfs(;uKp@Kjq4Dr)^>R9T+^$ohEYKB= zQx_P+t?e3z}3#W ztf10?br2MbSVn%*3!j2QFu;=K)-ueTmgyYq;%9HjJL_W=dV$#21FIjyv}d3@oIy+c z?IcrTw17F6oYGMQA=66yCh`48DJb}^Q?8r3Lei%QJ!qpxnt5`aP%aJL9ltY7#;qzq)qdoGzpYx=gz7Lz$JJZ4?^Nr`!1MK@k z47M)#_%Bezu?xD<{tFcQ{{@OiDQRGst}MJJdOtp%(wvCymmU}NKvIK%z%RysueJ$h zMe(J;-iblcWW>90Ptma{$`%AUZi8_y>pQy*1GpoiiS>`GK9%)TGXC!$FDO5REO0l^ z&lv``tj^Y#F@DP6&qSkCYO-b8O*XVx^8O@0D}Wv-tbz7`pYOlCS4pVmi!~|4dv-5i^8laoUpk zxH@-rdRED~DyWrZO2290e;bISH8z$=kcmp_ct)+edl012<`vnqx}D^FD$twK8)RpVW@yMvk8CRc&d*ku^a#%~2|u>f%{up2Q6x9Mdt&e&@t?_bEXURy{+@>{ zJjDZB-f~7aGc%-QXc7g4fF1tUfP-hsa@qS*#N2_g3675xMqbzyQnC~pK_jH^3k}w%a6jCW!C?MU zo{9eUxt*=#6(neNmoNf#hiRNdGBu|Q(@9s7|H`J*IMWuCEyE4;3IJtKS-n7f+C1=O z89gY4%6N}DeX%EYz8B!^9f5Sf8V2S}yTJ>r+}=RsLXtADv|&$w!dxTz4oSIuz=8S> ze%G>2|5coCh@K)cA(h6O>kRSfAQt>H_fE#}H@p)v`Tw>aulOfNhyS)7=rI4b9Co$DH=Jd$I?iu%Tq!e%aPW7DXN#iTjDG0TqkpLrhBBzR8`k zD7XbvwV1f*5U7kBxrIxHO}NcgSmCK*P*zt<4FpS5V5@~j2g+wGN-WtIbV``U0-3X< z(0T||f@~2Ebo3UuxzrdG=FuH~6+|7!VsYU$0Z;OEL^Mr^S^zSSbYwE3A~U-vOJDyUDUStXfD%K9;#`BD_z>Zb zYj83mc+8KTgEK6`Y;^Q6ku|@W3|m*M55gt8^^WdrxGslExn_2O8$_a0M&&_Be0KPA zDd|?nYAOvUkTJUXZ7l2Ml&#rK04@AJabu&@g=pIr~b;eo^(8BT(?FunH$AF3j*ZiHB%C({8I)tTa3VRkn) z=9uW|9))}J#GUqRh<&w4yL15QpK%2bM)-YYq2tcqZmh#_)@tYAn7$!Z+6(FhAPs2p z^%a8A6xo5O-hgk)a=r7#iC9Sn=%vgrQsl}WCq)N+4q*=_VT+ac3I+*3lJQ&#epf@`!?G!7S(!aZGWqpGk8(*`ig}*V&iyhzH;xtxA$y_N z>)-lw)z%-mcQ3s#`hcb*fp;U`yikM&{Z0^!k1?*j(d(dK9Vw#6o;HRAhEj6!& zxJ$%z@#hubu+iCATwZBgyl$DO;-%^6*lhP|m`wV*S9e%1oP-d7}LFzNb-nbg&b zLeV~*+>vogxCnjjqMaj6y1jn;s7GQLf{ZSY20O#1YGg;yjg-{KM81iL;0{|;LN@@* z6ST#KrKAJTzEMTb{1d?&eNzE47+;ZFtJ8pB_U~EkOk=`-6MB) zTaU^zm3`7P2kZ;D_=u#Q2t;SHzo8P1xqM5!?7^WSE#u5XoolRV{Q}doTaC)1S08Zy7GJ?pd&8Jjw z`*_`ev(<+Ra2R&CQf7cb97~c^x3voFRhQSEV_1pF(I!QUWEkUh<2Uq?3Cz9FxIKeB|n?CuVkX7tAhr<4Ej#%Cq?uB5e^<(Tu{>54T z!(6b8DmhS=>>S)e9h|J%5}ljxfXIRDVa(%*0*xTQ{+ zUjroY*#_U^>b1Teuc$T-egClH97?IE<0#OhF0Y9ByTKPxej00P`|jMJVCqxQ>44F0 z6StS1JT#Ng(}>CWNb0uNM*qkV5JF(s$Hm`S`+O2LRS#bpUMgwU)x`e2u1#H8woa1YGZIsxydK5$JP$cfI67I1 zBE?jjeY6QO_arp9gg1v9k)(iTssRJl7=WdW!5$tkQ-3&w4c|W=|Bh|HOKy{C>%J3@ zZ|8r+H6nd{{iLE~*`b<}mmrmA{8WRDdlJ%rL%W#To}q01jQ%5ZNy@MC_fzCo_!q8x zb46H1v;|CrZ;mdn-6=g>sqK$5H<)H5rH0*n+c!YnE5YQcu{wHPyVztNP`)K`bv3XO ziFeTQst%KJAd9G3SLmUQ|V9fRRc;+ zPd%sGo1p@XsJh&z8?psQ1@NnY|!@p3%Mm9gi!S*yNThSTSi>xCoEGLx%T*dPC_ zK3J4iwp-OZ&1%b#}32cNRbgvhDTdd7->2vcnO3Mt%o zR22P|KlOg^Lw}@|mzlgUh+KF7hZA-R_k=AFARuTl!02E$Fun#45CtF|+z(y&M--)~ zkX(>sZe#6y_I>oP0}9KH=o`);bPVMO1Tg8k$trp`n2F7Ga^3Z^)#GsOamw&Zg{k!R z#))|f#dP=GU6 zM#KYRBI_eOICiiDR%oBa@n|ggpZJs>v7kQ|)(*x)4xxl6;d76Fl^)QGde*sDZnRit zpWm`UgACR9MH}@~KMp!Y^x#))Vw2>dEk%BKQY#ne{MWqyu__rdoOP0@hS7`G*TR#L zKP;$iLuM2_a){&S^B&D>F@2K;u0F-emkql27M7pe;`+bWflrlI6l9i)&m!9 zKWFwavy<&Bo0Kl4Wl3ARX|f3|khWV=npfMjo3u0yW&5B^b|=Zw-JP&I+cv0p1uCG| z3tkm1a=nURe4rq`*qB%GQMYwPaSWuNfK$rL>_?LeS`IYFZsza~WVW>x%gOxnvRx z*+DI|8n1eKAd%MfOd>si)x&xwi?gu4uHlk~b)mR^xaN%tF_YS3`PXTOwZ^2D9%$Urcby(HWpXn)Q`l!( z7~B_`-0v|36B}x;VwyL(+LqL^S(#KO-+*rJ%orw!fW>yhrco2DwP|GaST2(=ha0EE zZ19qo=BQLbbD5T&9aev)`AlY7yEtL0B7+0ZSiPda4nN~5m_3M9g@G++9U}U;kH`MO+ zQay!Ks-p(j%H||tGzyxHJ2i6Z)>qJ43K#WK*pcaSCRz9rhJS8)X|qkVTTAI)+G?-CUhe%3*J+vM3T=l2Gz?`71c#Z>vkG;A zuZ%vF)I?Bave3%9GUt}zq?{3V&`zQGE16cF8xc#K9>L^p+u?0-go3_WdI?oXJm@Ps6m_FK9%;;epp{iCXIh1z3D?~<4AhPkZ^c-4Z}mO zp@Sa4T#L5>h5BGOn|LS(TA@KB1^r67<@Qp!Vz2yF573JoDBug@iPQ=tr2+7*HcE3(5`Q%{A2 zp%psJG}nJ3lQR>^#z-QI>~|DG_2_261`HHDVmM&*2h2e|uG(OXl?228C|G32{9e%Onc=sVwIVZ=g2{K5s0>v2}V&CZi1_2LA=x)v|&YrWGaH zEe3L=lw}aSiEdWu&2-C5U0O~MpQ2Hj-U8)KQrLg0Wd|XyOt&Gc+g8oC4%@84Q6i;~ zUD^(7ILW`xAcSq1{tW_H3V};43Qpy=%}6HgWDX*C(mPbTgZ`b#A1n`J`|P_^ zx}DxFYEfhc*9DOGsB|m6m#OKsf?;{9-fv{=aPG1$)qI2n`vZ(R8tkySy+d9K1lag&7%F>R(e|_M^wtOmO}n{57Qw z_vv`gm^%s{UN#wnolnujDm_G>W|Bf7g-(AmgR@NtZ2eh!Qb2zWnb$~{NW1qO zOTcT2Y7?BIUmW`dIxST86w{i29$%&}BAXT16@Jl@frJ+a&w-axF1}39sPrZJ3aEbt zugKOG^x537N}*?=(nLD0AKlRpFN5+rz4Uc@PUz|z!k0T|Q|Gq?$bX?pHPS7GG|tpo z&U5}*Zofm%3vR!Q0%370n6-F)0oiLg>VhceaHsY}R>WW2OFytn+z*ke3mBmT0^!HS z{?Ov5rHI*)$%ugasY*W+rL!Vtq)mS`qS@{Gu$O)=8mc?!f0)jjE=p@Ik&KJ_`%4rb z1i-IUdQr3{Zqa|IQA0yz#h--?B>gS@PLTLt6F=3=v*e6s_6w`a%Y2=WmZ&nvqvZtioX0@ykkZ- zm~1cDi>knLm|k~oI5N*eLWoQ&$b|xXCok~ue6B1u&ZPh{SE*bray2(AeBLZMQN#*k zfT&{(5Tr1M2FFltdRtjY)3bk;{gPbHOBtiZ9gNYUs+?A3#)#p@AuY)y3dz(8Dk?cL zCoks}DlcP97juU)dKR8D(GN~9{-WS|ImophC>G;}QVazzTZ6^z91{5<+mRYFhrQeg z|Kn=LOySHXZqU8F1`dXWOJ?NViPE%&FB1@$8!ntuI?)geXh|#JJC1+G^n$h4F)g-P z4WJMPQn{p=fQtw0)}uk;u*&O2z+G5?iW_=1kTy(!AJzj}de{a9WHY+*SqJ7`={VTi)3NK|)*W3PUT#5a$D6oyqH%5zjdO$5 zICHx_V;1Z)4A(rT6aasvZ{{r`HnxK7^fMLS1{;H{o<8j5hz*F@WkKQmDI*Q%Kf$Mo!EpQ)=HV^lsj9KSz->ROVIrXAI0!Q?WUosf8t6CR*rl382^sU3q@($L~E zC(AoyIjS&2(el|I$ za*8oAtqGQs+O~huhBCOFw(^b&bol)FWsp15Sra3v%&#wXz*!kSi!sV>mhe(I=_Zxmz&E1>i6=yB*_X4M#ktdNg7_G}MVRGQ z7^zX=+mQ}1xtg7JN9E(QI&?4}=tP2#z2<7N%zf9rxzynL~!MgNpRvXaU69c*^X2(c?$=h&o~Fvv z06*{JdsM!gF$KALcW(}@Q&Alo`@3h!H3j^@5rFMp8l6-q!cb?1iS$oZfU+}A2< z)&2ZoL34kkSnbf=4>qd%guV7zM1p=amds@nhpkK7mRJlb?9zYI&?4ftd8+RvAYdk~CGE?#q!Bv= zbv1U(iVppMjz8~#Q+|Qzg4qLZ`D&RlZDh_GOr@SyE+h)n%I=lThPD;HsPfbNCEF{k zD;(61l99D=ufxyqS5%Vut1xOqGImJeufdwBLvf7pUVhHb`8`+K+G9 z>llAJ&Yz^XE0;ErC#SR#-@%O3X5^A_t2Kyaba-4~$hvC_#EaAd{YEAr)E*E92q=tk zV;;C}>B}0)oT=NEeZjg^LHx}p zic<&Fy$hApNZFROZbBJ@g_Jp>@Gn*Vg{XhVs!-LSmQL#^6Bh-iT+7Dn)vRT+0ti(1 zYyOQu{Vmgyvx3Tuxk5HG!x2a+(#>q7#Xji%f&ZxT@A*$m8~z`DDl?{&1=gKHThhqt zSBmSpx#kQc$Dh6W76k!dHlhS6V2(R4jj!#3(W?oQfEJB+-dxZOV?gj++sK_7-?qEM1^V z=Sxex)M5X+P{^{c^h3!k*jCU>7pYQ}gsEf>>V^n1+ji40tL#-AxLjHx42bchIx9Z< zz`>51CG4Iboc%m0DAfvd3@b}vv4%oRoYZpZ*dW?+yTcduQlxreAz&6V(Tac9Xw3_` zNotT9g&r{F_{!Xb%hDPJqn`CWqDwai4M@7F4CQ?@C{H~rqxXwD(MFpB4!uljQmH~( zTXJJj3MEVHkt7r8!^R;bp!H=&%-OG&ONKIOgLJtng(VD0u9%2LuXKe7h$?9lQ^#cL zOo}gOx^+ixt2Izmb6{J`u0VexU0j}8Is+?LWLGvQ66Pg0ax4n^G+xW-rwp&fIZ0}l zI?y~wn^6o3{jj*VSEQ}tBVn1#sVTQB(l&Gf(sriC0DKR8#{);Sgb5%k`%l#BfM#W| zfN5C8APnl5w%nrNi{BWrDgudYAZLGEQKTzz^rV(Bst!UI7|8?nB_w}@?_pYX_G?9i zgK?yo0}({MC^6DiO!bB88kijN>+BCQ8v!rg{Y zz$`Hf$tB*WdxSPHMMkJ{&p0(l zyXx|^X_VUQBdh9)?_2P1TViiYqy+91$zg%3%OjzWyY=X^f7I)2-34bDVCEhECAi z^YqS9x@(kD(Bto;VDKfgIo z-)s_q)d2mr4O;DTUTgjOe4f51kd6T9`xa6_AUP*N{jz%!Z0E!Dqq}JlfPZ2EyGN*E zoPHJ^rT;z^0vaI03Z(WcdHTh1suHxs?;>yWLj~GlkAQ#jSWq|nUE}m()bBZ1`Rh^o zO`d+Ar$33kry+En{&JjrML}&gUj3pUFE58(t|p~g@k3p&-uvoFzpGktUMnQ6RxDA& zibYl_A!{@9au^_fB@6;1XHLORS}C(Hi&J8=@>Kw66&QJD@w>_I1XJuBW3_vn?f~bb zTv3_J^W1+E?921QNo!MQiLHISD9?+dP0BsAK+yB?l009uXXMOteoGX;?5I|RG_v#B zf~l?TPy3zGkT`N>WlZRa=k7Vdbz-66IQ979fX!i7Wen@lu-oEcweu$76ZXrc&JWRf z!tLRg2JqNG{;`-H@L` zKHfgY-Lve@vsPT7B0@716|Z$Z-Z{!WV;qGHV!`h!S>b)rZpc`9J))^79ey;7@-=zZ zjys+j=U6maKhDddqZ}XQffIbFYn)R657nRGEG#j`M-Gni4deWVXcr=HoNok4SKTPT zIW&LDw*WrceS&Wj^l1|q_VHWu{Pt**e2;MKxqf%Gt#e^JAKy{jQz4T)LUa6XN40EO zCKLskF@9&B?+PnEe(xB+KN|M<@$&ZP{jM;DemSl!tAG2{Iisge|}6`>*BENm!G2E!s_XsaUit2`a&pfn!ggt)wG<~No zFFD~p(1PRvhIRZaPhi})MXmEm6+(X?Aw+GxB}7gAxHKo)H7d=m&r6ljuG2KX{&D9A zNUe9Q=^7yych#S!-Q!YKbbka8)p==Am-8`N5_Qz~j7dxLQeaeCHYTma$)Fy}ORKS4 z5sf%}(j`4U=~Aq(!-|ZRRXvQijeGJ^%cq3itmW;FI)JsU8k4pNmCazDyH9@=bqwS9 zq)y8?KhH}MpVTd^>?u+Cs!&l|6KH<*pikOqr$wK%YZ7(>z%vWLb^+m&cCQ+h_MDo+ zaXmPW7CD|K$-d&cg$&GVPEi#)hPjGYx|SBxatca)&Ig?*6~uiQKE)tF7l+ci4JvbZ>vQo}1mB?m;{w?j6>1xBD9F+2p#Y zP3U>vfnMicQVHdhK1yDCfacJHG?$*GdGs93XO$LkB~?nFAfNOoRY`xRs9JiG7CM&D zd5!=ra;zY~qn6HhG|^&58(rYoNlP4qwA7KN3mvymz;PR0%5d!IoDF1vxVxNS5wG&fEt`JYIGi>i=Fq;YUc>8aXv_wIKNAm zI$xs8oUc$5M((w)<+NMQ6{7X7iz)2tqz$eebh#@<&91|=(KSq0xZX>fTn|!v{~LlTjaOXR{3kxDZfD5rHpl>gbmAU z@|wOa$t%grx`7}nA|ePPsN0Y)k&2=Mc4?uE@gW0-f>S_2bO;VnKt&W3k$KKdvZh@& z*WWKa@7#~`b#Kuyw9kqd zj%CMuQ9ESPc-)MbM#7}YUL)ZP_L{+siDWcU?e8%n3A4VsFYJpNeLjn2bT>CI3NCJ< zwecm{{XNM@ga#75hHnwEW-M&QOfzo9!Zfi7EH$DX3S}9p>0NY#8jZt#!W_KUc?R>k@Ky-w6=+Da+_s0GJldl zF|P?(31@{B7bweeajQGYky;y%9NZK$oyN7RTWNn&2`?k9Jytjwmk||M(3Z!M&NOYw zT}t~sPOp`iw~(CAw<+U2uUl%xEN7WOyk@N3`M9ikM-q9|HZC|6CJ8jAUA zst!H<<<&6(6Zvbpj!BrzUo!>VHN3A3vo$EF5-6b1Q~ajXENB~lhUA@|>x6=N0u#cf zv&w(qgG`^+5=HoNur`2lvR~b&P zjumO|P8X;=d`c+z1YJlY7&H@Dz-Rts$X0IYE9kSIlqGZ7utSx^+ z2hOEC-eXviWZXQ9;$Va+WlHlU%y|f~w(|)o@(5J0o|3MQ2O@+B<@r*H4*65)(r^JT zq+<*b06XMGclsEElst5dEfFJ;AQfYhRt}O0CVKdGh4Tk3-(^-{kukZb*3oM$ZffpG zMs;jtk2ZjAsn%mND4R~OS73JDbj^Q440{oS&4<@VUYMInc0xxy?FE@$J_^n)b|gY+ zOj;8Pk^)6$w9nbnMms3RSr6q(9wP_)v01|=P}UbkXoS_1#FCl?>&9cjCHOS!yEJqiGd`83Nj00{X6dHFN84%)I^*MZ=*Ihw5FxD0YSJHV{j!9v(DT#k7##q~$ z87Dig!k3EiMO;k|9XhYz8cGVPukGe$N5@yNtQgngIs(U-9QZ2c^1uxg$A}#co1|!Z zzB|+=CrR6lxT%N&|8??u1*Z?CRaGbp6;&#}$uQEzu(M6Tdss;dZl=hPN*%ZG@^9f* zig-F9Wi2cjmjWEC+i?dU`nP`xymRwO$9K3IY`|SvRL^9Jg6|TlJNEL9me$rRD1MJ| z>27?VB1%1i)w5-V-5-nCMyMszfCx0@xjILKpFhA4*}fl9HYZ~jTYYU@{12DS2OXo0 z_u+ot_~UfZNaN>@w4Es$Ye>i&qhgqtxJf9xi6El-@UNPeQ>aXcYVxOUA--x3v1 z3e=7+%#m@}QuMTjN3n--=-{@rNtyYdYS@LJ(G?*np*HILbUeo)+l8N#+F-;^(8w>i z8Q6til8Y^NG7_qa*-n2|4}(k<-HF~R0v*cP7bxlTWNJ1s6#Rz!N zCYesAbm(}4qp%-;B%AF-LyS5Q6@Q|V&Y2ar$uWn(?UstqXy;5$ZOCC_?L$F z@o#dk--?Co{)CGEP^73Kb_^>`G8sAN)M@iNKQLBj>QAcHjIw0!1 zl6{UYd;|bA+CcC#3IGYysWLa4!KA}CsEV#c)JpJcF~NX9mrX2WwItXv+s%I2>x#v) zy%5xDSB`&bU!9COR@6LwbI|OQ&5mf&L^GGZnOXEOLshxOs;Y;ikp^M(l-^>J(o0NIdbt5`(fTq>p%?cG z;%aHXhv=-@!20#xf*q)++kt8IJ5cG{ff?Sy9hfzQIroA8N>Git>3xOUNhe8nUspSV z`GL0DK}<_w!3gRCwOvD~m+Zn6jxTMde<_?egr$S1OySh6XsS!0Wh)wJPX+xd11YQ= zMq7X2tU;U;Xx|ObfO}%y{pchi>ryaM2zAy50_$ltt(ew6h#CF@+U74D#H@hdQ=dX_ z=OChf#oerWnu~l=x>~Mog;wwL7Nl^Iw=e}~8;XZ%co+bp)3O z{Mryc`*3ryyIC*S%Zu;8Y_D3bFAn%8NTYv?y_%Q4zR-DvE(Q*~>ec+JSA76q7D#_w zFR&HI@z>V`9-)xr*ME%7~<$Ykd?U8uZ~EqUe&AlGDqP{uUvna zvy#q%0y2VKf%UxO(ZC2ECkuzLyY#6cJTru6Q`qZQQ+VF1`jr8+bHIwcJg}=iko8FE zDt(bW8pbOr>?{5KLASE=YFFv&(&IM|P6@wK(5#jhxh@Pe7u_QKd{x@L_-HM=1`rX8`BDds3pf+|$)DBqpXrDP>JcOxubC$Dy60;8(mfG^6yXE(+N*UWMW? zA~?H-#B7S@URtmlHC|7dnB!Lqc0vjGi`-tNgQ8uO67%USUuhq}WcpRIpksgNqrx{V z>QkbTfi6_2l0TUk5SXdbPt}D^kwXm^fm04 z^i66Xn0`pLmnhX(P0|TezLiFcQ{E0~v*cmmAR2|PETl7Ls>OakCexUmie^yDw3ccuqd5(wV_6?YM+ zegsV{M=^n{F2a}~qL}DfhDok9nC!X$C9WV!U15~DF2xl0YLvS#K!rPqsqS7(b8m## zZA(3F3H0v&0Z>Z^2u=i$A;aa9-FaPq+e!m55QhI)wY9F+db;s$6+CraswhRp8$lEl zK|$~`-A=dB?15xkFT_5GZ{dXqUibh$lsH=z5gEwL{Q2fjNZvnQ-vDf4Uf{9czi8aM zO&Q!$+;Vr_pzYS&Ac<0?Wu}tYi;@J__n)1+zBq-Wa3ZrY|-n%;+_{BHn|APLH8qfZ}ZXXee!oA>_rzc+m4JD1L)i(VEV-##+;VR(`_BX|7?J@w}DMF>dQQU2}9yj%!XlJ+7xu zIfcB_n#gK7M~}5mjK%ZXMBLy#M!UMUrMK^dti7wUK3mA;FyM@9@onhp=9ppXx^0+a z7(K1q4$i{(u8tiYyW$!Bbn6oV5`vTwt6-<~`;D9~Xq{z`b&lCuCZ~6vv9*bR3El1- zFdbLR<^1FowCbdGTI=6 z$L96-7^dOw5%h5Q7W&>&!&;Mn2Q_!R$8q%hXb#KUj|lRF+m8fk1+7xZPmO|he;<1L zsac`b)EJ~7EpH$ntqD?q8u;tBAStwrzt+K>nq0Mc>(;G;#%f-$?9kmw=}g1wDm#OQM0@K7K=BR+dhUV`*uus`*ND&2x<wG1HL5>74*j@^8Jn_YA_uTKbCF<(bN-6P0vID7dbLE1xY%jjOZPtc z2-(JHfiJCYX>+!y8B2Fm({k0cWxASSs+u_ov64=P?sTYo&rYDDXH?fxvxb>b^|M;q z%}uJ?X5}V30@O1vluQ2hQy*NBwd}kGo8BE>42WYjZn#(~NPFpjeuet!0YO{7M+Et4 zK+vY}8zNGM)1X58C@IM67?0@^Gy_2zq62KcgNW)S%~!UX1LIg~{{L&cVH^pxv&RS8 z7h5Dqhv+b?!UT{rMg#O##tHOouVIW{%W|QnHnAUyjkuZ(R@l7FPsbEG&X{YTZxd6? zGc~wOFg0-e2%mI+LeRc9Mi3vb*?iSmEU7hC;l7%nHAo*ucCtc$edXLFXlD(Sys;Aj z`;iBG;@fw21qcpYFGU6D0@j_)KD&L`tcGuKP_k_u+uZ@Sh<3$bA}GmGrYql z`YBOYe}rLeq-7bVTG?6wpk_57A#-P&*=D9tDbG+8N86Ovlm%$~Fhhg1!#<%uJPW4P+L>rOa{&N2gbFd3Fh-nnA8 zlL@IrHd6K33HFYag|7^pP;EZ&_CU5|tx*P)T5w<3xsYB7C+*ZJvZ7o_)pdFg0Mq37s%lo=)Pp+u-bBo85|bFx@z znXN$P1N#N~1jF)^LHc?61qH?2r$7+}^DzU=b4Sh0ILA`+DkZGwe8`w6RaaLOy2{+; z*G-qRoS@LWVrj2g$m_QBE_9ft8J2%>-hNdge!7N;!t-RmW$Sx$dLFwX06)v6%V+3+ zI_SpK&${J_g&{nfAAf~@mBoJzd1aB-d!go}pMC=xBXEb1?t=6Z2khtQWf04f1vH2D zAzR~Tj#erum;iqZ)uy9mW#IE(g6{gBs0m8`Hho^9SLk>6WYl=|`BSI?aM#~0G0T@g zhZQIE7P486_X7pDDlh!Lpxdh5G=KJg4;1hc2-bl zI9c0tmCMY}Qn=5b(4Vqv{|sKKb)cXA9B?~>}U6*`p`RQ9+ELmfJLHahw z(?8R{AQudS8<=zg^lz2qD}8im+_uhWqYUr=fMT#sIo${8zZfe2N&j7)tPfNL^8Z2} z6)v8;x|<$fDzHr5?L0g@AOmYTwm%3~HQmw+c~!W5LEVM>2|z;BF)jd7U&jQ>xPb5h zeEn5a91wogI=6UL`b7g^&v-q5Y#V}Z4=>PWem5wViJ&4Bv3xeU=0-BSSJgLq4+X0GzB+;^$X5GmqzaR*xhkIN?DGhN6_q3Am7=yuN- zb_|MEpaRpI;Cvp9%i(}%s}RtlP5ojEwsLfL7&QhevV-Nsj0eq<1@D5yAlgMl5n&O9 zX|Vqp%RY4oNyRFF7sWu6%!Dt0yWz|+d4`L7CrbsM*o^`YllRPf2_m#~2I3w7AEh+I zzBIIu%uA#2wR>--P{=o&yasGhV$95c?|JRlO>qdUDA33j5IN=@U7M#9+aa>fFb^X45 z?2QBBpdyCETfk(qrO_G9QH{AF(1{Qg6c9(jWVU>`9kPNV#kqZxKsnG@ z%?+|N3y9-DUAf>)sBX#CYB(Ss;o`eS>0TYtk8(ugt>(!)?E#S%6uC82XIZqAYlIHH zMHZAe8xkWHvSk$;54;FuF~4*RSLzf()!C1J`J>iHkKBN2e70b?Xqa3NOvAB(w2*)%usxAitdXR zXsosCjl0P-*iH$V%MrP>2!E3ZHl@yU_+CN1fffNwny;LnWvPf(q;(3vd z)}hwfgz-(OR5H?(nx==K>;(!(<@t9;uhDT<@L}{HO(kEVmC@_oXQ(0S**-;H@pAPM zql=DME;|u{PV`eSkr1cw8-cy+VdH~Tho_^5PQzI5hn0Vy#^@BR|0?|QZJ6^W2bop9*@$1i0N4&+iqmgc&o1yom5?K6W zxbL!%ch!H^B7N{Ew#U$ikDm9zAzzB|J{M9$Mf%ALP$`-!(j_?i*`%M1k~*I7dLkp< z=!h>iQXd~_`k9coWTEF$u+PukkXqb;1zKnw?ZnMCAU$*2j^CZL_F4f6AMEu3*y|O1 zH*on~MrSW(JZQTj(qC~jzsPRd?74SC6t~&Ho{fJ*H*AMvXXx@p@_Al3UkBY^gXE8Bdj+ z^csKuPu+aSU<4<E+ z*bM#6<ud+wQMn*g0ivOoLF2sMG zMX|YA+;yTTVpqi0qIi@1?JkN$!q*sv^Y<6UyZ3E5ufmiwQi z%d*cc_c?mG&n@>~qR-1dx7`0aeM9!S<^Jm^0J+aC`obd`xi4Gp$3(a6bIbj-cuMM7 zii;+o|1H4kBUC4nix*$<2{av@xW8pXsPUVs;6 zJVT3+(1xAt?9Q3@Iqyu)%%8u%egjy8DR6vr^rrerZ%S*Q{Fc6`FJH6}@8{p6nQo%F$e3uUKnOSQ}Q)_}#>H zIS{p_QQ;x^w&N3pj&F1Hkiv+)I9^?SyjnF{bf|wGg%C(Lf+V!)h2xUId=T2E9mcN1L$QF^ z5g2*u_)h#xV5qoL+7?I^OWPS_a6JtT*$mPcAHy(mJmUtoz)Z1zp0^RJebf|pVGWIs zQB0nO8D@fneP+6d6PT}AA2UVLt7UKlb7PprygKtn-5>!^V1XRwIrG!}4+mn=`W zBk<_rS~lAZls_hOj;GnnAs;L$9u zaRbuj_dhXN_<^afP)`ndO!qW}o+exVj;Uj$zv1Tc32vVWmrHP`CoJ`Zxvp@$E4=rv z{Dp%8tK5(97c5fP{T{ZAA#Omvi%lqOVetgT%V6phEDiQ6oM7cL#+QIm<(v8kP)i30 z>q=X}6rk(Ww~ zN);x^iv)>V)F>R%WhPu8Gn7lW${nB1g?2dLWg6t73{<@%o=iq^d`ejx{msu;S`%=Y z2!BRo(WJ^CT4hqAYqXBuA|4G-hEb5yvQw2Bx7zVRpD;RR2ccOu@PhR3faoc zzJIZ5StRhvJT*c`VV6u>2x;0SlCBHsQ7n>YhA$6iQU$Rd`#A*0pf5UAX^2~Qi`Ky%f6RGsoueIc_WKEcM!=sZzkijF|}LFs~GM=v-1aFc3dl?tifz zSiqvXmL+l|5-?ahOL%3?PG<>&D{-(~{sG3$mZG!I^`lqCHWOSn}?5JWosiW?}R7Hz45Z6M; z|I3ZkC#9f+gJwObwvJ7+lKPKs9)HS$N-3eNAWZc~d`TP=sY$X_md=Li)LwW?#|kR6 zy$#RzQ>|l?27Kf`O2bZM(f5 zT<@B@DC9-<3~{+a6@$%* zbtze+^?#(ya}=}LbSblhT0Q6Rm4>3=gi)o*G!B_6$tq*ItV%e0&U6FU!uj0%!h9}S zX6NEZ9}oimg4WPW?76Hk0#QwuQj$)~3QJw+v|eX=>YZgbHMJs34ZXEzFL($9Pw6>L zDO8nGd&N^$GQH4GKq$+GsmsL%*AWQpwp1!JQ-AyUofV|o;~RKj0^!|%nF=P~ai{JL zHLCol`|FQ7a$D7+PR6Mx&`hnhg>;JWrBjTd0T_>aUBJK||PoA}xw zjpy>>3&$74TY?_p_n~D4+YZ_`VA~C};yEAv@pMP)u1z-biGn_klvcL6s zU`UFOa5WKV3&fLwP#~_QGqNI?vZjX9e_Ddmyv`La8Jre}B_kXk=J63Dn>GS%Nl7ty zD3D2o(^4iZ3mZc%E$ibOHj%F0n#U)zib4~{uoPZTL$0P|m2+KIQ#3oub%T7-d~5T@ z=GJh6j|NV-!5BPIEvv`*E?MCW0ZmUuQo58-cw|hMG8wK%_B(RtIFDydO?RP^e__!P zX;g|RlA4P24jtif(}ij>mC-fQG-YluEa|d!vZky=`ljZ$Ff1r&IZhWinz9xVW74RO zYid$XF*J6~9#4m@lhthw1!$|R%I2dC^$n%=%E!^TkD;QWai13pu*d@!Y6y9c-dw2l zpbj-&crkx2s<6ZhH|C13WnOqNe@}d^VDJ{l;le5kl8?)VY1pm@y|@qed$1aQ;y}@) zL?Jvc0$AuFD-SZv*SVC~K`>q0t1Aq34UJs|`lF_(@D?xDV66bu6ClOSK1t`Q>F~QK z56Cm(MI(a3aT7ypQO-6;vTAZ&m6Uwuwr6=LD-tLFL&h0P zIO1GPDmNp0`#UM72-bPfjP(o)4PIiAp{Ai!ThwhM9u`&DL*e7r45@}qS>??T@1^nnVwqpqQ|k{%dq*L zC>flElRbiyesX2Z>T19VbuXQiV{#@+&4oMF+fTiOA{>-6PSIjcOoKFS6iq+l;13qz z9r6xO;T=vS2R}50ccv2#o=Q|h+CAJH)AW%6InA}KX&=!}FH#s5e>yTlWkaW!*oqO6 z8SU{JVB)Hl0v zvZTX1MRnmt>R(Ase@{zh`Mq(VYx=EF{=B@5S3GzLuQCMxe}@eW>)Mz!MD4@r)31AQ z0&md9FQ^oyd75EqanI>gGg*_2aw+Y?TZJByZ%K~Lw>>z6cc`nDyCqzBkH{8`(LOG~ zi!9q#KEQ__ypNCak(H{r@CidzT+zgq{Y+dopW-YvxkPDIf8F?;VQslqQT}{=AzZ6F zxnZyS=YB7*X}^!B6yLBv)PF1Vi?pQN^vOp4KT@~m?Cor>*}GrNCrA8Eop<;|;99Y} zKl%=)R=@D=O1lzz203Idf@c;Io*aod|N(Ldvd&;<#t}{mYn$t?;DCw($YAa`5v;U*>3p2K6PL7 zys(f}dR3lZQ!YEl$O}x4oh@DO@qatRvqM}Vm)_j>J-94ELt=Krd$CtZ8|QKA>}ys5b|I0wKk~(gw@WTg-gz-E z-n{phQ@gf~i|(7xw!Vj%cOG@#m!2tdzIT#XUxY_=#kr=;#50FJdPiKX;<6g%q5bcD(S^wB;}3Jp@7< zZ8SLqRYg^%-#s)lqC8l`qOsgr%x+u3JE@b!)d9qQ{Pr~%n=KFw@&Ec@m*Rq_0JbiJ-FiiY_(H~OychZCO!23^?kxr zsb6t9-n)(!fBU=h#GNC%a*MbEeJ^QR$1+>KO}iv^@kf((?fv)jjy!#k$T;iB`fx9s zvzxcKJl2e6tM1)!{qv34mp6vCtlhS;y6DDUlXXfveK%ZiQ8{u;>;0mt%BNQ^#D=u4 zTW8me!45Xh8a%S}8iHk*; zc34jqTp|rTRNYt_aaJ*KIuAv!@??P}v9jPJZ-M46271&EMPA8~VY0rX2RK?0r?4_G z=%c8Lbe^oZLUeMavnp62{G3T(ETUTH>k3u~IlNU5tQh%hJ`)sE-+Mq6Yk?H9f)CP} zY_Lp}$-xIK5$7WgHUV@9%T1u`HvwI*i(Pa>H^(8RR7~s8;^31S^uMk^xyMjTmQSU{F9Y?c8LA z6*jEkA*0EOD@2*(y1`E9U7;!i9~1$43N=S==mjf!yh29?-XUURV9-M`*{~m^2y+-k vO&Z*)1cp)oP!FoJdnQj@>B$Ny9`3IcWx78NY!UY=EiM6G;6aIVL4^VU&1=uc delta 34727 zcmXV%Ra6`cvxO5Z$lx}3aCi6M?oM!bCpZ&qa2?#;f(LgPoZ#+m!6j&boByo)(og-+ zYgN^*s&7}fEx`25!_*O>gBqKvn~dOCN!``g&ecy%t0`n>G*p;ir0B{<{sUU9M>#WqH4lTN!~PgB@D;`rIdQ#hRw z?T|`wO^O=zovKDMVjuZHAeratT0Q-HK<95;BTTtc%A5Bo>Z{jfiz& z$W5u4#(O_eLYQDY_i&xqzVd#y&cR>MOQU@-w1GN((w{b+PM;=Y3ndBGVv|>|_=ZIC zB^E2+XVovHYl%!I#}4)Pma4)hM2Ly6E;&R5LmOnMf-Qz43>#K*j*LSWoYxxIR5Csm zuHXA8{`YgmqApC|BgY0wGwj-im6rmS^jrAbN8^PEIHj1WH#AVVuUA2HXj&Vm*QD^# zWX8+sR14XM!@6HrfzFpcC$ZXlhjA{{oq5cs&VRBUX2VwX$fdjO~`3n~1})#Bxr5Vh%KwFov=k zW;Jy5qsvC$lw>?*BsoPIo}YgJN>u)C^4Abbjx$NW@n5S8aN_T0BeAXWjz#dQ=3v*# zRQrjH1%R&krxBrfITop};aQdE=ZRgLN%n%+^y5BOs|pO6lg|I3prX{gSgQuRK%177 zlE#t+nHbT~VSO995imTaX&SCB&pgp`Izkg}-NV zI%~Z42T+^_9-gw;yOI&!oZf=H(Cot~)w4^gX&q(zg`7ekm4un&?FuaJQKIrLF$<_% zR;ok9K%L!NlTYgW8?uhX&TS?ojtu~oLm(`7iY<5Ci@V)7+gRHbb!o0OipVh)`vKW) zp9OVLDkaP@Sn!ZRa zpfwY36ct~JlEsS7_Dr%e0UL8^zRSsSv3K)+n$b@Xq9*^-p|AFj(*#}L-%5Z}D@Zl%y2gokn7l;Zr z3CK}pP8BDR1$L~R{R^BwKH~@v9m;O_$00a5MMXTe!u0FG^=2=_f-XZR!DQeQ`5S_$ zO>mOUF8Y-Wfl3P|Mk-VDsBp`X&=kMQl<>nt9$C)^A<4v@xtW>qn@`Z)`|gCedb?$A z^S(N0{?3!oy|^tx0p&<-D62OWo$gVhEodpMi;O#DM7P>i6bnTf$_=~8)PdQ+^h30pu>DfM=LQT20!&5)= zGdR6}f=YHb45NFG9?dd44$Dm~B6k3w1%E%atidmZ`Kaw4q&8yb+5=wqe`pXWH0J%);cCo710p3&(EMuAI{aKjT^Z!u)Eq~b?HpnrSE9ftF4Ibs#HFpuPR zyT$g5JIX12nSw?q!}IY^iHMikUh8V)gjx{JN@8Am6<$2Mz^mHY*_n$LNj)%w6Vs2|Kwpq;J=(VFf`y)>|;A@J@8mL zpw=k%oRd`%OdUL*1^Bd27^<|sYM9NqMxOfyc56FSDcG3u;oJKCAOsBvw)JlyBt5jT zQZ;fkKI1}9MJMtnCEG?ZUph^R-lV{%Av1S91fH#pacM-EI@93$Z)d@UUxu6ruJMHVl=>YjT8reRi0SjW8t!4qJkSw2EWvi_K%!>35@JDfw9#W$~G@9?4ubk&}M9<~>f3`r6~|Hun&D&#w^ zZ2xrK!I3O(3uNXz*JhWWdgESs3jPCOS_W_J;0ggAduavgNUuLi`PfS*0$=1$q$C-# z>ca0l=Pm+p9&+rJQNFKvb%8vn0!qW9SGnIO&tjv!kv980`FquGKanhc(YAwQTGx)(9c1fRnojjxST~<*=y|?=9V1w`t~7Ag$5h)P#FwB7FM=E`e^youj?Nh^d}|GOC7mPW z_H&16WtD5M9H)i@@=Vzo^f`%yIQZ-qGuCko?CP8h^B$X|UkaKazJe>9C00F82u$Iz zFOjPU5)>;*KBg9UezT$OL$aW(Ogut^COwjSO2!@-ZbW#lHVfb_k?7DlEGcbl^tn{p z#+go${sx^TPB3R5272wadT(x2lACj6Y4~LktAm z<+#pEqlksdo%9?Q29%rP9C+LM*WZM-N-e*wX85OOu}J7Zrt%9iGjxN358Fy5GGaNA zlr-b*b{4zqiK)A~_jjEnJhRaVOdID52{6I%oS^X6)EYS(>ZE6NKd-S?F}lIJNYkBz zX=;apb)xyAi#nMFCj#Ex($CGiR?oF|gei))16?8E-mB*}o2=$UtMDZxq+&Q?liP(n z&Ni8pBpgnCai7%!7$wG2n4{^JeW)f-h&_$4648~!d7<~p8apf5f~7e0n$lV_qbrLM zH6T|df(D0@=>WA5f5yN)2BIZFqObOK5I*vhD*2~PZSt*83>fM))aLjXIEokDF;KGw zZ_75?2$lhYW)I_!@r8QpYKr4p27lOeG~ESg#8)LE@pH;oozO*hv19;A7iT#2eow_h z8?gZtDstc~s|f{hFXH|~d~zQ~z_94FB&hp$n~Uv_DB!2y<6&VqZs>-fmUU^yuJGdJ zNCHP?2Q+FZr?J{^_M3`92rOWnrL2vymWZ&0dYxz>Kv&GXWgwxTKz)<+J43r&!q}II z1DmfLl8nu-xGa?TgsrX45d}j{QAC!m8iO1JU=|Pb8D@9FE-V0hJEA?F)srec5$GqD z8(`^KQozt$N;6ts8^+R_uiy|d8MO=#Jvd3z_#2aHXjF94XkEdq3myI_UvT|r>1&LP zU*Mm7Fk}T$qbutLyH`@m{L57Mlkq!hAMe>2-o(8*axogLh^b!!{|amH_{Hrdu!4kWol?jSB%l2>w;Jry$!mf_nbz9_B1#8bWJwL@w!No42F zZ!YAr(^WO;wuxHb`%ZD(qKIOW&)L%j)eAUf-WERo1D?D~FV`np( z5x$@RPj8}2Rbm<>mRjfuPFJ`nN>>ltyp;oE9#K9IU>+pE$;Cq!IYr!NXvc_-MDFXBXW=Z9LZM(k9}OKqEKn5 zMk4%l_POO{UM$2M+YvQV#N~$?Ycqe>LbTz9ur0(-Wp!^8a^GDh7h{U~8h980RG|9E z6RPnEU0ccY1fEIdJfnZ?3Nl4X0Ag>*m6>|oajhbexf9~a8(K`2Ys~o)z{jnuOj93V zg4L4K@x2Dewt5Bok=03M@JIhBSWy2hwxcxRv7ukj`8uYPGrMdH0q!`qHJ^xDQ_bLG ze*?ZCvMv^t`JI7rlqLPEo^WJ0b^>d@C~mI!Zv)-ljBg#u;uvw%ZXMqZsz8Mxdtvbh zbK^eGn90ynsgjzKUOl)O`l3#-uY%L?tj;+Edgz+awV132>9Z-?mj*}u ziM4~P{Pc$s;}v&zYF)Te5J7W2!$o`EH|~F3NfA2NjF&~?@K5S*f_mv2@wT};{Sj`b z%#^~iJN17>qQ6aej~{ubsrhkBAD`C(j7{y)+hU@!^SU03F0Vu6vU3+>!lN@MLR}42 zLOtGS+@f@~=id z8&aK=-2+Pz*y)te)kF3xgyS?qgp@L;G(tM1&#!4p&Z$yX2<+lj>VWT1tiO4`_h^}* zQ@WGd`H9t~sH>+NT2d{O5(~BeYjG#5=s&k0J)iACkpC8u;rFz@_E-w@s0bAs_;b>+ zeR6?5n@}4wjy}GSL@%#%!-~chg|$Q=CE38#Hj0u5P4^Y-V?j(=38#%L#%l4={T(Rq z=x*H|^!EG)+e-leqrbec5?(g)@Op(cHsVg4*>F$Xb=BheCE*5LdSmdwZ-MSJs@@i{5t){y; zxAVyon;`>Rns;YH^`c&M3QdxzNaJl(Byct8a9v38fkXaJ_<=8oe=(6%mZ}CJAQ}2r z#oHZ)q;H0pGydy~@02e)oeVW*rQaD_OLr+)29*|p(gAHd<9*JxBnu0W61lNr+cO_= zX$B`VmPwyz9?FV9j3-@v0D7Z1Z}O;#KZ!@Gm7ZeKORcLQsPN8= zAZRd8VWqow?b1Kp8!AiYk8acC$>6xHuUZWkNk~?EqKsUr2$iixV=zYwM9laPwn)(W z7b-$PlwKh6n5^&Rs$#s&98P1ch#7FGNN6yU!Nwzcesp2Ylw~C1F@G^YA!PF|a$MJ+ z{!r?468ju$sWQLL=o~SYP|CBJ7(3`;c^t;TL4ScL$Pvv>N+5iugRLdmL zaD(CzY&3J+N)7MS)Jw`U8u*IevtEAUKN4~AiL82B$4Bl5oK#No3jGEW-o4`>c%G#8 z!h<$iX*efTk1lnM-d*7Db6h_94Y@IcQg@UJ1-g76_d9@vHWB%F55WG&!4DAy{K)Xv zz~7iiiq(J#G*Jdb2F>RKFnc3y>bIwlQ_Jhzoc4h(EOVm|0C}@X1v`lf-*wuaH5_H)kg%$_&tAkc`-Mk_04t+f0A_7=y20O8`7#X)4WDMOUpG*Z~n ziH5Zevf@*c28LS>z60h(QH92FxJHOKTj&>ep>z##ag+Tm*{QU<#Sk`f3)1y<#hgNV zkGRx3`qggo)?FK!Vd`6U+lA@MVk3QlsjDj#M*^!8JsEqK;p+%l%NyiKg#EX^3GBuk zlh2;u`5~mtZgY!005*{*dmF!OsrxVg*Rpvf{ieqF1ZPV6Mm4vb&^x06M8jn4XO#a* zXJhi$qNRT@M;;!sLq`lbqmcnAsSvSakQ{XcfmP-CU5_ini_P>t3m1P+(5I3tq028F zE8xAnu-M!FQ{&(q8oC{RXMCqw5&ri5tvt$=P|_J!+#m6Iz;U2BaX7}7%E%i{`jgjM^OfP1@K6wN+iSJ-2z7%MfLBS2$+zC|(5j4tu zq@N1d5n}UyXF>Bz{_%qT2O=&{@hkb|g++>5oZPMe%j~Ee^;OCr)Y7u{V4m&Qf@%WD zEUKEu%teX>pmF5DMIP1!>pm1D);32{D-N5>U4W*9kTO|z(Tb#n-@+j!vWj-S8aRy<(xvQm zwZ-#hyB%RQf|G(r&oI7iZhf^pG13lCEWA>mk}rI8IFlm%*!~#7;2xQps>NS2$f@g2 z1EoM!1ML(HjM)=bp>Z>u=jEM5{Ir>yFJ{m8hLv-$1jxB4a{4HNUhk+Rj5-H8}G za~r&Uoh}bQzyC)f6#o3mEkwFNhaD8_~{CW03Dv2Tbl4{ zAFamTS$i&ZYWmae1aCxVNIKrj+u4g3%D96}iqw8~HBu+gFA&*oRP5Z`MikjjDgYjq zkf0&#_Xj->@bJ>!}JGl=t1|~ zGIx9!u63fRtm^?=^0z=^H2SZA43p1deVixbphteFyrqycaRq6DLy2$x4nxgB;-Dug zzoN<>vK7~UxLPDR{wE0ps6mN9MKC>dWM{~@#F)ne0*ExL**#VrA^|@km1xCtF`2N( ze{G#meS3J5(rIs2)mwi>518)j5=wQ+Q`|O{br)MyktYd}-u+5QYQmrBU2ckYE7#Z$ z>MgHjknqi-2`)(Z+pJ?ah4UMg*D%PFgHFMnKg?{GSZZ*f3V+g@129FH@79v%&$&v32_So*G$-3SIp6 zYTlLgF2}s>)U;QtdWf5P&xikI0p1eg2{G!w0+xXNuYf%n#X#fou8}EYvAw$zmrjK&OZkS!$REMr$*aG zyPPjsYd_SXp#Vt9NGI*R;-*4~Gz)&7!zq>hh7)i?8PzCAAv(pNcUGlPNf^OXS$=bx(V#ji2eMF6q{U@ z9?ldp%YEsl;)d%}_Qs81OX>!2>kyChh!-n0Xd@2C1cI2qkRk&b4)(?@KY|?%qMoYb zEi7l}n$O`v+T31;YZF(;FEwj`I8Dz*9fbKrE)8#&?joolVY~3YbZuJwfRt4-kCOM; zcm34HXKH>;a?joGLqjIBG|B??@rS`LSU(l!vxSyfKmGa^x5&S$gvrsrlVT0@Yw#bP z-3#zdbm1;n!DpT@>AnxkZ4llVa;h^fj?R3uN5?-F)SLb}a%TBE=HM5_U*{K=ddu;L7kJ## zqyyGh;WY5rpvMm)$*xZHv!CUlc{zU8huQp`KmQT*yq*ugOu_#Kt-kRa+ODx`Va(;{ zLMO*lsSV`U%+u>-R9GmwqgWulP#>jO9|V60TBE z5ONjntHY2V_MmDJHr3CyuL5X%IlQKbDRch~>EBrwAM? zvOJj&z#NzlWa*K*VEZgjP#cAQ-HRG&mC)aqyjY19GP$U zSKm`d_gXzrLE_^a!9R<~vT9n;>{y3F`!rB%M5psN(yv*%*}F{akxIj9`XBf6jg8a| z^a*Bnpt%;w7P)rXQ8ZkhEt)_RlV=QxL5Ub(IPe9H%T>phrx_UNUT(Tx_Ku09G2}!K($6 zk&bmp@^oUdf8qZpAqrEe`R@M|WEk$lzm$X=&;cRF7^D#Nd;~}a8z$(h7q%A88yb=# zVd1n3r|vPZuhe!9QR*ZtnjELX5i*NoXH%d1E1O1wmebT~HX0F~DbFxk=J^<v|BCiebRdAHYXxOo$YS#BHYecz?S6CX@AcF_k;#_IF+JIV*5|%lV=Y;Ql?=b^ zt}1qN)~qaKnz~KZRf9Aa7U5S&Opz~;SF2ojOSD3HP8WYTbvlEyYK~);#wr+UO8_Sl z$-Yx3B~JYU!uChjzf0v1TKYAtsRkH`QZeF8Q$_`7iPJ79{8V(jbX4T=-LF59vw>au zY6LS|t!~Zz>*ops1&9o5w z3lQx+lhgdg^4d0r-%q!s(A$J%XYhUx~)v|ptx_cU#?44pnz*s$G%3=wh_01 z5l7f$uM;P6oqhM8F|$4h0me5--syUE%vI)HuhLv@kL`s1eP@buw&}80Umf5QOXBlP zAY(8r9}paD1p*&Bir^3<@3Cc4Mr>EpoDHghr{U$hcD8$^OZ6bZS{UYhl_*Otp}Be} z-P^9U7tc!@aodKCp{~TV6o}?M9xG$hN$Kr>|7e~E4mJK>_yjrqF@Kk1;fHw1PP`UI z1Aoa$7yGRMrUVO0M9$rM;=Glzi>SO8!lqon9E_1^0b)CsR0%Nv-$st+be?a*qJkqI zUNaqi*6Y^E>qlHH+*M=aj?)y2r>RGkG?X;Rv!7JG6Uz=^g7B`jEKEvgUq)s3Fw|zFMdak((XwlUaSRN4hGMrH zn2xFaLH!t8txnTiQW;qUWd^m#<3zgCp(=5~i~xw9lU{R~o1qSo#Sh1_4W5(^hL%O9 zOauMH!uGL}u?hV!4V~#?F-<;)X<)4B$u1F4 zf=%}>{b#f`$Ixo^Du_42V6Wir?Muh`(!izQSV9Y3d-MCQT|9bs zIlCtJP7*;A%^1-=u(Laj97hG}uP6Hq0+DzAjB^|$CG(?e_adMTiO&^_9WwrW4H!ju zWEYrjLw<{fSyh-yiPOP{O;c|453fxkp`E;k&)d^wYK=ipbD_kG$u*Ro!kQJOppV5* zP4o#ab%r@RITbag_zHMKF5$z8fJd1L+D8G@m^`*H->XyF$E{x;d;A+T`A zR!1#O!ed)ai|TF054f1+K6 zTDH=fps}vL7=Yl3_R)o948I{CP*`f1v{E~-xX#PaLvb?#qQRElOF-pVuL>d8_�{ zSCu|?z-R)71@L#eM!y^Z6p;ZjzlW@gZzHJC3~O?Pk5QEa0q(aFy!-~pFZ%vBM{a0B zOfAZFmYc{!vg!PSF@l2U zJK`=N@CTmAO4Wuqv6k{SNl?~rs-CcW0VFIdAj^B2Wacs>M@3N&63=c06V6Rf2sR|QLucLaU zKEq5=F9zA=+3ZT|OlY$lIrFmvTV4H!iv+MxhtKJ%j}wlD3qAoT@g^}Cw`#0dsQnXX zETbS9p{IGl{fkz7ld(7^$~HEkkh7pv3NYi8<1qwOw!a|xaQ$TntGU7;01Z4?b9D8N zBh&aOYgatY!f;X<$(oO>v=8iOcEG%aUvS8Uu1du6!YK*G&VLOXlHRCKu=FF(IkNo_ z!128k!z=B?9(@872S5v{*=6WjNH3gAJAUYkC%^7Y;H4r>$kZZC%?&3E-qa#4n-YG$ z{5tlV`bCK=X~Idzr7&v8p)y!whKx;pP;V!X^4&igR1g*2j}8HyVC+>KqbPFthf}+i z5*V2^NBvmwfWIU)3;IBGEwFtYFWVWUoB2RyvL7S*E#d%FT_ytxM895Q4V_PCQh+>< zlu~L{SuQcQ?il+AeFdE87H!P8>HgIJjkGW8@`{o5wNd6uVn=dNX5$aDi14$pTSR=` z!YTmifM=Cy`Z=%xX-u&9>1bJBw3nKr0@mO&YfAp~^V^fzVJyvwMY(hM5 z=T^FaQL~&c{7fIT@FE@vI;GbS=Go0=v=3x<1AaB@b>U z;-hwvu#U||CUj!>9G3YgO6yQX+H)L6*ozXXaV=U_b`_DQWq#`f$?cZ;??y9(AcTLq zHrc9U_$w&NRKgWZ>e};_T#tf-g1TX#Ttj{JjKjCJqlf63U8$=~02ty9Nn3p2WX;CqqYS% zz5QZEArIj!d6Y0VI^JFWKudu=NFUPF=6TxRR|reQB5_2vIn)qBV}S3;MX1}04E3Mt z#5d$zK8z>OW^i7tXPB6e%UCqcK(le)>M}pUp6H17YHZ$`4urRAwERt6^`Bj>zwymc z6H+f|4zhQjlg1Gy%93Sw`uMScxrA;vQE~ta!zM?jz@&c;IxYkrPHXB+h4)S0@SIgF zdm{UTZqxJaxzBR!!`71;K*uco18U~X>AK&Pu-C&`R?B-Aj0=_$cxPzn{MlJK>ywJq zsw-Yj{^>7%vDCYw^iw(od$~o-Pz6ks8aQ}A1JFWnE@Ez_SYh@cOMFVY`?D$Y&Z~a1 zd>zg|c6+o8_xSfEUIvTsdiN&WOe=n|xS;8X;CYLvf)|=u($YtOu_6J z0tW_ukuKXj2f=f}eva;=T4k7`&zTqf{?>lGm&{Fe_;9R2b^^i}Krru0>ta|4^_A$H z7DO?PFho!p4A2C|$W~JYbWN&eW(4R;;Tmhz zkr;EbZ4D?Birca@{afZpp_|p2YAInGJ`1Fkz7A$droV0#{h=lZdX+xO4B%I?B_3ac z=7FCkf`P*_R`SaCnBPG1Jd|Abx!brVL zIt?Rv1@qnIGKpG7W-M54@Oi;BujL}Xdacfmc_9q?u&4#P2hPg`({??ZOOjRFnps_D z-f(IqU)UUW`f&U}`A@568jBEz<~CX~Yv+1et@-+dsV3RVrNTx?H9ht?VAAS0D1{G? zJbr4_B_Tqy_Ag;Xppzr)KXQ9QX}21eoMW|m_{|BBHJ*=OjhvNq(4HgLp`u-X3tw>X z9A?^?H5zIU4r9K*QM+{?cdUL9B5b=rk!&F@Nffz-w_pG9&x+7;!Am0;Llsa02xfYC z*PtggCwO@a;vLXCgarLHOaCqh;)QBGzd)|oeVtn=&wvyz)rOR3B)bLn=ZqpwZHq0G z#6YvZtco3reVEzgsfMR6A16B&XJA|n?MuIu8bp_){SA_{zu;H?8${rR&r^T3v9C(nb5F3yeC zBCfU1>1a`bLUbS{A0x;?CCtvBD58$7u3>y2A_P9vigNVLI2|Lin+b~C-EytjMOHW0NTui}pkxXdFdIJ$-J+Bm$%CN%mac~u zc65u)RMsVt!-|8Ysv6BvqDBlFKElp~B6L!lpd@XpeV9f#ZPtB*A?b!2cQ>(0KpkD3 zcX2g{WebJL!6EmdE>s!+V>?WUff2Qb1G0)SgHlNwmhKjxqoM~UZ>S=G#3}dZqbOgm zLQr$%IH~rG-VibZjQxA+wx_MOF@JC7m(z5WFp@?e-&dnA^W!f5(1q_mx7SHG&7Mjz zJ*FkzBLiO~YXM}_WN$-^LB=)#9j0}Ig(60{oTJ7L{`hY&|LX}pO&lXsa+ZJY)@FOggOhohsSKci~64T#~a*U>?#ib&8;moQD4mX2U+S(Fg|)$9R86W zITbI3PGBmng{xAMx7@wkfPyHgTBnY--U-MN(8g4;hg*?%-H-2y9+fMsROmUruu~DJ zD`y+zHt;&kEmb0pX<5f>5axt7b!mHhGZrk)cPJl8fFV}4Hof{DHc?nmlNe4OZlh%Hw~gDORC9fFH@ z(dp|iOIbEM2+*ogN5G5IIj5N6dcX2{rbl=|y=_lReUu(wdD=vfPY1!pN@X;H)!7M& zsVSTH?G;8EjqWqJgt8F#raa9{%Ig46>|d7k@)*edY9u$q-2MD_g(YtesUb(fF@ zeIca^`q$v%I*l@1*pSA^WwV15>IOc#+Fmv`%pKtg3<1=cn#Ja|#i_eqW9ZRn2w?3Zu_&o>0hrKEWdq=wCF&fL1pI33H z5NrC$5!#iQpC~h3&=-FwKV0nX1y6cWqW7`fBi39 zRr%M}*B_mXH{5;YJwIOwK9T9bU^f*OUt#~R;VnR}qpl2)y`p76Dk90bpUnmP%jt$sr^*lRURZhg{Jc|t% zzJ@`+8sVJPXQ1iJ<*|KHnVaNh6Bw9w7(H5d@A2z)pFDaQHfA+~;ft*Wl5TXgXt$X+ zw>HuHuNiPuH}l);i?tm23b}z`d*)Fc#9aSTR0**x64KPFxH=waD^aF`<3*U+;u(Jl z%Vml|ibUgNPW@Mu(3F&xqqX`Ywa;f)vz@_@ai=KchFb+T#v=)>bVeCp(|;s8%R{-yG(vI#MB|PpTf%;Q_dytxihYgUEEp*4UnBD2i zFzwhlAsbs^rvyOn1@$Y4a#xL*#mfe*-%9pKM;rMxBrQ{x6g=Z)-ac6r2QHFaIB3Cb z)MlIq>|a&HnWt;JF7aNioc_56#kOM7`*3HQOh2zj587o#jVvMmd0^Lq^}+G*kE4L@ zyr1bonUrLt{25*}164@vq#vyAHWXa=#coq+BP`G?NvJ{D6iI(?WK_#=?Sghj z1PAobWSn&T1JN2+aDKWLzLa-vkU}op+rSMu-^54o|YB$BNlXsc4)Pk+N;1Zjv_2G@*gdMul2v zus9!wq9-nM_j*C2j*4}T#EOpQH+mG;>6M45k1Bv!l)vdjfmgsSe9%ze*37SC0>9_L zi$J!Ziite+mT#sPW;8{9EdmpRcM_V2yctTOVr}V45Ya@X%iVpnLr%`<6JxcpQZJW7 z8cdPFktXB1WhRl~Hl4PUPw4E0+n*{!yDCO9mjal(#n-SeE6ATb`3BWpmcOoQtW0YC&i_4DFt9eMt#<$YtDl1dXA!$_EIQN?X#w1#3P}!YVg2_+D)GMjl zY@_EZ_ZKP?D)_w?>J6RZnB*Q7Ruv~$QHEOp7abg-XyAe)|FAORoics58~_N@dE!`8kvn*VMyv=fg8F zE;Y1gK-hU9#R`_&5n`$v&+@j=#2b-LIZsY&v=}NAOjfOB3*&2UItP}{OqgRpGh>_f zh%mJf#U&@U;;T#cyP}$M2?X^}$+%Xb$hdUMG3A`>ty6>%4yuP<(Yi8VcxH+@{t9(T zEf55zdju@GID-2&%(4Va<|Ra3khy_F5iqDnK(rPsYx`73WPueFWRJV)QFt_0MR4ew z^AAwRM+u8@ln#u7JFYkT)O+ zi#|KR&In+^((C^Qz6W~{byGrm-eEQBwWk;Gru$Vq&12PTBnehngdy#zSGdTlw| zntnZVw0Zw8@x6+gX%7C`9GLL`vpHbla6TX+B7XSrfgEy0hYHbGenBTju?E1^# zcPx@a{i?zW3ISa;V@%Kjgr2)Vx3UHv;v0j#v5i!do{bld!wDqWoiXLi;bP20NC_Q1 zWmLa5QI~_)A`d}#*aQ+SfANbQB7Qd!Ncl(>6 zheiX141UI3v(dtiSKg*zR;+|a*Uv_OU@_I@u$Sw%+tp%rqDxg~Va^*|OD%zXAYe6! z!Osuw69pNHQ-?@qEDa7bt^Ga?Xa(5g6(KJGSSDy#r$D2V;~$a?q6O+}b4^#6wsf5E zX_GK0Km%Z@vtZr~zNs08B zzlMH4(M*)#G5 zynvFiw~srA#@cLNhHk`!r@!W}8-+5UBM7C2P^oZ%kc0uzbTp>FHRO=xYa=v)0aQul z9UgNxrY#bF^%AFxsI;{sv#0ekRc8}5bc+e-tghcK-OU0FGl`O!q9lk-bQK3kz*s7? zV*U~Q9=~-fem_OJizGL{$4*=a7|@ZKwLY%#p@2?FP3Q>15nTl#b(ZW{k6q`Nx zOMonpItf;aZ4(|66znCH7E27N)R9I&GsIJ z*ClS8kTkcOvZ{S>Fv|`^GkxEX=rkW1(MQX6IyC;Za75_)p3!=|BF|6pLRsYUq@}YIj4k#cwM<(2dKCeZZpd6cJ$fz6 zXU8ca+ou~;k@S379zHDD8S5)O*BT7~{)Dj3LCoshK9dt=*UEKo$P_!yxozT=ZtBkj zev^`G~ zc4AoF3d|9i#^@>JywzuSvW7krJ{v(4IX&@ZU5})Jy)F_p647?_s=B2@mHHAWI5l=- znNFit0x5-AIV}8zv2z;Y-K9McGGqK{hU0@PjRaEJG*_X4Jo*Ua=DamQ8b7f09*Mazbhhn6LBj%&=C`Zw8uz@XoMbA z%j)N=G34Q-&zQal!IQE=*PWyC%Nzbkc?SQz^J9l> z3}_mkctbvtd6Vvr=Tx5dQ|k=lg-=zHk76OjP=g9IPH_%tWed^LXiY9Cazf??c$snr zz!4}Hl4G4@_xpkYJf2FXoKOO9-6J)oiWYVXuSJAY&Q`aFnV)5L@nU~x9O9VuEbZmm zRJHYpRyw?}bQVa47oYcRa)$0@{Whq+Eszd#|A;H146&zmxR5#?^3=Qdiij=KX-Bvd zk&plq0|^#&B~AjImXrDvvJ40$v(^a!JSp>w3$@6tFc)7&spiek=YVmKkS2(%uo;S; zqBCrWkh+zGsP=MQ_NEL>&43-zSnE7k>kbEB)jJWqRV5}k>J?*Rcn)jx=c`6*MZ~|i z%~^le&(UQK^+n_>?xxUQts<>aPR-TgOJSE6Uvk5ZUkP+>VveCD#mghIG(nOynL#Rs z2$vVgxk2{9-OsO=D`|Z%@x3w)&CjCgeKN0P_V|BE-c%IL`c-nXVk9#S-YNj3*P!-C z^7XvFA|Fc zQxCIu-q?|)UMe%sa3wKx=4brU5@->gWRLT4CltHUIy;}a|KrUJ{a?72odi_$Jtv~g zkQWC&u|Ui#HMR{#IS~nXxMkhhGSf zY@Od4)>#^qTHlZOA6ih(()g<+OnN3wb6{Q^(N3|JFQ>wk@M>uhX) zr)h?8eW=WL#|vUm?PV9~lwWnXh-FzzJ%!x>#?s)dgZwur=+ie)NL%H#f~c%;e2_O? ztRDfj%ldcOwjk(ny5_GYpz}QMZ&YY${hM|O2AyZWre5QzFI62O!>~tkqcDdtBY{-$ zuP(XeSh@3Xk*0o^Wa)qAsTKNxZe}ik_%)PtKt<$f>wWvxMo*99^R)3&;*5cJd|r=q^}Qw~=ZGkr7Dg^@4b4T-b$ zv#R2Xe!$2km%(4C))AfZ26hixuAF}-+f zZwfDSoMo+1_8Bu$7xPtlaoSMSxTLFO1~#1+>uc(Djj`l$TpKz(SF{%R8g%NC7!}{IaPsNc}&S&M`WZu4&tu*tTukwv8*!#C9^# z72CG$WMbR4ZQGgo=6>GqNB3UctM{K?)xCF}Rdo~rsc4{MqGT*X7Wi1f9D7k%cwP1a?U&RIrc`PKXV&fRKgI#_d$X(&SXS1O&!lRovJGQJQVg60S*AF9wDZ zh9=X$yV0h)E%*z&CuydVyRSQ+JH9@TQ=dpevf`7)2Bn*IUCx&ilfbHu<}m{SoElh7 z39m})DpJWpAR!Qp@x3%)%4JbzWB4LPxVLQRSboj0EXO)iCbQ->>+)1T{T~oy%}-k zZPiD;=v1*g?z+0TArLF-QXVcw-NDyEHfrSgjtgkt>ep=3P%Q6WnvrJt z+4RwtdR4Q#RUS7xS~!Qbs=E;lje z53Oy>LXWHQ$2v+95NE2^FeUsgp1y4FyvUw1VadDrg*G_B4otGbMYIlWq>so@%yJ!C zV+>DAk}AXSYO|>TXO$oecP3UZixgcI-#ccF znJq7up8Zjx1AN0)D-mL!udb@{XsbvCrCnAgur+f+WxIfw{$K!o4 zfn|*egR+@Cqfbd)SeHLedNl(erm}_}Clq=82-p7cA`8%vq@&iJlk<}*b;&T@mm@wX z}1cA((mK@yos zPW0ZW@JX#qtMNijTe@pH1gG4`^<{AR@h;s(T} z&3#(~u$Qi#%j!zW{ss#Xsm|DQOrmKNB0cK9N~^$rZJLyDEKoClR=V$R;aujtgT#1b zA`U4#ht`VKoHWuito?@~br1x@B1L^j>cuo=exM!L_g$Gz0SpZ^`C+o-yaA}LPlf0= z^n~1R7J(vVSULvS{$R8709Q#R@ZbWBjZyY(AbHaC(7|(oHtzZ@NbtoHn;_g=+H3fa zy!pe)r}Lf|tftQ|FMWp`rny9HZ;N&8jH3-LHf6@ zM&!|x^O%ZcPJiq#EK4mpID>Rd469b;u>zA+kvrUva9OQIDXPl_*T6IGn29GAYKQ0n zASA;!l#^KpqRw`sb%#}-2}Ud`ZK&<)htt;RIog2CA2(DI+sP*f^;yl%Jzz6%{0}^a#h=NyKLgPR? z+h)#g+PQn_^B*+snviZU(joHWllOKpV9D$p5IwQbsoi6pC_`)m%$bm~s>3~@oHT|MFt~;^&e$k z`!AZ@c$^%MzW3|Jt;kr?yNKC`4g;qphv-mowYqO~qxIDHG&T*1Il;sp@iK|H~; zRY8%8d5`6`s8oac%2s^AFKN^&{3cN##QttYZ`4w%O1kG)vS3r_nko@(3WSWY^hy%k zD_xZkb0hmkTBJdfu$mY-P*DN?TlRxM-eP1OB3FiJK5ogaE%S@t)Zzn*d&`8NQU6AL zC9qU0aDA(=vpOu~8PPvMOGiOGcbw0;i&OIZa_^2(khD z;&117LsI_yz=<&pOSpyG0=nv1z6nB$uqp6DxHM4~*{6ytIT39}>Z<;BowyqFU@THt z9tvb``MojCN=M7LPJs?9k>}02!$N}>-Hdf5sj+7zPsGcEpJ72v5=@DHxVbShM znTCaXY66l$r(TQRo{5JpXcn1GZ4$yFyu=I%t%@xcR3pUKP%~9_4y2j%Q(-)PkDfn} z9I;eUk*#9=IplZ{KjMiWV(J5dk%FI*g!Mq0g2h}Kb^c8wfG~@54Ml|sRB_zCI<@{6 z^>GrT2@cGf?mzHC4F8I^S9r33+|on(dnh|1Z>%)RxVYT~j~E*AoAP*jexWIP76myS zPmxHAcOLo4+KFvX7leBb75ClA;yi&nJL{!SU3@ zWMvA{qx5Pu{sRs@9^q`F3_ray9*Q&n76E5u$F_G0Tl}P{sn+HS)^78+pUqFXayKO{ zi^~-OJkHkEj&_t9g1Y0<`H^--_8B+x!zqT9=#17`5WUA@RUk-mPwZ;c+8RhB+N`=K znJs*ymvdg07$&iKn$G*Mk6>^D1*zhr9ipPUJ%R8Yk{s78rc=2jq zx?!bk{FtF%6OeF@OlMxwiOa{3JZqSunUzIK$Krxk3j28$=JhtBUVAPyC$e(tOs@2&>aIiai+vP@s~9CD!K+B*cxuJH5{ZoroEdkOb07;B!(&?FM&tYiDzMEi^#Kvu)$>mUMf_&sIXt9V z1`|{6PuR}`LE+?M@z!%&B1y|M_RaF73@U??hm`07>sJ^Y!2lLnd(8Vpp>y1ny1lr3 zl!y`Wp!J+)z{ok;P0$-LP(J+_fL&p*f0=;J+-ts3-7_(rS04#pN+)SQz)n%tOxR6_ z@iS9s7}z{TeV+AZUSI^TvB)a<)51kpw?}19ciIMhgxJi+fk$dzsUIxLVQ}Nw6>zz% zYtr38Z538+YKBWeW51rNm{Tpg2qKiX&!^s#!ve?C(NY6ft*#v{M7+r!kFvwni9Vg9 zVE>1ImnPXi@nY&lD&bwEzxTI{dNtF18pL$JC~#UVZdYp;{nAd(+?7ql2-I0p0a3h^ zdE7VU7KJ)trJ-z)KsCRt^QH%e#W!F~rPh@w4+*$@ zK4)>+_gDsG){RQP2XFWefCz@LxK4qr#%x=WmPy&Qi9cIKa_7gh__E4y=^U1@#vNfA=^ut28X2_ieyr<^WqKZ6Z-Or8MH|Ad<`?oNVuOc^D;a300H_ zM@89Pv5h{>T$*iPbD?^mIOFe&5u_Bf2CQ{5|AFdS+Fwi*XSv_QuaOXm*g$E@V6`8E zQRKWE^)Z_$Y0gO|a~q&cE+vcV=jv9uS%8|>#SnVFD4{g@06WNT*HBsw>2!tC0{d{{ z-?m)$6BB^p0Jsu~0e@^&+QoxKB>XGk((rAyZ?!zC_Y&)X*aR~{dd)P4=tBS}&bgS2 z{qy^PL8LkzJ@}LlCE)1?0?Rcsi(8&_kltfWR6M$DM zB@k7TLP~t7P?uK;Ts)*HwZe_wZDjbBZM%!6b?Jhxe7&{7sfsC;9!MX@l+!aDwGefQ z4x^TY#)Apr3tC6_!dw?x(%AL$?5VUr|4VvE0UoX+_onVuhyG zjno6xQ`GYfpa&yn`;1$$&NDY>HXLD&54al2@3A?CO|q4u_Avv9^NpXV^|y@IoDy42y31Z)~eiGpE6 zjFQWawJp?DvP0va!#N^er>_g=QN4?!$QgS^+?fbZUO$e-pB_^&i#<6xi*}@zikhr) zQ3p!O-n4OUat{Ysi^*BT_O2f8jyx#;l8S9XRMCoMZ2A)_ zX({EoS{qBU0kjhm%{)Y@gbA}dPEho2-^nP_{xyxl3R{(C!oi@~ily18z0RaLa0~`Q z-}?ov&mj*bb++L+Cn&la1{QW6ioeY&-ik0^fbt>FeFp7$E%vk?b`~WsQnvbzyglt2 z9`}pj;QLZOF2GfJW`1Ani=s|17tLg$8U+`!R+s>XANYrUg=l>KXV@4VJI=(f0lM4q zc{QF7gEfqt;%le{C3*5Z;l{WC zFSAqZwN$9H)7C|NkiQGy?ue@E(A}7Xg?|NcL2!wKV2fX9dAtshHJ||p-F=%=!ny8q z6#06TOF*fvSQIa|E4OQ!zt_m$j8YEAXLb#*=)p7dhKLDe#O1>ypGw~Mhuiss4SE&o zUCOJU9zDRJ%X0NAEI1iD47H_vlSGZkF~C$89(cGGOkm&MeNlaq=G0Z^LGoC#&+(5; zaLHJmE~eLwe)P>Soonm@y#9COv=j>${%>Y)XCS}#)W(vgsSVQX`2E(M^D$y3#n~@U zgV@DGaFc@HzP4;aOZH2b_Z$V?;5?hCMg* zn!6cCC{y}g^m+AoL?$;eAC=f(GWM_EJYNcPYf@{mDE%^ugN=T0ugCc2Ib$OHbSS~)R(7Omi zjZ9k3U(d1-{M$k<#<4`~+j1kbgN}?&yxq;C&cE~NugdUGNRR`qr}^`}2t-ziw}9Yu zND&z4NgN_teN~?NfvUpDyi>c_B^0D$$U%w_9IM8HxQLYy){J#zv$J|XC2k3T=4g!TR3r2+)_P(#EJsgpZU#ejJ820y9k*w+P@sqnB zl9o~obFSN-5jU6z9D=9cynbWie^HJCnF-Ek_hYH71W5_lcLsNLo|gKJBcNoqk5c#` ze{rg+LtS})^(X{gJxq+Am1Jg{hJ6adCBk8!+}{d>I_;u1kC3In1Oy{5Hv>zNHJZs5 znjAml*}FNZQo=Ul=BGBKuJg#6S6ZrlZyojk7hV6B@O&_H#+`Ni^H}s&=v1+EevijAm=O*FaVtKKpajjc} ztaO=b1DMn~BYxd*1Ljzw4}l3A@`qiyNuq=mV%qB(#Sat#fi05rT^EFLO~bNLgjSc> zSJeJCu>K0517vo(tmJk=ys?J>M|?&{ev!nS5H~cObS#1rSXcN(j8<2c>5`D6w2tf7 zjkvK{8I{la@AP+{l|PZ5ymZ+vIZ)x*a@lgzr?3`tKDAD@YKBNf+PeRun(}CTCE(QK$%Jyv^`vksei?l5pL8gQ{6s0E?fw#I?&W!G9 z+C)pZbxWvq8L3$`GAe}p$97nO+37R48}bxo#dEr&Qg2J#ZMnsBo=g#@IeASh%rv$3 zCyobcB()INWZIHZD`1NqVUEe;JpLx>!$#$~`lfTHjZNvIt*&KmP29<5qHD)>(a~>x zDT_5fVT~3K%Ybc3xNBC1#@T$N^+~ISZ6!Z%293?xQi>N0^`8#KfX@*0`rA@o@8FAT zsB`&GEUOCN_|)~=lHXT#bL%f2XZWAqP55N5u%n`YbLctRQH>0A*QR;vQFGqagnY+W1#k`J)!VJdJRaXokyH%~~(F{OUSN8mX&?MrQyK$stRrJN_8j?Wp zkvR4O{4Z^Vqxx%u2m=IUj^=*~`lcNV5Y9)}4C60QCd=D9OJJjRd!f6-KB(4iLqL0d z06RKXrX;z+KDpkwUBP~_lcJsC)qGnR83P3c9A(LFOs=@F++QC+{gdCcPuUTcIvlZ| z1hzapkd$@yJ+ayMyfQFU1*rdhojeGzLl{LMmVJLfqNj@w~3XBub!DJCFknUoW~z8qjLV2$^@+>HX1 zzkSZ4A3OtiiMH9G)F{x8-`pxn7O@+>p8bL7A}3@y3{7A@M8Vy*CAVFWIF!T1DH%dJu5FlvnwyLF0#cSdT1$M6# zZ18qzTQfAt9;sl^A2aK%_~@pCg>_Qp()DFxmpa6s=1SZ4*=uzdMYCjqo;X(5oMhv{ z(dB(zEBvvp#a1pisvEaXUh>{EKF)%>rO~fl_8B-_Ime(8ne*WlnsG* z=ur;WDhz}R_=p6&Me__0Dnqa)Vm(Gjshb;d)FwR&H(;EMbdzAFeKFCT-Ig4E$-4aK zGi-#-;?EInxP?iXbRq=$>IBkhmhdo$FOD!Kejf)(j0kQ2kZL;=o?Rn5)dp>0x9TTa zCPh;SH*Hd8zFU~s1yV6Aqabc3g)G)YP&0~_iN4(1;c@Mm-(~T@_R?w9F6{(DUIimi zp3cI_mO`0P?HWD-gKBwij}GDE1U1oqsx#4xf_P&!$(ge3=p}rPpg(z7QtSLwVp%wr z)b0###i4ADrG59KZ8H5jrgmQYIGWL*j+|7cc$#s65id0@KZnq(3&wC@I#!RvrVJD` zc}=SdM#lo1wY7qQ?%8r4UAkOF5s^!cBg2nM=0e+U=;dHNa8Rk z6OSdR1P^6%75kui(xcdvAns#PwNEUe)W6QKvx++Gk|I@P=%B{I!M1%mN#BD~Z&~S> z$J6!HZEokW811c=}jB3iJ%ga)vN0pvV7DdI!MQ|gk(^k^%8^T$}3nBR>8|jLy4Kc zE=NuJDc;yGJK4Q)RVO0FMbi#2d?W{tqrvP2@CjY;agYympLu+8SM^1Bm^UyXv=)A) z$BGy?QAf}MC3Q9vaj5ue2ht+%CG->!2?Xo*aAjdD>+D7_N2BVDezDXJyMf0#@!V-l zodn=f$EwhwvPjP_`FNCTC?>YxIjNyQ{JA`OmQ^H@t*Ugyq^(rOx@Jb)%18SEeuX)K#ChVAWHY=G3=!Nw39B8L}Up9V)+ma4^A&pH?m z!ZxP?A|Ow92k*S%zgJf&B;)6NY_3^}60 zB^*Tq4Y^#YePB|#FBZNY8^FhrqL)yz@kIB=2}87#%Sz7pTM@ebhNF*?h-zOlGaGfv zZQ6P7qKX#@;EeeS%nI0kqiA2Vr6}63Y&%v5y0ML^&*z*~kj@ok`vxQmDwUd}iS^e} z-?Z%5Rm&l#PM70=N&Wo!2i0KZ&gRQpo@dtJqbT)p_hI@y$KO)UOh{V+3hcj2VhIFR)|`=Pg4tx(@};;bTtOsuNyB$QXe9pmHv*L z1ben*Fi>HnWoMC*FSQmeJ=SCE7~L=5TdT2brdx>Lpwa+1d|$6We068K6Wxxe&F!baQ|&s7pR zl$NXuC6`oi3J}9TYEA17G5kP5aP5fSaDISnI#xzANK&8QAygL9p|IKcF>Js?yRHxU zXvzf=6iuHcb=PWBZ^DVxxF3fDUpU6wevU*hwgyKVtY3u>XIdUCa0x^aO19CqYHPS9 zu`dYUXsTy$uB%DR^04ViJd4h7l#|9UlYmL0#XJR0%{SPhqaVrB&z{5U&dg+Rrx@9o zO385wN^)BuxZOicKQ)$`=k7N#;9Rnz+VF@5%Y`gGshFy8Hw5qg1W|DShA!yJt9nJq z$TD$(FaiuiWu6WUWb_!WUy*ZE@V4svwd&C@-1t~Z{HSQZ`B<(gJ*A@AOX3QZPVwMQNTn>MiKs)cfbC0;XP9g$wQ(ssw*!|cIBS)~BQVg{XNM;6Q z;Z4vGuyho7&kMD)b8KPy{I)E0CA9=YS*^)sySa<+o{t^_`#Wr&9lM#6YQ7DV>6?p(hnyN`!Gj7pUlUK!ybM`VhCQNEdRJw0Ukd^J@oN^+6;{FFz;7a!3hiE!Py)C;^8Cbt>|>vA@hw*yV9$+*+F}_|C^C{ z^$4FY6yp6QXa@b-Xbg5FDP(X<&GfJpd+IZhw5H3X1pyX`UgqephJAD<7@yKcmyak{ zBe-1l&h}3?t;+`H{Z5<-0A-Ed?nmf4oZn+6q=JKLD0`|9;b#lCP+P-NR`c8`gG}~o za_Wop;jix$On;U>r}s_Z#~q-fxnlbMCTVSaw6-|ETsY)HQi$+ZohweoYG;J!#MmYU zJ-&E}<7=c5?zK`~6X1y;X3s^0gnjdu`^z8PyA=m4zB2}%OVJ>2-(KV1!c_UG5tvz;-b<-P>67PMe-{!%S$+ge-~q#h{~r!iBIm0yR$+-JIM$&8J3`IN$zZby7XCwIYN&KX**xR?3#I`P@$25sP73{J~Fr{&VSx zWjo4(!WZY0!WRLG+&5_hs+36ennIRCGszV{g{c&nVv<_CY*JB76~&P_B3|dIkxj~o zswLyq+@`s3IgBXdfGL(JNd6+zp~TOG2=b5kop^*4-kRP~>$H7FNTn$aAkWn2(`%K@ zrFm>^ze(m-JNeWHOSG8y%D)sDXEXClyF~dn{9#!|`|qY&trq!g^80r!*MCE+{w?so ziMQ>7@&6_Yxnljhy1zm7fOt$qRr3GE8*nPAj(P{1Ed#RkgKMS8Kldx-Y36B97IYsk z|9}y6IW9i}gPJn_ITCs#0(+!0^=F_B17!!Ja0Fejsus9etsKjEH{|gRobo=RabqWx z+E&({i>_*%E@=1X|NH^2N9Z7gBRCL{zZm~NrH23ixJRLXwVMH>*4=hnF@c(Vhz6L? zfp{Y5=prJH88g|6MHz78O^o71L#>V^fpA29VW_j}65@zQ*^j4uK+%Uk_aBf(U@o9> zNJyvCe618gc(S4%qX--Jg9r=UYJd}3g)VM{2sg3JVv3zB=}QO#SbJNpmK#M~YdHii zU{sg3c`hw~d2=^L3ugw$bl$tWmJOz@l-DIhqBt!HD{X}KbwYy==H+zrbaN?|>TEYr z0CKrru|C>d!2)@Ga^_fEG(5+9tE4#&&R_0^_9d@-J|c81x}VBM4}h2AIy2OFiy9l) z2iDN_TbnQHnDsiZ1q<~HtUsOfO(hHZK(R8@n&|X&-gme5v8YW}j;=D)lv_A@`oA1+ zNUKZ`vXjqpP>7Wn$t?Ru;6+8)qSGP}KP5OAm_7UIg5B&VzSzLZ|8a+!1NZ5<@uMGk zC%5@!@%x4*mY3luwenb&Jx8X{=A`6&qZX+C^T;Z}lVq*`rMsN|JN}nXopeTxk#y!Q z1;nHgX~8#Wp%Il5CkUX>H2{TkrZ7rd*OxBTr?aAamEB~ISQMB2*=}#sQIjND1HPa_ z`VzU_VYSd?wZLZglgn%4^}vuEa|9P^noEhB(MO`zY_m{qND#(h`HJd6D$kG_kme5{oszd&i( zEO$uPV&<4Nk5pW9Y~0A>hUeCvz*EBZtGT4R@XC&cP9DRNGq&SM(;Fuyixh&|s@)*| z@R`oGyCdd^huhWJ8piCIg>D{fJaRF-E(BkVkmZr9$R)jZlgrWyD^K@hc1=v&CD8pe z|GW*rcuG~5uTj?g8(^WxCdG#oo4vAFn|A@Rd|ExPvW?j!sPofTRq+M|eN6jwD!arC z+^(8p%`i9gjQ87zSIaT_w`yIkE5IZBJF{Y3?WWGaHoew93sB1j*FTe;A{Yecfk@wu zpS8McksjKqHCMF1dFHK)V52~|0NiRI9G!n8tyZOz2fMkVdBpl=JIpar9_Zchau!WviRC`DxWD%D3h_317BbUl44j1a4&^ zGs$RKV+L}b>ga6jc(uQI1uWd|5+t!4_96Io%_HvJhrg2uY)acmo&SFF&mSd9q|{jTx^fJvbGU$-P~^aGpDRPn#1$1;sIRL24$V+`egtex zE0k}VA5-#zF0nBs%l&y#BhpJ~zUqR^xco=d$&7V*PH zZ=(514Nu-@FP;;Wg?->1LF)jYHi}1_6XDz?5r0lRq0^lXaH8k<3vAvt#)oP8Jqopn zrAsa?bw*t^03OdK3HpRM0`p{7XB=%X>0D6C*+UeG(3y##xz;tUM1{^fo^F%pfTlLd z#?dCv%;ETjo#!e$C)Lv`iA+?t?z5~zU%{cd-;DX>v_MGiYDW9< zxgX|zu<79r0gb4~B!MrWUytBX=pu9m7rpvVIlw0`O1cN41Fb?v&Z6_1mp2eH4{GvQB3CrHZWyrJ;VnXLHO@%E zN}Lo;kSiq2fzh`?=X#gM-#%8;q(d{1S4eY6v`^npV%ZZaTx~x^K8$(CSiZ=xP0G{T zc0(O^50=d&>c_p$N43*lVIrBX3n(=G{Ivvw*be|0`dVQ&l^=&sB&pxb7BL=}$~X|` ztZcSIzQG9LxDz1?LIBcJ3y2zUcP~kNIxR=HnK=Z z$Wk>Vx#^8P+vXHHZAm8UFFR3!#hHtX@Y<}(s$-Omy#$v~zLk0N7ajAJ`o~JX()PFc zWrpRbuu*pK0Y{Qv34&GzdRHoS@k8)D4bmvj40_&)M`F5^D#&F=t-fRWF}}{L+uiU-6_d--48;;BRMD~TQn3cBij`+7B^`ye zsH$AndXoEoe5G+SztfZ>ycU7WwiDI7j(Hy<<)HI8pVpN-D@n?jWThZq|4u{WT}l92 zgM;60dekYz?-Rl2H}NbCJEz1jbe>FP6mCEO|JH z3_(<5pMGGP-K>)xQsP2Z@yxwywe=+~J8hr?y<61l@QJh!w3q+x(#_Sz9{Bx!pLVXL z{iT(lg=r-K!a?=*bUB9|;0w>|#mOz~OgdS&|qCbH}A(#|zMe z6uhN4%e@WH%s+CNx4`g<@yk+@jM2&i3I*YUczoxe{`UFds_i7|K$3OrDWvUK^)PS? z(^0gc@Mr-vEMRId6m`k1!K4hmkN3)Qk5^@QXnC&?+bWtOgAP#?ryk z-yqkXeE_ZvHcB`Ny#azmP1R>8^$}PRZmr+)@s90MQEgqYX4H|wG8~Ib$fDbyeKRg zCr8v{0HDv)uS^-HK1K0?s1#GqxSF3QK#JA|7|!-3K+AsTY$58G27<7Yzi!9C&IH3NshKKtMbEHyh%yHtJl3+Aey;Lh59(yqb??B4IeD zm9F)fMrB^tbIcgRMuM#3d^gvtS4S7aPR#7$h;)>PH|;*1>MMn6A&JiwkKa5Ur9(F% zL1dS_1Db1u`Yo_*JP-F_C^XB9Z1L%C4q+orHgXL8I1Qzx`W4jrt?5EU|8G;!NSzWeNG&Hjli{v-u-D zK|+c?Ehk)<>H{WSI-Kn-rf=uD{+^_AaB*JD!npc%U;;R6;)=QgB=CEuocaaljF4O^ zzh3^FZZYf2_(J=uj?=7+#$yjMqav7#SK`)IPa+SN+=qlo_e!s_>W_|fWSCEG>IbO+ z4~)$s6yV~rwtl@A73o)$Yk~A`&@)zpUu5o!>pQ^bK5JG@s%yBlD8XJoz4WyhRr{-` z?Y1%AV;Q(Y+WnWiWpoZI&hV+9#4!9`FijOI@(C?1UzJ^>n9lL#QAP-l!i{zRSv<6R z-q_H#O;B*_X_3TXT$HKUC@(K30Wj4E%Fq<+eqfFlpWALXdOM@zUE?2&^x{Qy^^Dtt z*Y?F&^c#zfut^`~ypB85(1^?KWviDYa?{pmRuWi<*D~0!==#k1&d;P@9dzR${4gPB zwpXZ4yV+KSPcXZie_65QSFS_9K!xMM7Tp>3_QvsJ%!ks=-y`(=P~s!T>LVL`=9Fn( zwrA;<@ShpH%kZK^?dCHz9;K;XWzc*$k8w!=)r;%MyJB`A{(L~!RKHz5kLw!7l}#vm zfdT(gIdpqd2PW;L{|mA*)jiC@ld6k!y~x7Vq+SD5%{FE28WGgeY&{kY))D6f*D25Q zZIKpb)^m&1>KPLxb=G4OC^kX6rCPowoo~yKCR>iMApU@GvgktHya9$ou^;6|xY1)2 z77Yy*2*QhNRl*Z61(u(lX+Cs`!LhAByn$as6T5%IiG(Yp|Eglf-rG+vBMiH zNSRL~4z>Ds_`*DKHWA$IFyjUaiNWXB=oRPVpNREz~ zJdb0>;6p5v6{Ap$$6i?8IF(M#@^o+V%BY6TpW3(m|8$-~te>WSGA)dn=IQI+0JCc+ z1Y5UG&yN3{fgyr)pIgpUQ2yMG@mf>~r-@em=hB4Fs zPb*keoJx*#qEzubR$|G;*rVNlJ}u6i+w3bM2#6>C|3n4uC`O>oe;pP>cTvtnX++y$ zFws|ab+tA7kWz5b7Keh1RemB!_9(Q5T@M&c7%-2FA?<6G&u6~%6Ya&Z<`zguZ-j1N zUEO57^4w-*X9xj--;nh%YI{#dM+)aj25BoK?+CuStuN0U+pt}!hZAcsK7(+$L-+A| zi75A`YLcPLxgP>|q589cvPj-(Q-~QFwVzNdrq#xNZy(E{6RzPeFY#v$sNQj|a;fsnxzI(QS z{VxM!EhB2fwQ1s@ODoItDdL!WmT2NhHhUwuspBfFUp5T@DIKRY>vG>{lLz)G7BuoJ zwpEerKA-82becp1o*+DJ>_L7^2=fnU_9O77RM<8@$jNktpD?X$roUS71EkVyD%j1m zi;9B(0p=z`tb2#kAf~F~b4j)G>2^Cov%uDKasoo}w8VVriKr*Tw%&Zqj7~!Sy7;1^ zYXoZCSciBN^qHn`ZBGtWsl93LukGbpBV!*@Rb@_{ngsW#*s99n=UBvfoEUa;`FK47AVK3Z(Kk(`VMK%yB0isQfAzy_3+`v+SvC`vx<*mRenZ{rYe)+FRhOGb8<>o1JfoC4lLp|Q8h!ZVWpYp z07yBY#DyLjqm#Ft%nC9?=7gD;Q5ew0z{kR7g;rohjNHvfHj3lzM9_A+B0g#t*@*@9 z{}HX0C=Zbt-1H1+v=)mJxzxka&}Zhp+WrDpM_JLG{nPm;I$-s3wqsAM49srLc&@FG zsSi5S^wPxDXRWkHj_AgJiOi0$SLF4XOF4+)uII;p@9csmNs#=Xu4Mh=zwZ!?83ZP2 zzXTmw?U#$InVqt;gQJO)TX9nQFNFeHunGU#0U(YKcfCc z84#4Am^@i|WI`3q8)xJJ+WL)Ocu)OW2EQ`trvMLoSx7zacwbm6zN#CgSZU@pQ&aCR zzPAo}yMO;2Yk{QA8Ljy|n6|eiR65#dv@I{WPE?jW&`jF2*oHy1oZ>3f(Lw{$22i%J z$ZZ{W>v0DF&zlND9Quc`Ob->B+m;Wh#&kr5&d1KptP&lKZ9ffd_z-{i1>s?(MC!Kc zlN4XC!04kblxYWJQI%0fNorJ=_(cb@oSD@zFgPu`gNv;sJ&Wo;RFc77Cbj}ZF(=}_ zh1nhC;t&HEzIbjDwXMUM;e~)lHeGv;tp?ha{OFqb#^J_IjDbO#@TZH90(P5p*I5hvP54 zxh0t^54jbYv)5d@)6zndct=vo?){V~T9*+g0?@lE_Ss9^nBNUh9nOK$dv>AWhxfFD z6#^xKpSd@D+*JeQIFJmZj}rJa8ls@5H2WI&ZSG5fxHg^_xoapOW%| zOow14uOw#3p6V1%SNXsjPT39#z4-#;Op=pZXA{=Qs?W9GHMIeh)t^7o0(woLngo8H z4+<`;3k_TF3ii8&u70}@15*aHJ6uf>^L}bt?G_vGHDOJ#Bov{K;>*h3QRG}&gQA@e z9uuwy{Gu;!pid-0$Sm*--v8_BhG$5_$izneQaowLRi9<@l0X3jTqMppT7(t&mgqZd zDr(dm2mtDIXaq9!9H6->&ZG}aZPHH0aT{I$=!SpgV87(Dkm)+bc$OZ3T-qn z!OMiD!w1mEJvir zW2aB4yS38ZKex_!?|*;5l|zc^%zwxkMacgz)ng?gr$HrASK=q_C1C*z{EtQAsZzj) zn*sykJ8fjxA4I<3d*+5lhOqoVgp!?FJjzN0Y?J=AZu#rr?qUAAdP^kq z!-%j2#;2oW!dx)?7og3^T15{9j>1Wj-ZG`KT3Kyn$y9=lHG4H9e)>KgFRGv=@ zc=wADdn#VCmndt<5**Fy^goF*{V1TuD`h;j(UT&s-&L=ek|zL~ziK8}$2jZC2=^h57nb&+Xj0;6SK0M{Not zdZz(j4-L_ilW$;OzN@|ih7mQU2i-~jJ|$tSoAseoPDM>*%W1v2)MgWKlT^6ZZHGNF z8c*EwJ6_0X#_|qDK*Y&GQL+Wb5n00*6lHD1u^afa915W- zT?Loj+aB5k@$jc%8FKd!@1QnC~E88_D_bL04aMukP?cxyVom601|3fVoQoI-RZwN7@6Q2ln#~spKR=Ry(6IxzC zF#%G+G2D|id5_3Z6hUrCG9IDR-DvGwThMI#;US{nZ6p)-TOnW1-kx0TTX2w&(1xm(aP0F71hR_K*TMY<5a+Phx^w{W=@t17gH^mSK(im&ZG=( zHY+&j8`#KC*)CXO1mRNQ2prSNvye;Fm5%5KQCx; z+dA2~9tVLR*2#}wl3kX<%G~y*mW&hYC(@b49;C3o^Z~v_7$_x*N|I|v`&i45IX|B1=4vaVd3PpNY;;~A ztC*Q@XS!v7{8;phXUsnbA-TMXmOWsCxte$qib6tBnljH_wrg(qy)J~r(YKJKiI^@L z32i1FU~UBL+>rPfVS4sWYUk4F-yrQH&d^$snQ+bh=Grrl*yp_Y6P_G42ksY7{XDy!@BpD zR7o?eFWUQz?llUyQc1AcFyYNn=wV8H2Y518w=C)>qG}Dt!QVs|`{G*hTt>yKL6|Aws-73L-7Tq6n*O^57tyDvcRy5%UYtiLUv~R9V`;&h>u37{T3v< zEBXKCudNlzz882L^h?Hd@5OHmzJA%W>qTRDqg3I?%i+B{zU6xQGfmPHm>A*ke=Wu%L&yh?jK4PyH&G0^GizJmh0C&7taf*Z*5)C+PrUhW`)J}iYwoBdLQi! zymZKrJCpl-q=9Zvghi#~YAfIYXmtHkldpVts$g2*daUr-xl%9PhOn4}vooBx z>sA*WndWYo;?1g_Qz?|5Q#tKlD@&m0iOKa%0)at}MK@K>9kr5nK3KR%deeuEts7sf z9Dg_AUd*L9mK#SdF{`(~aW#FXyi>J;`E;$gPED!!y#?=?Rxim}-+3Z4@##G+!MZhz z50xuMN%s8Om$^jdSm8%LMah3l>iHvAE_{D<+mdXX^!xL>&-kvnt+rg?s><9=mrW;J z&Qr=2>`l|(aq0Wtdz>+x-?%TZ)a{LWl(}xNs*L|lqZ_YV_D(#0Z&u%0rJSw3cc&kg zTTm!^QnsnpO-XUv+E03`riaII-*pXraqE>~$i|mBB|)aSMoyPc3anhatYF66U$rZK z@Pj%~f{}?Yf+zRPUCBB*p(;Xgvemp~mc!G9W=>u>PmIY$U~=F*naQ;RqLUx26kvti zt^R+WC=uynoD+HdCGWoQ!JlHzW4QPvi zy~J8z4dn~9WW=t+?#W_cFh)`QKm$p!HY@l>rpW?}M47_1;Syepv}BO) z$+1T4#Ch@z3~DGQ#h6Y$uviIrMFm75 z_%L*!57z*(4vNChmOzE>vXH}}85rgOPp3!q)hcU-$qx2Xliyn_gY1-rpH~bFEJqZh zgzZ5py}_#B$KL`~*`cTsa%7ln@8|(`KjI`-1_pf;RUXchA1oD}+`rUR8gbAhx`j5A z?=OvI1)s+^*>RaD(_NscOXVhOdMbiVM;w*|Je&{3bX^~yLfOd=mdVS&4_g5`R2N0j zt5C2L43-axH1|&#=Wr3=B#r3YSm5zuZm+d94eoZBHsE zKUgk1*`f-PT@V9^3=9e=25qVaDwLVLbA`MNVnm36K^{dBLpRu2{@vi5DT5dWK~EIW&pHfkaU4roNf6g>=uCr>T__Rcg`=}3c15@4P_ a%EQ2*fnt2> /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. diff --git a/src/main/java/build/buf/protovalidate/AnyEvaluator.java b/src/main/java/build/buf/protovalidate/AnyEvaluator.java new file mode 100644 index 00000000..f26057e1 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/AnyEvaluator.java @@ -0,0 +1,129 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.ExecutionException; +import build.buf.validate.AnyRules; +import build.buf.validate.FieldPath; +import build.buf.validate.FieldRules; +import com.google.protobuf.Descriptors; +import com.google.protobuf.Message; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * A specialized evaluator for applying {@link build.buf.validate.AnyRules} to an {@link + * com.google.protobuf.Any} message. This is handled outside CEL which attempts to hydrate {@link + * com.google.protobuf.Any}'s within an expression, breaking evaluation if the type is unknown at + * runtime. + */ +final class AnyEvaluator implements Evaluator { + private final RuleViolationHelper helper; + private final Descriptors.FieldDescriptor typeURLDescriptor; + private final Set in; + private final List inValue; + private final Set notIn; + private final List notInValue; + + private static final Descriptors.FieldDescriptor ANY_DESCRIPTOR = + FieldRules.getDescriptor().findFieldByNumber(FieldRules.ANY_FIELD_NUMBER); + + private static final Descriptors.FieldDescriptor IN_DESCRIPTOR = + AnyRules.getDescriptor().findFieldByNumber(AnyRules.IN_FIELD_NUMBER); + + private static final Descriptors.FieldDescriptor NOT_IN_DESCRIPTOR = + AnyRules.getDescriptor().findFieldByNumber(AnyRules.NOT_IN_FIELD_NUMBER); + + private static final FieldPath IN_RULE_PATH = + FieldPath.newBuilder() + .addElements(FieldPathUtils.fieldPathElement(ANY_DESCRIPTOR)) + .addElements(FieldPathUtils.fieldPathElement(IN_DESCRIPTOR)) + .build(); + + private static final FieldPath NOT_IN_RULE_PATH = + FieldPath.newBuilder() + .addElements(FieldPathUtils.fieldPathElement(ANY_DESCRIPTOR)) + .addElements(FieldPathUtils.fieldPathElement(NOT_IN_DESCRIPTOR)) + .build(); + + /** Constructs a new evaluator for {@link build.buf.validate.AnyRules} messages. */ + AnyEvaluator( + ValueEvaluator valueEvaluator, + Descriptors.FieldDescriptor typeURLDescriptor, + List in, + List notIn) { + this.helper = new RuleViolationHelper(valueEvaluator); + this.typeURLDescriptor = typeURLDescriptor; + this.in = stringsToSet(in); + this.inValue = in; + this.notIn = stringsToSet(notIn); + this.notInValue = notIn; + } + + @Override + public List evaluate(Value val, boolean failFast) + throws ExecutionException { + MessageReflector anyValue = val.messageValue(); + if (anyValue == null) { + return RuleViolation.NO_VIOLATIONS; + } + List violationList = new ArrayList<>(); + String typeURL = anyValue.getField(typeURLDescriptor).jvmValue(String.class); + if (!in.isEmpty() && !in.contains(typeURL)) { + RuleViolation.Builder violation = + RuleViolation.newBuilder() + .addAllRulePathElements(helper.getRulePrefixElements()) + .addAllRulePathElements(IN_RULE_PATH.getElementsList()) + .addFirstFieldPathElement(helper.getFieldPathElement()) + .setRuleId("any.in") + .setMessage("type URL must be in the allow list") + .setFieldValue(new RuleViolation.FieldValue(val)) + .setRuleValue(new RuleViolation.FieldValue(this.inValue, IN_DESCRIPTOR)); + violationList.add(violation); + if (failFast) { + return violationList; + } + } + if (!notIn.isEmpty() && notIn.contains(typeURL)) { + RuleViolation.Builder violation = + RuleViolation.newBuilder() + .addAllRulePathElements(helper.getRulePrefixElements()) + .addAllRulePathElements(NOT_IN_RULE_PATH.getElementsList()) + .addFirstFieldPathElement(helper.getFieldPathElement()) + .setRuleId("any.not_in") + .setMessage("type URL must not be in the block list") + .setFieldValue(new RuleViolation.FieldValue(val)) + .setRuleValue(new RuleViolation.FieldValue(this.notInValue, NOT_IN_DESCRIPTOR)); + violationList.add(violation); + } + return violationList; + } + + @Override + public boolean tautology() { + return in.isEmpty() && notIn.isEmpty(); + } + + /** stringsToMap converts a string list to a set for fast lookup. */ + private static Set stringsToSet(List strings) { + if (strings.isEmpty()) { + return Collections.emptySet(); + } + return new HashSet<>(strings); + } +} diff --git a/src/main/java/build/buf/protovalidate/AstExpression.java b/src/main/java/build/buf/protovalidate/AstExpression.java new file mode 100644 index 00000000..845c3e7f --- /dev/null +++ b/src/main/java/build/buf/protovalidate/AstExpression.java @@ -0,0 +1,70 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.CompilationException; +import dev.cel.common.CelAbstractSyntaxTree; +import dev.cel.common.CelValidationException; +import dev.cel.common.CelValidationResult; +import dev.cel.common.types.CelKind; +import dev.cel.compiler.CelCompiler; + +/** {@link AstExpression} is a compiled CEL {@link CelAbstractSyntaxTree}. */ +final class AstExpression { + /** The compiled CEL AST. */ + final CelAbstractSyntaxTree ast; + + /** Contains the original expression from the proto file. */ + final Expression source; + + /** Constructs a new {@link AstExpression}. */ + private AstExpression(CelAbstractSyntaxTree ast, Expression source) { + this.ast = ast; + this.source = source; + } + + /** + * Compiles the given expression to a {@link AstExpression}. + * + * @param cel The CEL compiler. + * @param expr The expression to compile. + * @return The compiled {@link AstExpression}. + * @throws CompilationException if the expression compilation fails. + */ + static AstExpression newAstExpression(CelCompiler cel, Expression expr) + throws CompilationException { + CelValidationResult compileResult = cel.compile(expr.expression); + if (!compileResult.getAllIssues().isEmpty()) { + throw new CompilationException( + "Failed to compile expression " + expr.id + ":\n" + compileResult.getIssueString()); + } + CelAbstractSyntaxTree ast; + try { + ast = compileResult.getAst(); + } catch (CelValidationException e) { + // This will not happen as we checked for issues, and it only throws when + // it has at least one issue of error severity. + throw new CompilationException( + "Failed to compile expression " + expr.id + ":\n" + compileResult.getIssueString()); + } + CelKind outKind = ast.getResultType().kind(); + if (outKind != CelKind.BOOL && outKind != CelKind.STRING) { + throw new CompilationException( + String.format( + "Expression outputs, wanted either bool or string: %s %s", expr.id, outKind)); + } + return new AstExpression(ast, expr); + } +} diff --git a/src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java b/src/main/java/build/buf/protovalidate/CelPrograms.java similarity index 58% rename from src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java rename to src/main/java/build/buf/protovalidate/CelPrograms.java index d423cfb1..f4c14136 100644 --- a/src/main/java/build/buf/protovalidate/internal/expression/CelPrograms.java +++ b/src/main/java/build/buf/protovalidate/CelPrograms.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -package build.buf.protovalidate.internal.expression; +package build.buf.protovalidate; -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.protovalidate.internal.evaluator.Evaluator; -import build.buf.validate.Violation; +import dev.cel.runtime.CelVariableResolver; import java.util.ArrayList; import java.util.List; +import org.jspecify.annotations.Nullable; /** Evaluator that executes a {@link CompiledProgram}. */ -public class CelPrograms implements Evaluator { +final class CelPrograms implements Evaluator { + private final RuleViolationHelper helper; + /** A list of {@link CompiledProgram} that will be executed against the input message. */ private final List programs; @@ -32,7 +32,8 @@ public class CelPrograms implements Evaluator { * * @param compiledPrograms The programs to execute. */ - public CelPrograms(List compiledPrograms) { + CelPrograms(@Nullable ValueEvaluator valueEvaluator, List compiledPrograms) { + this.helper = new RuleViolationHelper(valueEvaluator); this.programs = compiledPrograms; } @@ -42,18 +43,20 @@ public boolean tautology() { } @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Variable activation = Variable.newThisVariable(val.celValue()); - List violationList = new ArrayList<>(); + public List evaluate(Value val, boolean failFast) + throws ExecutionException { + CelVariableResolver bindings = Variable.newThisVariable(val.celValue()); + List violations = new ArrayList<>(); for (CompiledProgram program : programs) { - Violation violation = program.eval(activation); + RuleViolation.Builder violation = program.eval(val, bindings); if (violation != null) { - violationList.add(violation); + violations.add(violation); if (failFast) { break; } } } - return new ValidationResult(violationList); + return FieldPathUtils.updatePaths( + violations, helper.getFieldPathElement(), helper.getRulePrefixElements()); } } diff --git a/src/main/java/build/buf/protovalidate/CompiledProgram.java b/src/main/java/build/buf/protovalidate/CompiledProgram.java new file mode 100644 index 00000000..8f39e82d --- /dev/null +++ b/src/main/java/build/buf/protovalidate/CompiledProgram.java @@ -0,0 +1,121 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.ExecutionException; +import build.buf.validate.FieldPath; +import dev.cel.runtime.CelEvaluationException; +import dev.cel.runtime.CelRuntime.Program; +import dev.cel.runtime.CelVariableResolver; +import org.jspecify.annotations.Nullable; + +/** + * {@link CompiledProgram} is a parsed and type-checked {@link Program} along with the source {@link + * Expression}. + */ +final class CompiledProgram { + /** A compiled CEL program that can be evaluated against a set of variable bindings. */ + private final Program program; + + /** The original expression that was compiled into the program from the proto file. */ + private final Expression source; + + /** The field path from FieldRules to the rule value. */ + @Nullable private final FieldPath rulePath; + + /** The rule value. */ + @Nullable private final Value ruleValue; + + /** + * Global variables to pass to the evaluation step. Program/CelRuntime doesn't have a concept of + * global variables. + */ + @Nullable private final CelVariableResolver globals; + + /** + * Constructs a new {@link CompiledProgram}. + * + * @param program The compiled CEL program. + * @param source The original expression that was compiled into the program. + * @param rulePath The field path from the FieldRules to the rule value. + * @param ruleValue The rule value. + */ + CompiledProgram( + Program program, + Expression source, + @Nullable FieldPath rulePath, + @Nullable Value ruleValue, + @Nullable CelVariableResolver globals) { + this.program = program; + this.source = source; + this.rulePath = rulePath; + this.ruleValue = ruleValue; + this.globals = globals; + } + + /** + * Evaluate the compiled program with a given set of {@link Variable} variables. + * + * @param variables Variables used for the evaluation. + * @param fieldValue Field value to return in violations. + * @return The {@link build.buf.validate.Violation} from the evaluation, or null if there are no + * violations. + * @throws ExecutionException If the evaluation of the CEL program fails with an error. + */ + RuleViolation.@Nullable Builder eval(Value fieldValue, CelVariableResolver variables) + throws ExecutionException { + Object value; + try { + if (this.globals != null) { + variables = CelVariableResolver.hierarchicalVariableResolver(variables, this.globals); + } + value = program.eval(variables); + } catch (CelEvaluationException e) { + throw new ExecutionException(String.format("error evaluating %s: %s", source.id, e)); + } + if (value instanceof String) { + if ("".equals(value)) { + return null; + } + RuleViolation.Builder builder = + RuleViolation.newBuilder().setRuleId(this.source.id).setMessage(value.toString()); + if (fieldValue.fieldDescriptor() != null) { + builder.setFieldValue(new RuleViolation.FieldValue(fieldValue)); + } + if (rulePath != null) { + builder.addAllRulePathElements(rulePath.getElementsList()); + } + if (ruleValue != null && ruleValue.fieldDescriptor() != null) { + builder.setRuleValue(new RuleViolation.FieldValue(ruleValue)); + } + return builder; + } else if (value instanceof Boolean) { + if (Boolean.TRUE.equals(value)) { + return null; + } + RuleViolation.Builder builder = + RuleViolation.newBuilder().setRuleId(this.source.id).setMessage(this.source.message); + if (rulePath != null) { + builder.addAllRulePathElements(rulePath.getElementsList()); + } + if (ruleValue != null && ruleValue.fieldDescriptor() != null) { + builder.setRuleValue(new RuleViolation.FieldValue(ruleValue)); + } + return builder; + } else { + throw new ExecutionException(String.format("resolved to an unexpected type %s", value)); + } + } +} diff --git a/src/main/java/build/buf/protovalidate/Config.java b/src/main/java/build/buf/protovalidate/Config.java index 559b5b80..289bc717 100644 --- a/src/main/java/build/buf/protovalidate/Config.java +++ b/src/main/java/build/buf/protovalidate/Config.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,19 +24,16 @@ public final class Config { ExtensionRegistry.getEmptyRegistry(); private final boolean failFast; - private final boolean disableLazy; private final TypeRegistry typeRegistry; private final ExtensionRegistry extensionRegistry; private final boolean allowUnknownFields; private Config( boolean failFast, - boolean disableLazy, TypeRegistry typeRegistry, ExtensionRegistry extensionRegistry, boolean allowUnknownFields) { this.failFast = failFast; - this.disableLazy = disableLazy; this.typeRegistry = typeRegistry; this.extensionRegistry = extensionRegistry; this.allowUnknownFields = allowUnknownFields; @@ -60,15 +57,6 @@ public boolean isFailFast() { return failFast; } - /** - * Checks if the configuration for disabling lazy evaluation is enabled. - * - * @return if disabling lazy evaluation is enabled - */ - public boolean isDisableLazy() { - return disableLazy; - } - /** * Gets the type registry used for reparsing protobuf messages. * @@ -88,9 +76,9 @@ public ExtensionRegistry getExtensionRegistry() { } /** - * Checks if the configuration for allowing unknown constraint fields is enabled. + * Checks if the configuration for allowing unknown rule fields is enabled. * - * @return if allowing unknown constraint fields is enabled + * @return if allowing unknown rule fields is enabled */ public boolean isAllowingUnknownFields() { return allowUnknownFields; @@ -99,7 +87,6 @@ public boolean isAllowingUnknownFields() { /** Builder for configuration. Provides a forward compatible API for users. */ public static final class Builder { private boolean failFast; - private boolean disableLazy; private TypeRegistry typeRegistry = DEFAULT_TYPE_REGISTRY; private ExtensionRegistry extensionRegistry = DEFAULT_EXTENSION_REGISTRY; private boolean allowUnknownFields; @@ -117,23 +104,12 @@ public Builder setFailFast(boolean failFast) { return this; } - /** - * Set the configuration for disabling lazy evaluation. - * - * @param disableLazy the boolean for enabling - * @return this builder - */ - public Builder setDisableLazy(boolean disableLazy) { - this.disableLazy = disableLazy; - return this; - } - /** * Set the type registry for reparsing protobuf messages. This option should be set alongside * setExtensionRegistry to allow dynamic resolution of predefined rule extensions. It should be * set to a TypeRegistry with all the message types from your file descriptor set registered. By - * default, if any unknown field constraints are found, compilation of the constraints will - * fail; use setAllowUnknownFields to control this behavior. + * default, if any unknown field rules are found, compilation of the rules will fail; use + * setAllowUnknownFields to control this behavior. * *

Note that the message types for any extensions in setExtensionRegistry must be present in * the typeRegistry, and have an exactly-equal Descriptor. If the type registry is not set, the @@ -154,8 +130,8 @@ public Builder setTypeRegistry(TypeRegistry typeRegistry) { * Set the extension registry for resolving unknown extensions. This option should be set * alongside setTypeRegistry to allow dynamic resolution of predefined rule extensions. It * should be set to an ExtensionRegistry with all the extension types from your file descriptor - * set registered. By default, if any unknown field constraints are found, compilation of the - * constraints will fail; use setAllowUnknownFields to control this behavior. + * set registered. By default, if any unknown field rules are found, compilation of the rules + * will fail; use setAllowUnknownFields to control this behavior. * * @param extensionRegistry the extension registry to use * @return this builder @@ -166,13 +142,12 @@ public Builder setExtensionRegistry(ExtensionRegistry extensionRegistry) { } /** - * Set whether unknown constraint fields are allowed. If this setting is set to true, unknown - * standard predefined field constraints and predefined field constraint extensions will be - * ignored. This setting defaults to false, which will result in a CompilationException being - * thrown whenever an unknown field constraint is encountered. Setting this to true will cause - * some field constraints to be ignored; if the descriptor is dynamic, you can instead use - * setExtensionRegistry to provide dynamic type information that protovalidate can use to - * resolve the unknown fields. + * Set whether unknown rule fields are allowed. If this setting is set to true, unknown standard + * predefined field rules and predefined field rule extensions will be ignored. This setting + * defaults to false, which will result in a CompilationException being thrown whenever an + * unknown field rule is encountered. Setting this to true will cause some field rules to be + * ignored; if the descriptor is dynamic, you can instead use setExtensionRegistry to provide + * dynamic type information that protovalidate can use to resolve the unknown fields. * * @param allowUnknownFields setting to apply * @return this builder @@ -188,7 +163,7 @@ public Builder setAllowUnknownFields(boolean allowUnknownFields) { * @return the configuration. */ public Config build() { - return new Config(failFast, disableLazy, typeRegistry, extensionRegistry, allowUnknownFields); + return new Config(failFast, typeRegistry, extensionRegistry, allowUnknownFields); } } } diff --git a/src/main/java/build/buf/protovalidate/CustomDeclarations.java b/src/main/java/build/buf/protovalidate/CustomDeclarations.java new file mode 100644 index 00000000..0de52970 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/CustomDeclarations.java @@ -0,0 +1,190 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static dev.cel.common.CelFunctionDecl.newFunctionDeclaration; +import static dev.cel.common.CelOverloadDecl.newGlobalOverload; +import static dev.cel.common.CelOverloadDecl.newMemberOverload; + +import dev.cel.common.CelFunctionDecl; +import dev.cel.common.CelOverloadDecl; +import dev.cel.common.types.CelType; +import dev.cel.common.types.ListType; +import dev.cel.common.types.SimpleType; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Locale; + +/** Defines custom declaration functions. */ +final class CustomDeclarations { + + /** + * Create the custom function declaration list. + * + * @return the list of function declarations. + */ + static List create() { + List decls = new ArrayList<>(); + + // Add 'getField' function declaration + decls.add( + newFunctionDeclaration( + "getField", + newGlobalOverload( + "get_field_any_string", + SimpleType.DYN, + Arrays.asList(SimpleType.ANY, SimpleType.STRING)))); + // Add 'isIp' function declaration + decls.add( + newFunctionDeclaration( + "isIp", + newMemberOverload( + "is_ip", SimpleType.BOOL, Arrays.asList(SimpleType.STRING, SimpleType.INT)), + newMemberOverload( + "is_ip_unary", SimpleType.BOOL, Collections.singletonList(SimpleType.STRING)))); + + // Add 'isIpPrefix' function declaration + decls.add( + newFunctionDeclaration( + "isIpPrefix", + newMemberOverload( + "is_ip_prefix_int_bool", + SimpleType.BOOL, + Arrays.asList(SimpleType.STRING, SimpleType.INT, SimpleType.BOOL)), + newMemberOverload( + "is_ip_prefix_int", + SimpleType.BOOL, + Arrays.asList(SimpleType.STRING, SimpleType.INT)), + newMemberOverload( + "is_ip_prefix_bool", + SimpleType.BOOL, + Arrays.asList(SimpleType.STRING, SimpleType.BOOL)), + newMemberOverload( + "is_ip_prefix", SimpleType.BOOL, Collections.singletonList(SimpleType.STRING)))); + + // Add 'isUriRef' function declaration + decls.add( + newFunctionDeclaration( + "isUriRef", + newMemberOverload( + "is_uri_ref", SimpleType.BOOL, Collections.singletonList(SimpleType.STRING)))); + + // Add 'isUri' function declaration + decls.add( + newFunctionDeclaration( + "isUri", + newMemberOverload( + "is_uri", SimpleType.BOOL, Collections.singletonList(SimpleType.STRING)))); + + // Add 'isEmail' function declaration + decls.add( + newFunctionDeclaration( + "isEmail", + newMemberOverload( + "is_email", SimpleType.BOOL, Collections.singletonList(SimpleType.STRING)))); + + // Add 'isHostname' function declaration + decls.add( + newFunctionDeclaration( + "isHostname", + newMemberOverload( + "is_hostname", SimpleType.BOOL, Collections.singletonList(SimpleType.STRING)))); + + decls.add( + newFunctionDeclaration( + "isHostAndPort", + newMemberOverload( + "string_bool_is_host_and_port_bool", + SimpleType.BOOL, + Arrays.asList(SimpleType.STRING, SimpleType.BOOL)))); + + // Add 'startsWith' function declaration + decls.add( + newFunctionDeclaration( + "startsWith", + newMemberOverload( + "starts_with_bytes", + SimpleType.BOOL, + Arrays.asList(SimpleType.BYTES, SimpleType.BYTES)))); + + // Add 'endsWith' function declaration + decls.add( + newFunctionDeclaration( + "endsWith", + newMemberOverload( + "ends_with_bytes", + SimpleType.BOOL, + Arrays.asList(SimpleType.BYTES, SimpleType.BYTES)))); + + // Add 'contains' function declaration + decls.add( + newFunctionDeclaration( + "contains", + newMemberOverload( + "contains_bytes", + SimpleType.BOOL, + Arrays.asList(SimpleType.BYTES, SimpleType.BYTES)))); + + // Add 'isNan' function declaration + decls.add( + newFunctionDeclaration( + "isNan", + newMemberOverload( + "is_nan", SimpleType.BOOL, Collections.singletonList(SimpleType.DOUBLE)))); + + // Add 'isInf' function declaration + decls.add( + newFunctionDeclaration( + "isInf", + newMemberOverload( + "is_inf_unary", SimpleType.BOOL, Collections.singletonList(SimpleType.DOUBLE)), + newMemberOverload( + "is_inf_binary", + SimpleType.BOOL, + Arrays.asList(SimpleType.DOUBLE, SimpleType.INT)))); + + // Add 'unique' function declaration + List uniqueOverloads = new ArrayList<>(); + for (CelType type : + Arrays.asList( + SimpleType.STRING, + SimpleType.INT, + SimpleType.UINT, + SimpleType.DOUBLE, + SimpleType.BYTES, + SimpleType.BOOL)) { + uniqueOverloads.add( + newMemberOverload( + String.format("unique_list_%s", type.name().toLowerCase(Locale.US)), + SimpleType.BOOL, + Collections.singletonList(ListType.create(type)))); + } + decls.add(newFunctionDeclaration("unique", uniqueOverloads)); + + // Add 'format' function declaration + List formatOverloads = new ArrayList<>(); + formatOverloads.add( + newMemberOverload( + "format_list_dyn", + SimpleType.STRING, + Arrays.asList(SimpleType.STRING, ListType.create(SimpleType.DYN)))); + + decls.add(newFunctionDeclaration("format", formatOverloads)); + + return Collections.unmodifiableList(decls); + } +} diff --git a/src/main/java/build/buf/protovalidate/CustomOverload.java b/src/main/java/build/buf/protovalidate/CustomOverload.java new file mode 100644 index 00000000..bc377a52 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/CustomOverload.java @@ -0,0 +1,619 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import com.google.protobuf.ByteString; +import com.google.protobuf.Descriptors; +import com.google.protobuf.Message; +import dev.cel.common.CelErrorCode; +import dev.cel.common.CelRuntimeException; +import dev.cel.common.types.CelType; +import dev.cel.common.types.SimpleType; +import dev.cel.runtime.CelEvaluationException; +import dev.cel.runtime.CelRuntime.CelFunctionBinding; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Set; +import java.util.regex.Pattern; + +/** Defines custom function overloads (the implementation). */ +final class CustomOverload { + + // See https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address + private static final Pattern EMAIL_REGEX = + Pattern.compile( + "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"); + + /** + * Create custom function overload list. + * + * @return a list of overloaded functions. + */ + static List create() { + ArrayList bindings = new ArrayList<>(); + bindings.addAll( + Arrays.asList( + celBytesToString(), + celGetField(), + celFormat(), + celStartsWithBytes(), + celEndsWithBytes(), + celContainsBytes(), + celIsHostname(), + celIsEmail(), + celIsIpUnary(), + celIsIp(), + celIsIpPrefix(), + celIsIpPrefixInt(), + celIsIpPrefixBool(), + celIsIpPrefixIntBool(), + celIsUri(), + celIsUriRef(), + celIsNan(), + celIsInfUnary(), + celIsInfBinary(), + celIsHostAndPort())); + bindings.addAll(celUnique()); + return Collections.unmodifiableList(bindings); + } + + /** + * This implements that standard {@code bytes_to_string} function. We override it because the CEL + * library doesn't validate that the bytes are valid utf-8. + * + *

If the argument portRequired is true, the port is required. If the argument is false, the + * port is optional. + * + *

The host can be one of: + * + *

    + *
  • An IPv4 address in dotted decimal format, for example {@code 192.168.0.1}. + *
  • An IPv6 address enclosed in square brackets, for example {@code [::1]}. + *
  • A hostname, for example {@code example.com}. + *
+ * + *

The port is separated by a colon. It must be non-empty, with a decimal number in the range + * of 0-65535, inclusive. + */ + private static boolean isHostAndPort(String str, boolean portRequired) { + if (str.isEmpty()) { + return false; + } + + int splitIdx = str.lastIndexOf(':'); + + if (str.charAt(0) == '[') { + int end = str.lastIndexOf(']'); + + int endPlus = end + 1; + if (endPlus == str.length()) { // no port + return !portRequired && isIp(str.substring(1, end), 6); + } else if (endPlus == splitIdx) { // port + return isIp(str.substring(1, end), 6) && isPort(str.substring(splitIdx + 1)); + } + return false; // malformed + } + + if (splitIdx < 0) { + return !portRequired && (isHostname(str) || isIp(str, 4)); + } + + String host = str.substring(0, splitIdx); + String port = str.substring(splitIdx + 1); + + return ((isHostname(host) || isIp(host, 4)) && isPort(port)); + } + + // Returns true if the string is a valid port for isHostAndPort. + private static boolean isPort(String str) { + if (str.isEmpty()) { + return false; + } + + if (str.length() > 1 && str.charAt(0) == '0') { + return false; + } + + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + if ('0' <= c && c <= '9') { + continue; + } + return false; + } + + try { + int val = Integer.parseInt(str); + return val <= 65535; + } catch (NumberFormatException nfe) { + return false; + } + } + + /** + * Determines if the input list contains unique values. If the list contains duplicate values, it + * returns {@code false}. If the list contains unique values, it returns {@code true}. + * + * @param list The input list to check for uniqueness. + * @return {@code true} if the list contains unique scalar values, {@code false} otherwise. + */ + private static boolean uniqueList(List list) throws CelEvaluationException { + long size = list.size(); + if (size == 0) { + return true; + } + Set exist = new HashSet<>((int) size); + for (Object val : list) { + if (!exist.add(val)) { + return false; + } + } + return true; + } + + /** + * isEmail returns true if addr is a valid email address. + * + *

This regex conforms to the definition for a valid email address from the HTML standard. Note + * that this standard willfully deviates from RFC 5322, which allows many unexpected forms of + * email addresses and will easily match a typographical error. + * + * @param addr The input string to validate as an email address. + * @return {@code true} if the input string is a valid email address, {@code false} otherwise. + */ + private static boolean isEmail(String addr) { + return EMAIL_REGEX.matcher(addr).matches(); + } + + /** + * Returns true if the string is a valid hostname, for example "foo.example.com". + * + *

A valid hostname follows the rules below: + * + *

    + *
  • The name consists of one or more labels, separated by a dot ("."). + *
  • Each label can be 1 to 63 alphanumeric characters. + *
  • A label can contain hyphens ("-"), but must not start or end with a hyphen. + *
  • The right-most label must not be digits only. + *
  • The name can have a trailing dot, for example "foo.example.com.". + *
  • The name can be 253 characters at most, excluding the optional trailing dot. + *
+ */ + private static boolean isHostname(String val) { + if (val.length() > 253) { + return false; + } + + String str; + if (val.endsWith(".")) { + str = val.substring(0, val.length() - 1); + } else { + str = val; + } + + boolean allDigits = false; + + String[] parts = str.split("\\.", -1); + + // split hostname on '.' and validate each part + for (String part : parts) { + allDigits = true; + + // if part is empty, longer than 63 chars, or starts/ends with '-', it is + // invalid + int len = part.length(); + if (len == 0 || len > 63 || part.startsWith("-") || part.endsWith("-")) { + return false; + } + + // for each character in part + for (int i = 0; i < part.length(); i++) { + char c = part.charAt(i); + // if the character is not a-z, A-Z, 0-9, or '-', it is invalid + if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c < '0' || c > '9') && c != '-') { + return false; + } + + allDigits = allDigits && c >= '0' && c <= '9'; + } + } + + // the last part cannot be all numbers + return !allDigits; + } + + /** + * Returns true if the string is an IPv4 or IPv6 address, optionally limited to a specific + * version. + * + *

Version 0 means either 4 or 6. Passing a version other than 0, 4, or 6 always returns false. + * + *

IPv4 addresses are expected in the dotted decimal format, for example "192.168.5.21". IPv6 + * addresses are expected in their text representation, for example "::1", or + * "2001:0DB8:ABCD:0012::0". + * + *

Both formats are well-defined in the internet standard RFC 3986. Zone identifiers for IPv6 + * addresses (for example "fe80::a%en1") are supported. + */ + static boolean isIp(String addr, long ver) { + if (ver == 6L) { + return new Ipv6(addr).address(); + } else if (ver == 4L) { + return new Ipv4(addr).address(); + } else if (ver == 0L) { + return new Ipv4(addr).address() || new Ipv6(addr).address(); + } + return false; + } + + /** + * Returns true if the string is a URI, for example {@code + * https://example.com/foo/bar?baz=quux#frag}. + * + *

URI is defined in the internet standard RFC 3986. Zone Identifiers in IPv6 address literals + * are supported (RFC 6874). + */ + private static boolean isUri(String str) { + return new Uri(str).uri(); + } + + /** + * Returns true if the string is a URI Reference - a URI such as {@code + * https://example.com/foo/bar?baz=quux#frag}, or a Relative Reference such as {@code + * ./foo/bar?query}. + * + *

URI, URI Reference, and Relative Reference are defined in the internet standard RFC 3986. + * Zone Identifiers in IPv6 address literals are supported (RFC 6874). + */ + private static boolean isUriRef(String str) { + return new Uri(str).uriReference(); + } + + /** + * Returns true if the string is a valid IP with prefix length, optionally limited to a specific + * version (v4 or v6), and optionally requiring the host portion to be all zeros. + * + *

An address prefix divides an IP address into a network portion, and a host portion. The + * prefix length specifies how many bits the network portion has. For example, the IPv6 prefix + * "2001:db8:abcd:0012::0/64" designates the left-most 64 bits as the network prefix. The range of + * the network is 2**64 addresses, from 2001:db8:abcd:0012::0 to + * 2001:db8:abcd:0012:ffff:ffff:ffff:ffff. + * + *

An address prefix may include a specific host address, for example + * "2001:db8:abcd:0012::1f/64". With strict = true, this is not permitted. The host portion must + * be all zeros, as in "2001:db8:abcd:0012::0/64". + * + *

The same principle applies to IPv4 addresses. "192.168.1.0/24" designates the first 24 bits + * of the 32-bit IPv4 as the network prefix. + */ + private static boolean isIpPrefix(String str, long version, boolean strict) { + if (version == 6L) { + Ipv6 ip = new Ipv6(str); + return ip.addressPrefix() && (!strict || ip.isPrefixOnly()); + } else if (version == 4L) { + Ipv4 ip = new Ipv4(str); + return ip.addressPrefix() && (!strict || ip.isPrefixOnly()); + } else if (version == 0L) { + return isIpPrefix(str, 6, strict) || isIpPrefix(str, 4, strict); + } + return false; + } +} diff --git a/src/main/java/build/buf/protovalidate/DescriptorMappings.java b/src/main/java/build/buf/protovalidate/DescriptorMappings.java new file mode 100644 index 00000000..a5906d39 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/DescriptorMappings.java @@ -0,0 +1,212 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.validate.FieldRules; +import com.google.protobuf.Descriptors.Descriptor; +import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.Descriptors.OneofDescriptor; +import dev.cel.common.types.CelType; +import dev.cel.common.types.CelTypes; +import dev.cel.common.types.ListType; +import dev.cel.common.types.MapType; +import dev.cel.common.types.SimpleType; +import dev.cel.common.types.StructTypeReference; +import dev.cel.common.types.UnspecifiedType; +import java.util.HashMap; +import java.util.Map; +import org.jspecify.annotations.Nullable; + +/** + * DescriptorMappings provides mappings between protocol buffer descriptors and CEL declarations. + */ +final class DescriptorMappings { + /** Provides a {@link Descriptor} for {@link FieldRules}. */ + static final Descriptor FIELD_RULES_DESC = FieldRules.getDescriptor(); + + /** Provides the {@link OneofDescriptor} for the type union in {@link FieldRules}. */ + static final OneofDescriptor FIELD_RULES_ONEOF_DESC = FIELD_RULES_DESC.getOneofs().get(0); + + /** Provides the {@link FieldDescriptor} for the map standard rules. */ + static final FieldDescriptor MAP_FIELD_RULES_DESC = FIELD_RULES_DESC.findFieldByName("map"); + + /** Provides the {@link FieldDescriptor} for the repeated standard rules. */ + static final FieldDescriptor REPEATED_FIELD_RULES_DESC = + FIELD_RULES_DESC.findFieldByName("repeated"); + + /** Maps protocol buffer field kinds to their expected field rules. */ + static final Map EXPECTED_STANDARD_RULES = new HashMap<>(); + + /** + * Returns the {@link build.buf.validate.FieldRules} field that is expected for the given wrapper + * well-known type's full name. If ok is false, no standard rules exist for that type. + */ + static final Map EXPECTED_WKT_RULES = new HashMap<>(); + + static { + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.FLOAT, FIELD_RULES_DESC.findFieldByName("float")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.DOUBLE, FIELD_RULES_DESC.findFieldByName("double")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.INT32, FIELD_RULES_DESC.findFieldByName("int32")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.INT64, FIELD_RULES_DESC.findFieldByName("int64")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.UINT32, FIELD_RULES_DESC.findFieldByName("uint32")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.UINT64, FIELD_RULES_DESC.findFieldByName("uint64")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.SINT32, FIELD_RULES_DESC.findFieldByName("sint32")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.SINT64, FIELD_RULES_DESC.findFieldByName("sint64")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.FIXED32, FIELD_RULES_DESC.findFieldByName("fixed32")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.FIXED64, FIELD_RULES_DESC.findFieldByName("fixed64")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.SFIXED32, FIELD_RULES_DESC.findFieldByName("sfixed32")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.SFIXED64, FIELD_RULES_DESC.findFieldByName("sfixed64")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.BOOL, FIELD_RULES_DESC.findFieldByName("bool")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.STRING, FIELD_RULES_DESC.findFieldByName("string")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.BYTES, FIELD_RULES_DESC.findFieldByName("bytes")); + EXPECTED_STANDARD_RULES.put( + FieldDescriptor.Type.ENUM, FIELD_RULES_DESC.findFieldByName("enum")); + + EXPECTED_WKT_RULES.put("google.protobuf.Any", FIELD_RULES_DESC.findFieldByName("any")); + EXPECTED_WKT_RULES.put( + "google.protobuf.Duration", FIELD_RULES_DESC.findFieldByName("duration")); + EXPECTED_WKT_RULES.put( + "google.protobuf.Timestamp", FIELD_RULES_DESC.findFieldByName("timestamp")); + } + + private DescriptorMappings() {} + + /** + * Returns the {@link FieldRules} field that is expected for the given protocol buffer field kind. + * + * @param fqn Fully qualified name of protobuf value wrapper. + * @return The rules field descriptor for the specified wrapper fully qualified name. + */ + @Nullable + static FieldDescriptor expectedWrapperRules(String fqn) { + switch (fqn) { + case "google.protobuf.BoolValue": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.BOOL); + case "google.protobuf.BytesValue": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.BYTES); + case "google.protobuf.DoubleValue": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.DOUBLE); + case "google.protobuf.FloatValue": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.FLOAT); + case "google.protobuf.Int32Value": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.INT32); + case "google.protobuf.Int64Value": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.INT64); + case "google.protobuf.StringValue": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.STRING); + case "google.protobuf.UInt32Value": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.UINT32); + case "google.protobuf.UInt64Value": + return EXPECTED_STANDARD_RULES.get(FieldDescriptor.Type.UINT64); + default: + return null; + } + } + + /** + * Maps a {@link FieldDescriptor.Type} to a compatible {@link com.google.api.expr.v1alpha1.Type}. + * + * @param kind The protobuf field type. + * @return The corresponding CEL type for the protobuf field. + */ + static CelType protoKindToCELType(FieldDescriptor.Type kind) { + switch (kind) { + case FLOAT: + case DOUBLE: + return SimpleType.DOUBLE; + case INT32: + case INT64: + case SINT32: + case SINT64: + case SFIXED32: + case SFIXED64: + case ENUM: + return SimpleType.INT; + case UINT32: + case UINT64: + case FIXED32: + case FIXED64: + return SimpleType.UINT; + case BOOL: + return SimpleType.BOOL; + case STRING: + return SimpleType.STRING; + case BYTES: + return SimpleType.BYTES; + case MESSAGE: + case GROUP: + return StructTypeReference.create(kind.getJavaType().name()); + default: + return UnspecifiedType.create(); + } + } + + /** + * Produces the field descriptor from the {@link FieldRules} 'type' oneof that matches the + * provided target field descriptor. If the returned value is null, the field does not expect any + * standard rules. + */ + @Nullable + static FieldDescriptor getExpectedRuleDescriptor( + FieldDescriptor fieldDescriptor, boolean forItems) { + if (fieldDescriptor.isMapField()) { + return DescriptorMappings.MAP_FIELD_RULES_DESC; + } else if (fieldDescriptor.isRepeated() && !forItems) { + return DescriptorMappings.REPEATED_FIELD_RULES_DESC; + } else if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + return DescriptorMappings.EXPECTED_WKT_RULES.get( + fieldDescriptor.getMessageType().getFullName()); + } else { + return DescriptorMappings.EXPECTED_STANDARD_RULES.get(fieldDescriptor.getType()); + } + } + + /** + * Resolves the CEL value type for the provided {@link FieldDescriptor}. If forItems is true, the + * type for the repeated list items is returned instead of the list type itself. + */ + static CelType getCELType(FieldDescriptor fieldDescriptor, boolean forItems) { + if (!forItems) { + if (fieldDescriptor.isMapField()) { + return MapType.create( + getCELType(fieldDescriptor.getMessageType().findFieldByNumber(1), true), + getCELType(fieldDescriptor.getMessageType().findFieldByNumber(2), true)); + } else if (fieldDescriptor.isRepeated()) { + return ListType.create(getCELType(fieldDescriptor, true)); + } + } + + if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + String fqn = fieldDescriptor.getMessageType().getFullName(); + return CelTypes.getWellKnownCelType(fqn).orElse(StructTypeReference.create(fqn)); + } + return DescriptorMappings.protoKindToCELType(fieldDescriptor.getType()); + } +} diff --git a/src/main/java/build/buf/protovalidate/EmbeddedMessageEvaluator.java b/src/main/java/build/buf/protovalidate/EmbeddedMessageEvaluator.java new file mode 100644 index 00000000..63af08dc --- /dev/null +++ b/src/main/java/build/buf/protovalidate/EmbeddedMessageEvaluator.java @@ -0,0 +1,43 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.ExecutionException; +import java.util.Collections; +import java.util.List; + +final class EmbeddedMessageEvaluator implements Evaluator { + private final RuleViolationHelper helper; + private final MessageEvaluator messageEvaluator; + + EmbeddedMessageEvaluator(ValueEvaluator valueEvaluator, MessageEvaluator messageEvaluator) { + this.helper = new RuleViolationHelper(valueEvaluator); + this.messageEvaluator = messageEvaluator; + } + + @Override + public boolean tautology() { + return messageEvaluator.tautology(); + } + + @Override + public List evaluate(Value val, boolean failFast) + throws ExecutionException { + return FieldPathUtils.updatePaths( + messageEvaluator.evaluate(val, failFast), + helper.getFieldPathElement(), + Collections.emptyList()); + } +} diff --git a/src/main/java/build/buf/protovalidate/EnumEvaluator.java b/src/main/java/build/buf/protovalidate/EnumEvaluator.java new file mode 100644 index 00000000..30f35da3 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/EnumEvaluator.java @@ -0,0 +1,97 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.ExecutionException; +import build.buf.validate.EnumRules; +import build.buf.validate.FieldPath; +import build.buf.validate.FieldRules; +import com.google.protobuf.Descriptors; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * {@link EnumEvaluator} checks an enum value being a member of the defined values exclusively. This + * check is handled outside CEL as enums are completely type erased to integers. + */ +final class EnumEvaluator implements Evaluator { + private final RuleViolationHelper helper; + + /** Captures all the defined values for this enum */ + private final Set values; + + private static final Descriptors.FieldDescriptor DEFINED_ONLY_DESCRIPTOR = + EnumRules.getDescriptor().findFieldByNumber(EnumRules.DEFINED_ONLY_FIELD_NUMBER); + + private static final FieldPath DEFINED_ONLY_RULE_PATH = + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor().findFieldByNumber(FieldRules.ENUM_FIELD_NUMBER))) + .addElements(FieldPathUtils.fieldPathElement(DEFINED_ONLY_DESCRIPTOR)) + .build(); + + /** + * Constructs a new evaluator for enum values. + * + * @param valueDescriptors the list of {@link Descriptors.EnumValueDescriptor} for the enum. + */ + EnumEvaluator( + ValueEvaluator valueEvaluator, List valueDescriptors) { + this.helper = new RuleViolationHelper(valueEvaluator); + if (valueDescriptors.isEmpty()) { + this.values = Collections.emptySet(); + } else { + this.values = + valueDescriptors.stream().map(it -> (long) it.getNumber()).collect(Collectors.toSet()); + } + } + + @Override + public boolean tautology() { + return false; + } + + /** + * Evaluates an enum value. + * + * @param val the value to evaluate. + * @param failFast indicates if the evaluation should stop on the first violation. + * @return the {@link ValidationResult} of the evaluation. + * @throws ExecutionException if an error occurs during the evaluation. + */ + @Override + public List evaluate(Value val, boolean failFast) + throws ExecutionException { + Integer enumValue = val.jvmValue(Integer.class); + if (enumValue == null) { + return RuleViolation.NO_VIOLATIONS; + } + if (!values.contains(enumValue.longValue())) { + return Collections.singletonList( + RuleViolation.newBuilder() + .addAllRulePathElements(helper.getRulePrefixElements()) + .addAllRulePathElements(DEFINED_ONLY_RULE_PATH.getElementsList()) + .addFirstFieldPathElement(helper.getFieldPathElement()) + .setRuleId("enum.defined_only") + .setMessage("value must be one of the defined enum values") + .setFieldValue(new RuleViolation.FieldValue(val)) + .setRuleValue(new RuleViolation.FieldValue(true, DEFINED_ONLY_DESCRIPTOR))); + } + return RuleViolation.NO_VIOLATIONS; + } +} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java b/src/main/java/build/buf/protovalidate/Evaluator.java similarity index 74% rename from src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java rename to src/main/java/build/buf/protovalidate/Evaluator.java index 59ef078d..e4e04de1 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/Evaluator.java +++ b/src/main/java/build/buf/protovalidate/Evaluator.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,17 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -package build.buf.protovalidate.internal.evaluator; +package build.buf.protovalidate; -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; +import java.util.List; /** * {@link Evaluator} defines a validation evaluator. evaluator implementations may elide type * checking of the passed in value, as the types have been guaranteed during the build phase. */ -public interface Evaluator { +interface Evaluator { /** * Tautology returns true if the evaluator always succeeds. * @@ -32,13 +31,12 @@ public interface Evaluator { /** * Checks that the provided val is valid. Unless failFast is true, evaluation attempts to find all - * {@link build.buf.validate.Violations} present in val instead of returning a {@link - * ValidationResult} on the first {@link build.buf.validate.Violation}. + * {@link RuleViolation} present in val instead of returning only the first {@link RuleViolation}. * * @param val The value to validate. * @param failFast If true, validation stops after the first failure. * @return The result of validation on the specified value. * @throws ExecutionException If evaluation fails to complete. */ - ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException; + List evaluate(Value val, boolean failFast) throws ExecutionException; } diff --git a/src/main/java/build/buf/protovalidate/EvaluatorBuilder.java b/src/main/java/build/buf/protovalidate/EvaluatorBuilder.java new file mode 100644 index 00000000..04f8e40a --- /dev/null +++ b/src/main/java/build/buf/protovalidate/EvaluatorBuilder.java @@ -0,0 +1,556 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.CompilationException; +import build.buf.validate.FieldPath; +import build.buf.validate.FieldPathElement; +import build.buf.validate.FieldRules; +import build.buf.validate.Ignore; +import build.buf.validate.MessageOneofRule; +import build.buf.validate.MessageRules; +import build.buf.validate.OneofRules; +import build.buf.validate.Rule; +import com.google.protobuf.ByteString; +import com.google.protobuf.Descriptors; +import com.google.protobuf.Descriptors.Descriptor; +import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.DynamicMessage; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.Message; +import dev.cel.bundle.Cel; +import dev.cel.bundle.CelBuilder; +import dev.cel.common.types.StructTypeReference; +import dev.cel.runtime.CelEvaluationException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.jspecify.annotations.Nullable; + +/** A build-through cache of message evaluators keyed off the provided descriptor. */ +final class EvaluatorBuilder { + private static final FieldPathElement CEL_FIELD_PATH_ELEMENT = + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor().findFieldByNumber(FieldRules.CEL_FIELD_NUMBER)); + + private volatile Map evaluatorCache = Collections.emptyMap(); + + private final Cel cel; + private final boolean disableLazy; + private final RuleCache rules; + + /** + * Constructs a new {@link EvaluatorBuilder}. + * + * @param cel The CEL environment for evaluation. + * @param config The configuration to use for the evaluation. + */ + EvaluatorBuilder(Cel cel, Config config) { + this.cel = cel; + this.disableLazy = false; + this.rules = new RuleCache(cel, config); + } + + /** + * Constructs a new {@link EvaluatorBuilder}. + * + * @param cel The CEL environment for evaluation. + * @param config The configuration to use for the evaluation. + */ + EvaluatorBuilder(Cel cel, Config config, List descriptors, boolean disableLazy) + throws CompilationException { + Objects.requireNonNull(descriptors, "descriptors must not be null"); + this.cel = cel; + this.disableLazy = disableLazy; + this.rules = new RuleCache(cel, config); + + for (Descriptor descriptor : descriptors) { + this.build(descriptor); + } + } + + /** + * Returns a pre-cached {@link Evaluator} for the given descriptor or, if the descriptor is + * unknown, returns an evaluator that always throws a {@link CompilationException}. + * + * @param desc Protobuf descriptor type. + * @return An evaluator for the descriptor type. + * @throws CompilationException If an evaluator can't be created for the specified descriptor. + */ + Evaluator load(Descriptor desc) throws CompilationException { + Evaluator evaluator = evaluatorCache.get(desc); + if (evaluator == null && disableLazy) { + return new UnknownDescriptorEvaluator(desc); + } + return build(desc); + } + + /** + * Either returns a memoized {@link Evaluator} for the given descriptor, or lazily constructs a + * new one. + */ + private Evaluator build(Descriptor desc) throws CompilationException { + Evaluator eval = evaluatorCache.get(desc); + if (eval != null) { + return eval; + } + synchronized (this) { + // Check again (we may have lost race with another thread which populated the map with this + // descriptor). + eval = evaluatorCache.get(desc); + if (eval != null) { + return eval; + } + // Rebuild cache with this descriptor (and any of its dependencies). + Map updatedCache = + new DescriptorCacheBuilder(cel, rules, evaluatorCache).build(desc); + evaluatorCache = updatedCache; + eval = updatedCache.get(desc); + if (eval == null) { + throw new IllegalStateException( + "updated cache missing evaluator for descriptor - should not happen"); + } + } + return eval; + } + + private static class DescriptorCacheBuilder { + private final RuleResolver resolver = new RuleResolver(); + private final Cel cel; + private final RuleCache ruleCache; + private final HashMap cache; + + private DescriptorCacheBuilder( + Cel cel, RuleCache ruleCache, Map previousCache) { + this.cel = Objects.requireNonNull(cel, "cel"); + this.ruleCache = Objects.requireNonNull(ruleCache, "ruleCache"); + this.cache = new HashMap<>(previousCache); + } + + /** + * Creates an immutable cache containing the descriptor (and any other descriptors it + * references). + * + * @param descriptor Descriptor used to build the cache. + * @return Unmodifiable map of descriptors to evaluators. + * @throws CompilationException If an error occurs compiling a rule on the cache. + */ + Map build(Descriptor descriptor) throws CompilationException { + createMessageEvaluator(descriptor); + return Collections.unmodifiableMap(cache); + } + + private MessageEvaluator createMessageEvaluator(Descriptor desc) throws CompilationException { + MessageEvaluator eval = cache.get(desc); + if (eval != null) { + return eval; + } + MessageEvaluator msgEval = new MessageEvaluator(); + cache.put(desc, msgEval); + buildMessage(desc, msgEval); + return msgEval; + } + + private void buildMessage(Descriptor desc, MessageEvaluator msgEval) + throws CompilationException { + try { + DynamicMessage defaultInstance = DynamicMessage.newBuilder(desc).buildPartial(); + Descriptor descriptor = defaultInstance.getDescriptorForType(); + MessageRules msgRules = resolver.resolveMessageRules(descriptor); + if (msgRules.getDisabled()) { + return; + } + processMessageExpressions(descriptor, msgRules, msgEval, defaultInstance); + processMessageOneofRules(descriptor, msgRules, msgEval); + processOneofRules(descriptor, msgEval); + processFields(descriptor, msgRules, msgEval); + } catch (InvalidProtocolBufferException e) { + throw new CompilationException( + "failed to parse proto definition: " + desc.getFullName(), e); + } + } + + private void processMessageExpressions( + Descriptor desc, MessageRules msgRules, MessageEvaluator msgEval, DynamicMessage message) + throws CompilationException { + List celList = msgRules.getCelList(); + if (celList.isEmpty()) { + return; + } + Cel finalCel = + cel.toCelBuilder() + .addMessageTypes(message.getDescriptorForType()) + .addVar(Variable.THIS_NAME, StructTypeReference.create(desc.getFullName())) + .build(); + List compiledPrograms = compileRules(celList, finalCel, false); + if (compiledPrograms.isEmpty()) { + throw new CompilationException("compile returned null"); + } + msgEval.append(new CelPrograms(null, compiledPrograms)); + } + + private void processMessageOneofRules( + Descriptor desc, MessageRules msgRules, MessageEvaluator msgEval) + throws CompilationException { + for (MessageOneofRule rule : msgRules.getOneofList()) { + if (rule.getFieldsCount() == 0) { + throw new CompilationException( + String.format( + "at least one field must be specified in oneof rule for the message %s", + desc.getFullName())); + } + Set fields = new LinkedHashSet<>(rule.getFieldsCount()); + for (String name : rule.getFieldsList()) { + FieldDescriptor field = desc.findFieldByName(name); + if (field == null) { + throw new CompilationException( + String.format("field %s not found in %s", name, desc.getFullName())); + } + if (!fields.add(field)) { + throw new CompilationException( + String.format( + "duplicate %s in oneof rule for the message %s", name, desc.getFullName())); + } + } + msgEval.append(new MessageOneofEvaluator(new ArrayList<>(fields), rule.getRequired())); + } + } + + private void processOneofRules(Descriptor desc, MessageEvaluator msgEval) + throws InvalidProtocolBufferException, CompilationException { + List oneofs = desc.getOneofs(); + for (Descriptors.OneofDescriptor oneofDesc : oneofs) { + OneofRules oneofRules = resolver.resolveOneofRules(oneofDesc); + OneofEvaluator oneofEvaluatorEval = new OneofEvaluator(oneofDesc, oneofRules.getRequired()); + msgEval.append(oneofEvaluatorEval); + } + } + + private void processFields(Descriptor desc, MessageRules msgRules, MessageEvaluator msgEval) + throws CompilationException, InvalidProtocolBufferException { + List fields = desc.getFields(); + for (FieldDescriptor fieldDescriptor : fields) { + FieldDescriptor descriptor = desc.findFieldByName(fieldDescriptor.getName()); + FieldRules fieldRules = resolver.resolveFieldRules(descriptor); + if (!fieldRules.hasIgnore() + && msgRules.getOneofList().stream() + .anyMatch(oneof -> oneof.getFieldsList().contains(fieldDescriptor.getName()))) { + fieldRules = fieldRules.toBuilder().setIgnore(Ignore.IGNORE_IF_UNPOPULATED).build(); + } + FieldEvaluator fldEval = buildField(descriptor, fieldRules); + msgEval.append(fldEval); + } + } + + private FieldEvaluator buildField(FieldDescriptor fieldDescriptor, FieldRules fieldRules) + throws CompilationException { + ValueEvaluator valueEvaluatorEval = new ValueEvaluator(fieldDescriptor, null); + boolean ignoreDefault = fieldDescriptor.hasPresence() && shouldIgnoreDefault(fieldRules); + Object zero = null; + if (ignoreDefault) { + zero = zeroValue(fieldDescriptor, false); + } + FieldEvaluator fieldEvaluator = + new FieldEvaluator( + valueEvaluatorEval, + fieldDescriptor, + fieldRules.getRequired(), + fieldDescriptor.hasPresence(), + fieldRules.getIgnore(), + zero); + buildValue(fieldDescriptor, fieldRules, fieldEvaluator.valueEvaluator); + return fieldEvaluator; + } + + private static boolean shouldIgnoreEmpty(FieldRules rules) { + return rules.getIgnore() == Ignore.IGNORE_IF_UNPOPULATED + || rules.getIgnore() == Ignore.IGNORE_IF_DEFAULT_VALUE; + } + + private static boolean shouldIgnoreDefault(FieldRules rules) { + return rules.getIgnore() == Ignore.IGNORE_IF_DEFAULT_VALUE; + } + + private void buildValue( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluator) + throws CompilationException { + if (fieldRules.getIgnore() == Ignore.IGNORE_ALWAYS) { + return; + } + + processIgnoreEmpty(fieldDescriptor, fieldRules, valueEvaluator); + processFieldExpressions(fieldDescriptor, fieldRules, valueEvaluator); + processEmbeddedMessage(fieldDescriptor, valueEvaluator); + processWrapperRules(fieldDescriptor, fieldRules, valueEvaluator); + processStandardRules(fieldDescriptor, fieldRules, valueEvaluator); + processAnyRules(fieldDescriptor, fieldRules, valueEvaluator); + processEnumRules(fieldDescriptor, fieldRules, valueEvaluator); + processMapRules(fieldDescriptor, fieldRules, valueEvaluator); + processRepeatedRules(fieldDescriptor, fieldRules, valueEvaluator); + } + + private void processIgnoreEmpty( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + if (valueEvaluatorEval.hasNestedRule() && shouldIgnoreEmpty(fieldRules)) { + valueEvaluatorEval.setIgnoreEmpty(zeroValue(fieldDescriptor, true)); + } + } + + private Object zeroValue(FieldDescriptor fieldDescriptor, boolean forItems) + throws CompilationException { + final Object zero; + if (forItems && fieldDescriptor.isRepeated()) { + switch (fieldDescriptor.getType().getJavaType()) { + case INT: + case LONG: + zero = 0L; + break; + case FLOAT: + case DOUBLE: + zero = 0D; + break; + case BOOLEAN: + zero = false; + break; + case STRING: + zero = ""; + break; + case BYTE_STRING: + zero = ByteString.EMPTY; + break; + case ENUM: + zero = (long) fieldDescriptor.getEnumType().getValues().get(0).getNumber(); + break; + case MESSAGE: + zero = createMessageForType(fieldDescriptor.getMessageType()); + break; + default: + zero = fieldDescriptor.getDefaultValue(); + break; + } + } else if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE + && !fieldDescriptor.isRepeated()) { + zero = createMessageForType(fieldDescriptor.getMessageType()); + } else { + zero = + ProtoAdapter.scalarToCel(fieldDescriptor.getType(), fieldDescriptor.getDefaultValue()); + } + return zero; + } + + private Message createMessageForType(Descriptor messageType) throws CompilationException { + try { + return DynamicMessage.parseFrom(messageType, new byte[0]); + } catch (InvalidProtocolBufferException e) { + throw new CompilationException("field descriptor type is invalid " + e.getMessage(), e); + } + } + + private void processFieldExpressions( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + List rulesCelList = fieldRules.getCelList(); + if (rulesCelList.isEmpty()) { + return; + } + CelBuilder builder = cel.toCelBuilder(); + builder = + builder.addVar( + Variable.THIS_NAME, + DescriptorMappings.getCELType(fieldDescriptor, valueEvaluatorEval.hasNestedRule())); + + if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + builder = builder.addMessageTypes(fieldDescriptor.getMessageType()); + } + Cel finalCel = builder.build(); + List compiledPrograms = compileRules(rulesCelList, finalCel, true); + if (!compiledPrograms.isEmpty()) { + valueEvaluatorEval.append(new CelPrograms(valueEvaluatorEval, compiledPrograms)); + } + } + + private void processEmbeddedMessage( + FieldDescriptor fieldDescriptor, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + if (fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.MESSAGE + || fieldDescriptor.isMapField() + || (fieldDescriptor.isRepeated() && !valueEvaluatorEval.hasNestedRule())) { + return; + } + Evaluator embedEval = + new EmbeddedMessageEvaluator( + valueEvaluatorEval, createMessageEvaluator(fieldDescriptor.getMessageType())); + valueEvaluatorEval.append(embedEval); + } + + private void processWrapperRules( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + + if (fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.MESSAGE + || fieldDescriptor.isMapField() + || (fieldDescriptor.isRepeated() && !valueEvaluatorEval.hasNestedRule())) { + return; + } + FieldDescriptor expectedWrapperDescriptor = + DescriptorMappings.expectedWrapperRules(fieldDescriptor.getMessageType().getFullName()); + + // Verify that the expected wrapper rules for this field are equal to the rules specified on + // the field + if (expectedWrapperDescriptor != null) { + FieldDescriptor oneofFieldDescriptor = + fieldRules.getOneofFieldDescriptor(DescriptorMappings.FIELD_RULES_ONEOF_DESC); + // If there are no field rules set, just return + if (oneofFieldDescriptor == null) { + return; + } + if (!expectedWrapperDescriptor + .getMessageType() + .getFullName() + .equals(oneofFieldDescriptor.getMessageType().getFullName())) { + throw new CompilationException( + String.format( + "mismatched message rules, %s is not a valid rule for field %s", + oneofFieldDescriptor.getName(), fieldDescriptor.getName())); + } + } + if (expectedWrapperDescriptor == null || !fieldRules.hasField(expectedWrapperDescriptor)) { + return; + } + + ValueEvaluator unwrapped = + new ValueEvaluator( + valueEvaluatorEval.getDescriptor(), valueEvaluatorEval.getNestedRule()); + buildValue(fieldDescriptor.getMessageType().findFieldByName("value"), fieldRules, unwrapped); + valueEvaluatorEval.append(unwrapped); + } + + private void processStandardRules( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + + // If this is a wrapper field, just return. Wrapper fields are handled by + // processWrapperRules and their unwrapped values are passed through the process gauntlet. + if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { + FieldDescriptor expectedWrapperDescriptor = + DescriptorMappings.expectedWrapperRules(fieldDescriptor.getMessageType().getFullName()); + if (expectedWrapperDescriptor != null) { + return; + } + } + + List compile = + ruleCache.compile(fieldDescriptor, fieldRules, valueEvaluatorEval.hasNestedRule()); + if (compile.isEmpty()) { + return; + } + valueEvaluatorEval.append(new CelPrograms(valueEvaluatorEval, compile)); + } + + private void processAnyRules( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) { + if ((fieldDescriptor.isRepeated() && !valueEvaluatorEval.hasNestedRule()) + || fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.MESSAGE + || !fieldDescriptor.getMessageType().getFullName().equals("google.protobuf.Any")) { + return; + } + FieldDescriptor typeURLDesc = fieldDescriptor.getMessageType().findFieldByName("type_url"); + valueEvaluatorEval.append( + new AnyEvaluator( + valueEvaluatorEval, + typeURLDesc, + fieldRules.getAny().getInList(), + fieldRules.getAny().getNotInList())); + } + + private void processEnumRules( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) { + if (fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.ENUM) { + return; + } + if (fieldRules.getEnum().getDefinedOnly()) { + Descriptors.EnumDescriptor enumDescriptor = fieldDescriptor.getEnumType(); + valueEvaluatorEval.append( + new EnumEvaluator(valueEvaluatorEval, enumDescriptor.getValues())); + } + } + + private void processMapRules( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + if (!fieldDescriptor.isMapField()) { + return; + } + MapEvaluator mapEval = new MapEvaluator(valueEvaluatorEval, fieldDescriptor); + buildValue( + fieldDescriptor.getMessageType().findFieldByNumber(1), + fieldRules.getMap().getKeys(), + mapEval.getKeyEvaluator()); + buildValue( + fieldDescriptor.getMessageType().findFieldByNumber(2), + fieldRules.getMap().getValues(), + mapEval.getValueEvaluator()); + valueEvaluatorEval.append(mapEval); + } + + private void processRepeatedRules( + FieldDescriptor fieldDescriptor, FieldRules fieldRules, ValueEvaluator valueEvaluatorEval) + throws CompilationException { + if (fieldDescriptor.isMapField() + || !fieldDescriptor.isRepeated() + || valueEvaluatorEval.hasNestedRule()) { + return; + } + ListEvaluator listEval = new ListEvaluator(valueEvaluatorEval); + buildValue(fieldDescriptor, fieldRules.getRepeated().getItems(), listEval.itemRules); + valueEvaluatorEval.append(listEval); + } + + private static List compileRules(List rules, Cel cel, boolean isField) + throws CompilationException { + List expressions = Expression.fromRules(rules); + List compiledPrograms = new ArrayList<>(); + for (int i = 0; i < expressions.size(); i++) { + Expression expression = expressions.get(i); + AstExpression astExpression = AstExpression.newAstExpression(cel, expression); + @Nullable FieldPath rulePath = null; + if (isField) { + rulePath = + FieldPath.newBuilder() + .addElements(CEL_FIELD_PATH_ELEMENT.toBuilder().setIndex(i)) + .build(); + } + try { + compiledPrograms.add( + new CompiledProgram( + cel.createProgram(astExpression.ast), + astExpression.source, + rulePath, + new MessageValue(rules.get(i)), + null)); + } catch (CelEvaluationException e) { + throw new CompilationException("failed to evaluate rule " + rules.get(i).getId(), e); + } + } + return compiledPrograms; + } + } +} diff --git a/src/main/java/build/buf/protovalidate/internal/expression/Expression.java b/src/main/java/build/buf/protovalidate/Expression.java similarity index 50% rename from src/main/java/build/buf/protovalidate/internal/expression/Expression.java rename to src/main/java/build/buf/protovalidate/Expression.java index e4af662e..638128d6 100644 --- a/src/main/java/build/buf/protovalidate/internal/expression/Expression.java +++ b/src/main/java/build/buf/protovalidate/Expression.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,29 +12,29 @@ // See the License for the specific language governing permissions and // limitations under the License. -package build.buf.protovalidate.internal.expression; +package build.buf.protovalidate; -import build.buf.validate.Constraint; +import build.buf.validate.Rule; import java.util.ArrayList; import java.util.List; /** Expression represents a single CEL expression. */ -public class Expression { - /** The id of the constraint. */ - public final String id; +final class Expression { + /** The id of the rule. */ + final String id; - /** The message of the constraint. */ - public final String message; + /** The message of the rule. */ + final String message; - /** The expression of the constraint. */ - public final String expression; + /** The expression of the rule. */ + final String expression; /** * Constructs a new Expression. * - * @param id The ID of the constraint. - * @param message The message of the constraint. - * @param expression The expression of the constraint. + * @param id The ID of the rule. + * @param message The message of the rule. + * @param expression The expression of the rule. */ private Expression(String id, String message, String expression) { this.id = id; @@ -43,24 +43,24 @@ private Expression(String id, String message, String expression) { } /** - * Constructs a new Expression from the given constraint. + * Constructs a new Expression from the given rule. * - * @param constraint The constraint to create the expression from. + * @param rule The rule to create the expression from. */ - private Expression(Constraint constraint) { - this(constraint.getId(), constraint.getMessage(), constraint.getExpression()); + private Expression(Rule rule) { + this(rule.getId(), rule.getMessage(), rule.getExpression()); } /** - * Constructs a new list of {@link Expression} from the given list of constraints. + * Constructs a new list of {@link Expression} from the given list of rules. * - * @param constraints The list of constraints. + * @param rules The list of rules. * @return The list of expressions. */ - public static List fromConstraints(List constraints) { + static List fromRules(List rules) { List expressions = new ArrayList<>(); - for (build.buf.validate.Constraint constraint : constraints) { - expressions.add(new Expression(constraint)); + for (build.buf.validate.Rule rule : rules) { + expressions.add(new Expression(rule)); } return expressions; } diff --git a/src/main/java/build/buf/protovalidate/FieldEvaluator.java b/src/main/java/build/buf/protovalidate/FieldEvaluator.java new file mode 100644 index 00000000..29b2ac3a --- /dev/null +++ b/src/main/java/build/buf/protovalidate/FieldEvaluator.java @@ -0,0 +1,147 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.ExecutionException; +import build.buf.validate.FieldPath; +import build.buf.validate.FieldRules; +import build.buf.validate.Ignore; +import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.Message; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import org.jspecify.annotations.Nullable; + +/** Performs validation on a single message field, defined by its descriptor. */ +final class FieldEvaluator implements Evaluator { + private static final FieldDescriptor REQUIRED_DESCRIPTOR = + FieldRules.getDescriptor().findFieldByNumber(FieldRules.REQUIRED_FIELD_NUMBER); + + private static final FieldPath REQUIRED_RULE_PATH = + FieldPath.newBuilder() + .addElements(FieldPathUtils.fieldPathElement(REQUIRED_DESCRIPTOR)) + .build(); + + private final RuleViolationHelper helper; + + /** The {@link ValueEvaluator} to apply to the field's value */ + final ValueEvaluator valueEvaluator; + + /** The {@link FieldDescriptor} targeted by this evaluator */ + private final FieldDescriptor descriptor; + + /** Indicates that the field must have a set value. */ + private final boolean required; + + /** Whether validation should be ignored for certain conditions */ + private final Ignore ignore; + + /** Whether the field distinguishes between unpopulated and default values. */ + private final boolean hasPresence; + + @Nullable private final Object zero; + + /** Constructs a new {@link FieldEvaluator} */ + FieldEvaluator( + ValueEvaluator valueEvaluator, + FieldDescriptor descriptor, + boolean required, + boolean hasPresence, + Ignore ignore, + @Nullable Object zero) { + this.helper = new RuleViolationHelper(valueEvaluator); + this.valueEvaluator = valueEvaluator; + this.descriptor = descriptor; + this.required = required; + this.hasPresence = hasPresence; + this.ignore = ignore; + this.zero = zero; + } + + @Override + public boolean tautology() { + return !required && valueEvaluator.tautology(); + } + + /** + * Returns whether a field should always skip validation. + * + *

If true, this will take precedence and all checks are skipped. + */ + private boolean shouldIgnoreAlways() { + return this.ignore == Ignore.IGNORE_ALWAYS; + } + + /** + * Returns whether a field should skip validation on its zero value. + * + *

This is generally true for nullable fields or fields with the ignore_empty rule explicitly + * set. + */ + private boolean shouldIgnoreEmpty() { + return this.hasPresence + || this.ignore == Ignore.IGNORE_IF_UNPOPULATED + || this.ignore == Ignore.IGNORE_IF_DEFAULT_VALUE; + } + + /** + * Returns whether a field should skip validation on its zero value, including for fields which + * have field presence and are set to the zero value. + */ + private boolean shouldIgnoreDefault() { + return this.hasPresence && this.ignore == Ignore.IGNORE_IF_DEFAULT_VALUE; + } + + @Override + public List evaluate(Value val, boolean failFast) + throws ExecutionException { + if (this.shouldIgnoreAlways()) { + return RuleViolation.NO_VIOLATIONS; + } + MessageReflector message = val.messageValue(); + if (message == null) { + return RuleViolation.NO_VIOLATIONS; + } + boolean hasField; + if (descriptor.isRepeated()) { + if (descriptor.isMapField()) { + hasField = !message.getField(descriptor).mapValue().isEmpty(); + } else { + hasField = !message.getField(descriptor).repeatedValue().isEmpty(); + } + } else { + hasField = message.hasField(descriptor); + } + if (required && !hasField) { + return Collections.singletonList( + RuleViolation.newBuilder() + .addFirstFieldPathElement(FieldPathUtils.fieldPathElement(descriptor)) + .addAllRulePathElements(helper.getRulePrefixElements()) + .addAllRulePathElements(REQUIRED_RULE_PATH.getElementsList()) + .setRuleId("required") + .setMessage("value is required") + .setRuleValue(new RuleViolation.FieldValue(true, REQUIRED_DESCRIPTOR))); + } + if (this.shouldIgnoreEmpty() && !hasField) { + return RuleViolation.NO_VIOLATIONS; + } + Value fieldValue = message.getField(descriptor); + if (this.shouldIgnoreDefault() && Objects.equals(zero, fieldValue.jvmValue(Object.class))) { + return RuleViolation.NO_VIOLATIONS; + } + return valueEvaluator.evaluate(fieldValue, failFast); + } +} diff --git a/src/main/java/build/buf/protovalidate/FieldPathUtils.java b/src/main/java/build/buf/protovalidate/FieldPathUtils.java new file mode 100644 index 00000000..1c8c1b0b --- /dev/null +++ b/src/main/java/build/buf/protovalidate/FieldPathUtils.java @@ -0,0 +1,119 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.validate.FieldPath; +import build.buf.validate.FieldPathElement; +import com.google.protobuf.Descriptors; +import java.util.List; +import org.jspecify.annotations.Nullable; + +/** Utility class for manipulating error paths in violations. */ +final class FieldPathUtils { + private FieldPathUtils() {} + + /** + * Converts the provided field path to a string. + * + * @param fieldPath A field path to convert to a string. + * @return The string representation of the provided field path. + */ + static String fieldPathString(FieldPath fieldPath) { + StringBuilder builder = new StringBuilder(); + for (FieldPathElement element : fieldPath.getElementsList()) { + if (builder.length() > 0) { + builder.append("."); + } + builder.append(element.getFieldName()); + switch (element.getSubscriptCase()) { + case INDEX: + builder.append("["); + builder.append(element.getIndex()); + builder.append("]"); + break; + case BOOL_KEY: + if (element.getBoolKey()) { + builder.append("[true]"); + } else { + builder.append("[false]"); + } + break; + case INT_KEY: + builder.append("["); + builder.append(element.getIntKey()); + builder.append("]"); + break; + case UINT_KEY: + builder.append("["); + builder.append(element.getUintKey()); + builder.append("]"); + break; + case STRING_KEY: + builder.append("[\""); + builder.append(element.getStringKey().replace("\\", "\\\\").replace("\"", "\\\"")); + builder.append("\"]"); + break; + case SUBSCRIPT_NOT_SET: + break; + } + } + return builder.toString(); + } + + /** + * Returns the field path element that refers to the provided field descriptor. + * + * @param fieldDescriptor The field descriptor to generate a field path element for. + * @return The field path element that corresponds to the provided field descriptor. + */ + static FieldPathElement fieldPathElement(Descriptors.FieldDescriptor fieldDescriptor) { + String name; + if (fieldDescriptor.isExtension()) { + name = "[" + fieldDescriptor.getFullName() + "]"; + } else { + name = fieldDescriptor.getName(); + } + return FieldPathElement.newBuilder() + .setFieldNumber(fieldDescriptor.getNumber()) + .setFieldName(name) + .setFieldType(fieldDescriptor.getType().toProto()) + .build(); + } + + /** + * Provided a list of violations, adjusts it by prepending rule and field path elements. + * + * @param violations A list of violations. + * @param fieldPathElement A field path element to prepend, or null. + * @param rulePathElements Rule path elements to prepend. + * @return For convenience, the list of violations passed into the violations parameter. + */ + static List updatePaths( + List violations, + @Nullable FieldPathElement fieldPathElement, + List rulePathElements) { + if (fieldPathElement != null || !rulePathElements.isEmpty()) { + for (RuleViolation.Builder violation : violations) { + for (int i = rulePathElements.size() - 1; i >= 0; i--) { + violation.addFirstRulePathElement(rulePathElements.get(i)); + } + if (fieldPathElement != null) { + violation.addFirstFieldPathElement(fieldPathElement); + } + } + } + return violations; + } +} diff --git a/src/main/java/build/buf/protovalidate/Format.java b/src/main/java/build/buf/protovalidate/Format.java new file mode 100644 index 00000000..a1f9320e --- /dev/null +++ b/src/main/java/build/buf/protovalidate/Format.java @@ -0,0 +1,363 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static java.time.format.DateTimeFormatter.ISO_INSTANT; + +import com.google.common.primitives.UnsignedLong; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.NullValue; +import com.google.protobuf.Timestamp; +import dev.cel.common.types.TypeType; +import dev.cel.runtime.CelEvaluationException; +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.text.DecimalFormat; +import java.time.Instant; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.stream.Collectors; + +/** String formatter for CEL evaluation. */ +final class Format { + /** + * Format the string with a {@link List}. + * + * @param fmtString the string to format. + * @param list the arguments. + * @return the formatted string. + * @throws CelEvaluationException If an error occurs formatting the string. + */ + static String format(String fmtString, List list) throws CelEvaluationException { + // StringBuilder to accumulate the formatted string + StringBuilder builder = new StringBuilder(); + int index = 0; + int argIndex = 0; + while (index < fmtString.length()) { + char c = fmtString.charAt(index++); + if (c != '%') { + // Append non-format characters directly + builder.append(c); + // Add the entire character if it's not a UTF-8 character. + if ((c & 0x80) != 0) { + // Add the rest of the UTF-8 character. + while (index < fmtString.length() && (fmtString.charAt(index) & 0xc0) == 0x80) { + builder.append(fmtString.charAt(index++)); + } + } + continue; + } + if (index >= fmtString.length()) { + throw new CelEvaluationException("format: expected format specifier"); + } + if (fmtString.charAt(index) == '%') { + // Escaped '%', append '%' and move to the next character + builder.append('%'); + index++; + continue; + } + if (argIndex >= list.size()) { + throw new CelEvaluationException("index " + argIndex + " out of range"); + } + Object arg = list.get(argIndex++); + c = fmtString.charAt(index++); + int precision = 6; + if (c == '.') { + // parse the precision + precision = 0; + while (index < fmtString.length() + && '0' <= fmtString.charAt(index) + && fmtString.charAt(index) <= '9') { + precision = precision * 10 + (fmtString.charAt(index++) - '0'); + } + if (index >= fmtString.length()) { + throw new CelEvaluationException("format: expected format specifier"); + } + c = fmtString.charAt(index++); + } + + switch (c) { + case 'd': + builder.append(formatDecimal(arg)); + break; + case 'x': + builder.append(formatHex(arg)); + break; + case 'X': + // We can use a root locale, because the only characters are hex (A-F). + builder.append(formatHex(arg).toUpperCase(Locale.ROOT)); + break; + case 's': + builder.append(formatString(arg)); + break; + case 'e': + builder.append(formatExponential(arg, precision)); + break; + case 'f': + builder.append(formatFloat(arg, precision)); + break; + case 'b': + builder.append(formatBinary(arg)); + break; + case 'o': + builder.append(formatOctal(arg)); + break; + default: + throw new CelEvaluationException( + "could not parse formatting clause: unrecognized formatting clause \"" + c + "\""); + } + } + return builder.toString(); + } + + /** + * Formats a string value. + * + * @param val the value to format. + */ + private static String formatString(Object val) throws CelEvaluationException { + if (val instanceof String) { + return (String) val; + } else if (val instanceof TypeType) { + return ((TypeType) val).containingTypeName(); + } else if (val instanceof Boolean) { + return Boolean.toString((Boolean) val); + } else if (val instanceof Long || val instanceof UnsignedLong) { + Optional str = validateNumber(val); + if (str.isPresent()) { + return str.get(); + } + return val.toString(); + } else if (val instanceof ByteString) { + String byteStr = ((ByteString) val).toStringUtf8(); + // Collapse any contiguous placeholders into one + return byteStr.replaceAll("\\ufffd+", "\ufffd"); + } else if (val instanceof Double) { + Optional result = validateNumber(val); + if (result.isPresent()) { + return result.get(); + } + return formatDecimal(val); + } else if (val instanceof Duration) { + return formatDuration((Duration) val); + } else if (val instanceof Timestamp) { + return formatTimestamp((Timestamp) val); + } else if (val instanceof List) { + return formatList((List) val); + } else if (val instanceof Map) { + return formatMap((Map) val); + } else if (val == null || val instanceof NullValue) { + return "null"; + } + throw new CelEvaluationException( + "error during formatting: string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps, was given " + + val.getClass()); + } + + /** + * Formats a list value. + * + * @param val the value to format. + */ + private static String formatList(List val) throws CelEvaluationException { + StringBuilder builder = new StringBuilder(); + builder.append('['); + + Iterator iter = val.iterator(); + while (iter.hasNext()) { + Object v = iter.next(); + builder.append(formatString(v)); + if (iter.hasNext()) { + builder.append(", "); + } + } + builder.append(']'); + return builder.toString(); + } + + private static String formatMap(Map val) throws CelEvaluationException { + StringBuilder builder = new StringBuilder(); + builder.append('{'); + + SortedMap sorted = new TreeMap<>(); + + for (Entry entry : val.entrySet()) { + sorted.put(formatString(entry.getKey()), formatString(entry.getValue())); + } + + String result = + sorted.entrySet().stream() + .map(entry -> entry.getKey() + ": " + entry.getValue()) + .collect(Collectors.joining(", ")); + + builder.append(result).append('}'); + + return builder.toString(); + } + + /** + * Formats a timestamp value. + * + * @param timestamp the value to format. + */ + private static String formatTimestamp(Timestamp timestamp) { + return ISO_INSTANT.format(Instant.ofEpochSecond(timestamp.getSeconds(), timestamp.getNanos())); + } + + /** + * Formats a duration value. + * + * @param duration the value to format. + */ + private static String formatDuration(Duration duration) { + StringBuilder builder = new StringBuilder(); + + double totalSeconds = duration.getSeconds() + (duration.getNanos() / 1_000_000_000.0); + + DecimalFormat formatter = new DecimalFormat("0.#########"); + builder.append(formatter.format(totalSeconds)); + builder.append("s"); + + return builder.toString(); + } + + /** + * Formats a hexadecimal value. + * + * @param val the value to format. + */ + private static String formatHex(Object val) throws CelEvaluationException { + if (val instanceof Long) { + return Long.toHexString((Long) val); + } else if (val instanceof UnsignedLong) { + return Long.toHexString(((UnsignedLong) val).longValue()); + } else if (val instanceof ByteString) { + StringBuilder hexString = new StringBuilder(); + for (byte b : (ByteString) val) { + hexString.append(String.format("%02x", b)); + } + return hexString.toString(); + } else if (val instanceof String) { + String arg = (String) val; + return String.format("%x", new BigInteger(1, arg.getBytes(StandardCharsets.UTF_8))); + } else { + throw new CelEvaluationException( + "error during formatting: only integers, byte buffers, and strings can be formatted as hex, was given " + + val.getClass()); + } + } + + /** + * Formats a decimal value. + * + * @param val the value to format. + */ + private static String formatDecimal(Object val) throws CelEvaluationException { + if (val instanceof Long || val instanceof UnsignedLong || val instanceof Double) { + Optional str = validateNumber(val); + if (str.isPresent()) { + return str.get(); + } + DecimalFormat formatter = new DecimalFormat("0.#########"); + return formatter.format(val); + } else { + throw new CelEvaluationException( + "error during formatting: decimal clause can only be used on integers, was given " + + val.getClass()); + } + } + + private static String formatOctal(Object val) throws CelEvaluationException { + if (val instanceof Long) { + return Long.toOctalString((Long) val); + } else if (val instanceof UnsignedLong) { + return Long.toOctalString(((UnsignedLong) val).longValue()); + } else { + throw new CelEvaluationException( + "error during formatting: octal clause can only be used on integers, was given " + + val.getClass()); + } + } + + private static String formatBinary(Object val) throws CelEvaluationException { + if (val instanceof Long) { + return Long.toBinaryString((Long) val); + } else if (val instanceof UnsignedLong) { + return Long.toBinaryString(((UnsignedLong) val).longValue()); + } else if (val instanceof Boolean) { + return Boolean.TRUE.equals(val) ? "1" : "0"; + } else { + throw new CelEvaluationException( + "error during formatting: only integers and bools can be formatted as binary, was given " + + val.getClass()); + } + } + + private static String formatExponential(Object val, int precision) throws CelEvaluationException { + if (val instanceof Double) { + Optional str = validateNumber(val); + if (str.isPresent()) { + return str.get(); + } + String pattern = "%." + precision + "e"; + return String.format(pattern, val); + } else { + throw new CelEvaluationException( + "error during formatting: scientific clause can only be used on doubles, was given " + + val.getClass()); + } + } + + private static String formatFloat(Object val, int precision) throws CelEvaluationException { + if (val instanceof Double) { + Optional str = validateNumber(val); + if (str.isPresent()) { + return str.get(); + } + StringBuilder pattern = new StringBuilder("0."); + if (precision > 0) { + for (int i = 0; i < precision; i++) { + pattern.append("0"); + } + } else { + pattern.append("########"); + } + DecimalFormat formatter = new DecimalFormat(pattern.toString()); + return formatter.format(val); + } else { + throw new CelEvaluationException( + "error during formatting: fixed-point clause can only be used on doubles, was given " + + val.getClass()); + } + } + + private static Optional validateNumber(Object val) { + if (val instanceof Double) { + if ((Double) val == Double.POSITIVE_INFINITY) { + return Optional.of("Infinity"); + } else if ((Double) val == Double.NEGATIVE_INFINITY) { + return Optional.of("-Infinity"); + } + } + return Optional.empty(); + } +} diff --git a/src/main/java/build/buf/protovalidate/Ipv4.java b/src/main/java/build/buf/protovalidate/Ipv4.java new file mode 100644 index 00000000..94bc4e25 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/Ipv4.java @@ -0,0 +1,204 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import java.util.ArrayList; +import java.util.List; + +/** + * Ipv4 is a class used to parse a given string to determine if it is an IPv4 address or address + * prefix. + */ +final class Ipv4 { + private final String str; + private int index; + private final List octets; + private int prefixLen; + + Ipv4(String str) { + this.str = str; + this.octets = new ArrayList<>(); + } + + /** + * Returns the 32-bit value of an address parsed through address() or addressPrefix(). + * + *

Returns -1 if no address was parsed successfully. + */ + int getBits() { + if (this.octets.size() != 4) { + return -1; + } + return (this.octets.get(0) << 24) + | (this.octets.get(1) << 16) + | (this.octets.get(2) << 8) + | this.octets.get(3); + } + + /** + * Returns true if all bits to the right of the prefix-length are all zeros. + * + *

Behavior is undefined if addressPrefix() has not been called before, or has returned false. + */ + boolean isPrefixOnly() { + int bits = this.getBits(); + + int mask = 0; + if (this.prefixLen == 32) { + mask = 0xffffffff; + } else { + mask = ~(0xffffffff >>> this.prefixLen); + } + + int masked = bits & mask; + + return bits == masked; + } + + // Parses an IPv4 Address in dotted decimal notation. + boolean address() { + return this.addressPart() && this.index == this.str.length(); + } + + // Parses an IPv4 Address prefix. + boolean addressPrefix() { + return this.addressPart() + && this.take('/') + && this.prefixLength() + && this.index == this.str.length(); + } + + // Store value in prefixLen + private boolean prefixLength() { + int start = this.index; + + while (this.index < this.str.length() && this.digit()) { + if (this.index - start > 2) { + // max prefix-length is 32 bits, so anything more than 2 digits is invalid + return false; + } + } + + String str = this.str.substring(start, this.index); + if (str.isEmpty()) { + // too short + return false; + } + + if (str.length() > 1 && str.charAt(0) == '0') { + // bad leading 0 + return false; + } + + try { + int val = Integer.parseInt(str); + + if (val > 32) { + // max 32 bits + return false; + } + + this.prefixLen = val; + return true; + } catch (NumberFormatException nfe) { + return false; + } + } + + private boolean addressPart() { + int start = this.index; + + if (this.decOctet() + && this.take('.') + && this.decOctet() + && this.take('.') + && this.decOctet() + && this.take('.') + && this.decOctet()) { + return true; + } + + this.index = start; + + return false; + } + + private boolean decOctet() { + int start = this.index; + + while (this.index < this.str.length() && this.digit()) { + if (this.index - start > 3) { + // decimal octet can be three characters at most + return false; + } + } + + String str = this.str.substring(start, this.index); + if (str.isEmpty()) { + // too short + return false; + } + + if (str.length() > 1 && str.charAt(0) == '0') { + // bad leading 0 + return false; + } + + try { + int val = Integer.parseInt(str); + + if (val > 255) { + return false; + } + + this.octets.add((short) val); + + return true; + } catch (NumberFormatException nfe) { + // Error converting to number + return false; + } + } + + /** + * Determines whether the current position is a digit. + * + *

Parses the rule: + * + *

DIGIT = %x30-39 ; 0-9
+   */
+  private boolean digit() {
+    char c = this.str.charAt(this.index);
+    if ('0' <= c && c <= '9') {
+      this.index++;
+      return true;
+    }
+    return false;
+  }
+
+  /** Take the given char at the current position, incrementing the index if necessary. */
+  private boolean take(char c) {
+    if (this.index >= this.str.length()) {
+      return false;
+    }
+
+    if (this.str.charAt(this.index) == c) {
+      this.index++;
+      return true;
+    }
+
+    return false;
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/Ipv6.java b/src/main/java/build/buf/protovalidate/Ipv6.java
new file mode 100644
index 00000000..e72559ef
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/Ipv6.java
@@ -0,0 +1,361 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * Ipv6 is a class used to parse a given string to determine if it is an IPv6 address or address
+ * prefix.
+ */
+final class Ipv6 {
+  private final String str;
+  private int index;
+  // 16-bit pieces found
+  private final List pieces;
+  // number of 16-bit pieces found when double colon was found
+  private int doubleColonAt;
+  private boolean doubleColonSeen;
+  // dotted notation for right-most 32 bits
+  private String dottedRaw;
+  // dotted notation successfully parsed as IPv4
+  @Nullable private Ipv4 dottedAddr;
+  private boolean zoneIDFound;
+  // 0 - 128
+  private int prefixLen;
+
+  Ipv6(String str) {
+    this.str = str;
+    this.pieces = new ArrayList<>();
+    this.doubleColonAt = -1;
+    this.dottedRaw = "";
+  }
+
+  /**
+   * Returns the 128-bit value of an address parsed through address() or addressPrefix() as a
+   * 2-element length array of 64-bit values.
+   *
+   * 

Returns [0L, 0L] if no address was parsed successfully. + */ + private long[] getBits() { + List p16 = this.pieces; + + // handle dotted decimal, add to p16 + if (this.dottedAddr != null) { + // right-most 32 bits + long dotted32 = this.dottedAddr.getBits(); + // high 16 bits + p16.add((int) (dotted32 >> 16)); + // low 16 bits + p16.add((int) dotted32); + } + + // handle double colon, fill pieces with 0 + if (this.doubleColonSeen) { + while (p16.size() < 8) { + p16.add(this.doubleColonAt, 0x00000000); + } + } + + if (p16.size() != 8) { + return new long[] {0L, 0L}; + } + + return new long[] { + Long.valueOf(p16.get(0)) << 48 + | Long.valueOf(p16.get(1)) << 32 + | Long.valueOf(p16.get(2)) << 16 + | Long.valueOf(p16.get(3)), + Long.valueOf(p16.get(4)) << 48 + | Long.valueOf(p16.get(5)) << 32 + | Long.valueOf(p16.get(6)) << 16 + | Long.valueOf(p16.get(7)) + }; + } + + boolean isPrefixOnly() { + // For each 64-bit piece of the address, require that values to the right of the prefix are zero + long[] bits = this.getBits(); + for (int i = 0; i < bits.length; i++) { + long p64 = bits[i]; + long size = this.prefixLen - 64L * i; + + long mask = 0L; + if (size >= 64) { + mask = 0xFFFFFFFFFFFFFFFFL; + } else if (size < 0) { + mask = 0x0; + } else { + mask = ~(0xFFFFFFFFFFFFFFFFL >>> size); + } + long masked = p64 & mask; + if (p64 != masked) { + return false; + } + } + + return true; + } + + // Parses an IPv6 Address following RFC 4291, with optional zone id following RFC 4007. + boolean address() { + return this.addressPart() && this.index == this.str.length(); + } + + // Parse IPv6 Address Prefix following RFC 4291. Zone id is not permitted. + boolean addressPrefix() { + return this.addressPart() + && !this.zoneIDFound + && this.take('/') + && this.prefixLength() + && this.index == this.str.length(); + } + + // Stores value in prefixLen + private boolean prefixLength() { + int start = this.index; + + while (this.index < this.str.length() && this.digit()) { + if (this.index - start > 3) { + return false; + } + } + + String str = this.str.substring(start, this.index); + + if (str.isEmpty()) { + // too short + return false; + } + + if (str.length() > 1 && str.charAt(0) == '0') { + // bad leading 0 + return false; + } + + try { + int val = Integer.parseInt(str); + + if (val > 128) { + // max 128 bits + return false; + } + + this.prefixLen = val; + return true; + } catch (NumberFormatException nfe) { + // Error converting to number + return false; + } + } + + // Stores dotted notation for right-most 32 bits in dottedRaw / dottedAddr if found. + private boolean addressPart() { + while (this.index < this.str.length()) { + // dotted notation for right-most 32 bits, e.g. 0:0:0:0:0:ffff:192.1.56.10 + if ((this.doubleColonSeen || this.pieces.size() == 6) && this.dotted()) { + Ipv4 dotted = new Ipv4(this.dottedRaw); + if (dotted.address()) { + this.dottedAddr = dotted; + return true; + } + return false; + } + + try { + if (this.h16()) { + continue; + } + } catch (IllegalStateException | NumberFormatException e) { + return false; + } + + if (this.take(':')) { + if (this.take(':')) { + if (this.doubleColonSeen) { + return false; + } + + this.doubleColonSeen = true; + this.doubleColonAt = this.pieces.size(); + if (this.take(':')) { + return false; + } + } else if (this.index == 1 || this.index == this.str.length()) { + // invalid - string cannot start or end on single colon + return false; + } + continue; + } + + if (this.str.charAt(this.index) == '%' && !this.zoneID()) { + return false; + } + + break; + } + + int totalPieces = this.pieces.size(); + if (this.doubleColonSeen) { + return totalPieces < 8; + } + return totalPieces == 8; + } + + /** + * There is no definition for the character set allowed in the zone identifier. RFC 4007 permits + * basically any non-null string. + * + *

RFC 6874: ZoneID = 1*( unreserved / pct-encoded )
+   */
+  private boolean zoneID() {
+    int start = this.index;
+
+    if (this.take('%')) {
+      if (this.str.length() - this.index > 0) {
+        // permit any non-null string
+        this.index = this.str.length();
+        this.zoneIDFound = true;
+
+        return true;
+      }
+    }
+
+    this.index = start;
+    this.zoneIDFound = false;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a dotted address.
+   *
+   * 

Parses the rule: + * + *

1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
+   *
+   * 

Stores match in dottedRaw. + */ + private boolean dotted() { + int start = this.index; + + this.dottedRaw = ""; + + while (this.index < this.str.length() && (this.digit() || this.take('.'))) {} + + if (this.index - start >= 7) { + this.dottedRaw = this.str.substring(start, this.index); + + return true; + } + + this.index = start; + + return false; + } + + /** + * Determines whether the current position is an h16. + * + *

Parses the rule: + * + *

h16 = 1*4HEXDIG
+   *
+   * If 1-4 hex digits are found, the parsed 16-bit unsigned integer is stored
+   * in pieces and true is returned.
+   * If 0 hex digits are found, returns false.
+   * If more than 4 hex digits are found, an IllegalStateException is thrown.
+   * If the found hex digits cannot be converted to an int, a NumberFormatException is raised.
+   */
+  private boolean h16() throws IllegalStateException, NumberFormatException {
+    int start = this.index;
+
+    while (this.index < this.str.length() && this.hexDig()) {}
+
+    String str = this.str.substring(start, this.index);
+
+    if (str.isEmpty()) {
+      // too short, just return false
+      // this is not an error condition, it just means we didn't find any
+      // hex digits at the current position.
+      return false;
+    }
+
+    if (str.length() > 4) {
+      // too long
+      // this is an error condition, it means we found a string of more than
+      // four valid hex digits, which is invalid in ipv6 addresses.
+      throw new IllegalStateException("invalid hex");
+    }
+
+    // Note that this will throw a NumberFormatException if string cannot be
+    // converted to an int.
+    int val = Integer.parseInt(str, 16);
+
+    this.pieces.add(val);
+    return true;
+  }
+
+  /**
+   * Determines whether the current position is a hex digit.
+   *
+   * 

Parses the rule: + * + *

HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
+   */
+  private boolean hexDig() {
+    char c = this.str.charAt(this.index);
+
+    if (('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')) {
+      this.index++;
+
+      return true;
+    }
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a digit.
+   *
+   * 

Parses the rule: + * + *

DIGIT = %x30-39 ; 0-9
+   */
+  private boolean digit() {
+    char c = this.str.charAt(this.index);
+    if ('0' <= c && c <= '9') {
+      this.index++;
+      return true;
+    }
+    return false;
+  }
+
+  /** Take the given char at the current position, incrementing the index if necessary. */
+  private boolean take(char c) {
+    if (this.index >= this.str.length()) {
+      return false;
+    }
+
+    if (this.str.charAt(this.index) == c) {
+      this.index++;
+      return true;
+    }
+
+    return false;
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/ListElementValue.java b/src/main/java/build/buf/protovalidate/ListElementValue.java
new file mode 100644
index 00000000..28f2f066
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/ListElementValue.java
@@ -0,0 +1,78 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import com.google.protobuf.Descriptors;
+import com.google.protobuf.Message;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * The {@link Value} type that contains a field descriptor for repeated field and the value of an
+ * element.
+ */
+final class ListElementValue implements Value {
+  /** Object type since the object type is inferred from the field descriptor. */
+  private final Object value;
+
+  /**
+   * {@link com.google.protobuf.Descriptors.FieldDescriptor} is the field descriptor for the value.
+   */
+  private final Descriptors.FieldDescriptor fieldDescriptor;
+
+  ListElementValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) {
+    this.value = value;
+    this.fieldDescriptor = fieldDescriptor;
+  }
+
+  @Override
+  public Descriptors.@Nullable FieldDescriptor fieldDescriptor() {
+    return fieldDescriptor;
+  }
+
+  @Override
+  public @Nullable MessageReflector messageValue() {
+    if (fieldDescriptor.getJavaType() == Descriptors.FieldDescriptor.JavaType.MESSAGE) {
+      return new ProtobufMessageReflector((Message) value);
+    }
+    return null;
+  }
+
+  @Override
+  public Object celValue() {
+      return ProtoAdapter.scalarToCel(fieldDescriptor.getType(), value);
+  }
+
+  @Override
+  public  T jvmValue(Class clazz) {
+    Descriptors.FieldDescriptor.Type type = fieldDescriptor.getType();
+    if (type == Descriptors.FieldDescriptor.Type.MESSAGE) {
+      return clazz.cast(value);
+    }
+    return clazz.cast(ProtoAdapter.scalarToCel(type, value));
+  }
+
+  @Override
+  public List repeatedValue() {
+    return Collections.emptyList();
+  }
+
+  @Override
+  public Map mapValue() {
+    return Collections.emptyMap();
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/ListEvaluator.java b/src/main/java/build/buf/protovalidate/ListEvaluator.java
new file mode 100644
index 00000000..4702c8fa
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/ListEvaluator.java
@@ -0,0 +1,76 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.protovalidate.exceptions.ExecutionException;
+import build.buf.validate.FieldPath;
+import build.buf.validate.FieldPathElement;
+import build.buf.validate.FieldRules;
+import build.buf.validate.RepeatedRules;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Performs validation on the elements of a repeated field. */
+final class ListEvaluator implements Evaluator {
+  /** Rule path to repeated rules */
+  private static final FieldPath REPEATED_ITEMS_RULE_PATH =
+      FieldPath.newBuilder()
+          .addElements(
+              FieldPathUtils.fieldPathElement(
+                  FieldRules.getDescriptor().findFieldByNumber(FieldRules.REPEATED_FIELD_NUMBER)))
+          .addElements(
+              FieldPathUtils.fieldPathElement(
+                  RepeatedRules.getDescriptor()
+                      .findFieldByNumber(RepeatedRules.ITEMS_FIELD_NUMBER)))
+          .build();
+
+  private final RuleViolationHelper helper;
+
+  /** Rules are checked on every item of the list. */
+  final ValueEvaluator itemRules;
+
+  /** Constructs a {@link ListEvaluator}. */
+  ListEvaluator(ValueEvaluator valueEvaluator) {
+    this.helper = new RuleViolationHelper(valueEvaluator);
+    this.itemRules = new ValueEvaluator(null, REPEATED_ITEMS_RULE_PATH);
+  }
+
+  @Override
+  public boolean tautology() {
+    return itemRules.tautology();
+  }
+
+  @Override
+  public List evaluate(Value val, boolean failFast)
+      throws ExecutionException {
+    List allViolations = new ArrayList<>();
+    List repeatedValues = val.repeatedValue();
+    for (int i = 0; i < repeatedValues.size(); i++) {
+      List violations = itemRules.evaluate(repeatedValues.get(i), failFast);
+      if (violations.isEmpty()) {
+        continue;
+      }
+      FieldPathElement fieldPathElement =
+          Objects.requireNonNull(helper.getFieldPathElement()).toBuilder().setIndex(i).build();
+      FieldPathUtils.updatePaths(violations, fieldPathElement, helper.getRulePrefixElements());
+      if (failFast && !violations.isEmpty()) {
+        return violations;
+      }
+      allViolations.addAll(violations);
+    }
+    return allViolations;
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/MapEvaluator.java b/src/main/java/build/buf/protovalidate/MapEvaluator.java
new file mode 100644
index 00000000..2d930b40
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/MapEvaluator.java
@@ -0,0 +1,178 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.protovalidate.exceptions.ExecutionException;
+import build.buf.validate.FieldPath;
+import build.buf.validate.FieldPathElement;
+import build.buf.validate.FieldRules;
+import build.buf.validate.MapRules;
+import com.google.protobuf.Descriptors;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Performs validation on a map field's key-value pairs. */
+final class MapEvaluator implements Evaluator {
+  /** Rule path to map key rules */
+  private static final FieldPath MAP_KEYS_RULE_PATH =
+      FieldPath.newBuilder()
+          .addElements(
+              FieldPathUtils.fieldPathElement(
+                  FieldRules.getDescriptor().findFieldByNumber(FieldRules.MAP_FIELD_NUMBER)))
+          .addElements(
+              FieldPathUtils.fieldPathElement(
+                  MapRules.getDescriptor().findFieldByNumber(MapRules.KEYS_FIELD_NUMBER)))
+          .build();
+
+  /** Rule path to map value rules */
+  private static final FieldPath MAP_VALUES_RULE_PATH =
+      FieldPath.newBuilder()
+          .addElements(
+              FieldPathUtils.fieldPathElement(
+                  FieldRules.getDescriptor().findFieldByNumber(FieldRules.MAP_FIELD_NUMBER)))
+          .addElements(
+              FieldPathUtils.fieldPathElement(
+                  MapRules.getDescriptor().findFieldByNumber(MapRules.VALUES_FIELD_NUMBER)))
+          .build();
+
+  private final RuleViolationHelper helper;
+
+  /** Rule for checking the map keys */
+  private final ValueEvaluator keyEvaluator;
+
+  /** Rule for checking the map values */
+  private final ValueEvaluator valueEvaluator;
+
+  /** Field descriptor of the map field */
+  final Descriptors.FieldDescriptor fieldDescriptor;
+
+  /** Field descriptor of the map key field */
+  final Descriptors.FieldDescriptor keyFieldDescriptor;
+
+  /** Field descriptor of the map value field */
+  final Descriptors.FieldDescriptor valueFieldDescriptor;
+
+  /**
+   * Constructs a {@link MapEvaluator}.
+   *
+   * @param valueEvaluator The value evaluator this rule exists under.
+   */
+  MapEvaluator(ValueEvaluator valueEvaluator, Descriptors.FieldDescriptor fieldDescriptor) {
+    this.helper = new RuleViolationHelper(valueEvaluator);
+    this.keyEvaluator = new ValueEvaluator(null, MAP_KEYS_RULE_PATH);
+    this.valueEvaluator = new ValueEvaluator(null, MAP_VALUES_RULE_PATH);
+    this.fieldDescriptor = fieldDescriptor;
+    this.keyFieldDescriptor = fieldDescriptor.getMessageType().findFieldByNumber(1);
+    this.valueFieldDescriptor = fieldDescriptor.getMessageType().findFieldByNumber(2);
+  }
+
+  /**
+   * Gets the key evaluator associated with this map evaluator.
+   *
+   * @return The key evaluator.
+   */
+  ValueEvaluator getKeyEvaluator() {
+    return keyEvaluator;
+  }
+
+  /**
+   * Gets the value evaluator associated with this map evaluator.
+   *
+   * @return The value evaluator.
+   */
+  ValueEvaluator getValueEvaluator() {
+    return valueEvaluator;
+  }
+
+  @Override
+  public boolean tautology() {
+    return keyEvaluator.tautology() && valueEvaluator.tautology();
+  }
+
+  @Override
+  public List evaluate(Value val, boolean failFast)
+      throws ExecutionException {
+    List violations = new ArrayList<>();
+    Map mapValue = val.mapValue();
+    for (Map.Entry entry : mapValue.entrySet()) {
+      violations.addAll(evalPairs(entry.getKey(), entry.getValue(), failFast));
+      if (failFast && !violations.isEmpty()) {
+        return violations;
+      }
+    }
+    if (violations.isEmpty()) {
+      return RuleViolation.NO_VIOLATIONS;
+    }
+    return violations;
+  }
+
+  private List evalPairs(Value key, Value value, boolean failFast)
+      throws ExecutionException {
+    List keyViolations =
+        keyEvaluator.evaluate(key, failFast).stream()
+            .map(violation -> violation.setForKey(true))
+            .collect(Collectors.toList());
+    final List valueViolations;
+    if (failFast && !keyViolations.isEmpty()) {
+      // Don't evaluate value rules if failFast is enabled and keys failed validation.
+      // We still need to continue execution to the end to properly prefix violation field paths.
+      valueViolations = RuleViolation.NO_VIOLATIONS;
+    } else {
+      valueViolations = valueEvaluator.evaluate(value, failFast);
+    }
+    if (keyViolations.isEmpty() && valueViolations.isEmpty()) {
+      return Collections.emptyList();
+    }
+    List violations =
+        new ArrayList<>(keyViolations.size() + valueViolations.size());
+    violations.addAll(keyViolations);
+    violations.addAll(valueViolations);
+
+    FieldPathElement.Builder fieldPathElementBuilder =
+        Objects.requireNonNull(helper.getFieldPathElement()).toBuilder();
+    fieldPathElementBuilder.setKeyType(keyFieldDescriptor.getType().toProto());
+    fieldPathElementBuilder.setValueType(valueFieldDescriptor.getType().toProto());
+    switch (keyFieldDescriptor.getType().toProto()) {
+      case TYPE_INT64:
+      case TYPE_INT32:
+      case TYPE_SINT32:
+      case TYPE_SINT64:
+      case TYPE_SFIXED32:
+      case TYPE_SFIXED64:
+        fieldPathElementBuilder.setIntKey(key.jvmValue(Number.class).longValue());
+        break;
+      case TYPE_UINT32:
+      case TYPE_UINT64:
+      case TYPE_FIXED32:
+      case TYPE_FIXED64:
+        fieldPathElementBuilder.setUintKey(key.jvmValue(Number.class).longValue());
+        break;
+      case TYPE_BOOL:
+        fieldPathElementBuilder.setBoolKey(key.jvmValue(Boolean.class));
+        break;
+      case TYPE_STRING:
+        fieldPathElementBuilder.setStringKey(key.jvmValue(String.class));
+        break;
+      default:
+        throw new ExecutionException("Unexpected map key type");
+    }
+    FieldPathElement fieldPathElement = fieldPathElementBuilder.build();
+    return FieldPathUtils.updatePaths(violations, fieldPathElement, helper.getRulePrefixElements());
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java b/src/main/java/build/buf/protovalidate/MessageEvaluator.java
similarity index 62%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java
rename to src/main/java/build/buf/protovalidate/MessageEvaluator.java
index aa51b0ae..07a58a7f 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageEvaluator.java
+++ b/src/main/java/build/buf/protovalidate/MessageEvaluator.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,17 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
-import build.buf.protovalidate.ValidationResult;
-import build.buf.protovalidate.Value;
 import build.buf.protovalidate.exceptions.ExecutionException;
-import build.buf.validate.Violation;
 import java.util.ArrayList;
 import java.util.List;
 
 /** Performs validation on a {@link com.google.protobuf.Message}. */
-class MessageEvaluator implements Evaluator {
+final class MessageEvaluator implements Evaluator {
   /** List of {@link Evaluator}s that are applied to a message. */
   private final List evaluators = new ArrayList<>();
 
@@ -37,19 +34,20 @@ public boolean tautology() {
   }
 
   @Override
-  public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException {
-    List violations = new ArrayList<>();
+  public List evaluate(Value val, boolean failFast)
+      throws ExecutionException {
+    List allViolations = new ArrayList<>();
     for (Evaluator evaluator : evaluators) {
-      ValidationResult evalResult = evaluator.evaluate(val, failFast);
-      if (failFast && !evalResult.getViolations().isEmpty()) {
-        return evalResult;
+      List violations = evaluator.evaluate(val, failFast);
+      if (failFast && !violations.isEmpty()) {
+        return violations;
       }
-      violations.addAll(evalResult.getViolations());
+      allViolations.addAll(violations);
     }
-    if (violations.isEmpty()) {
-      return ValidationResult.EMPTY;
+    if (allViolations.isEmpty()) {
+      return RuleViolation.NO_VIOLATIONS;
     }
-    return new ValidationResult(violations);
+    return allViolations;
   }
 
   /**
@@ -57,7 +55,7 @@ public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionEx
    *
    * @param eval The evaluator to append.
    */
-  public void append(Evaluator eval) {
+  void append(Evaluator eval) {
     evaluators.add(eval);
   }
 }
diff --git a/src/main/java/build/buf/protovalidate/MessageOneofEvaluator.java b/src/main/java/build/buf/protovalidate/MessageOneofEvaluator.java
new file mode 100644
index 00000000..c5edf0d5
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/MessageOneofEvaluator.java
@@ -0,0 +1,76 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.protovalidate.exceptions.ExecutionException;
+import com.google.protobuf.Descriptors.FieldDescriptor;
+import com.google.protobuf.Message;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * A specialized {@link Evaluator} for applying {@code buf.validate.MessageOneofRule} to a {@link
+ * com.google.protobuf.Message}.
+ */
+final class MessageOneofEvaluator implements Evaluator {
+  /** List of fields that are part of the oneof */
+  final List fields;
+
+  /** If at least one must be set. */
+  final boolean required;
+
+  MessageOneofEvaluator(List fields, boolean required) {
+    this.fields = fields;
+    this.required = required;
+  }
+
+  @Override
+  public boolean tautology() {
+    return false;
+  }
+
+  @Override
+  public List evaluate(Value val, boolean failFast)
+      throws ExecutionException {
+    MessageReflector msg = val.messageValue();
+    if (msg == null) {
+      return RuleViolation.NO_VIOLATIONS;
+    }
+    int hasCount = 0;
+    for (FieldDescriptor field : fields) {
+      if (msg.hasField(field)) {
+        hasCount++;
+      }
+    }
+    if (hasCount > 1) {
+      return Collections.singletonList(
+          RuleViolation.newBuilder()
+              .setRuleId("message.oneof")
+              .setMessage(String.format("only one of %s can be set", fieldNames())));
+    }
+    if (this.required && hasCount == 0) {
+      return Collections.singletonList(
+          RuleViolation.newBuilder()
+              .setRuleId("message.oneof")
+              .setMessage(String.format("one of %s must be set", fieldNames())));
+    }
+    return Collections.emptyList();
+  }
+
+  String fieldNames() {
+    return fields.stream().map(FieldDescriptor::getName).collect(Collectors.joining(", "));
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/MessageReflector.java b/src/main/java/build/buf/protovalidate/MessageReflector.java
index 552894f6..bb0b445a 100644
--- a/src/main/java/build/buf/protovalidate/MessageReflector.java
+++ b/src/main/java/build/buf/protovalidate/MessageReflector.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java b/src/main/java/build/buf/protovalidate/MessageValue.java
similarity index 74%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java
rename to src/main/java/build/buf/protovalidate/MessageValue.java
index ce52b2de..246820f2 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/MessageValue.java
+++ b/src/main/java/build/buf/protovalidate/MessageValue.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,19 +12,19 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
-import build.buf.protovalidate.MessageReflector;
-import build.buf.protovalidate.Value;
+import com.google.protobuf.Descriptors;
 import com.google.protobuf.Message;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import javax.annotation.Nullable;
+import org.jspecify.annotations.Nullable;
 
 /** The {@link Value} type that contains a {@link com.google.protobuf.Message}. */
-public final class MessageValue implements Value {
+final class MessageValue implements Value {
 
+  /** Object type since the object type is inferred from the field descriptor. */
   private final ProtobufMessageReflector value;
 
   /**
@@ -32,24 +32,28 @@ public final class MessageValue implements Value {
    *
    * @param value The message value.
    */
-  public MessageValue(Message value) {
+  MessageValue(Message value) {
     this.value = new ProtobufMessageReflector(value);
   }
 
+  @Override
+  public Descriptors.@Nullable FieldDescriptor fieldDescriptor() {
+    return null;
+  }
+
   @Override
   public MessageReflector messageValue() {
     return value;
   }
 
   @Override
-  @Nullable
-  public  T jvmValue(Class clazz) {
-    return null;
+  public Object celValue() {
+      return value.getMessage();
   }
 
   @Override
-  public Object celValue() {
-    return value.getMessage();
+  public  T jvmValue(Class clazz) {
+    throw new UnsupportedOperationException();
   }
 
   @Override
diff --git a/src/main/java/build/buf/protovalidate/NowVariable.java b/src/main/java/build/buf/protovalidate/NowVariable.java
new file mode 100644
index 00000000..27e5f933
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/NowVariable.java
@@ -0,0 +1,52 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import com.google.protobuf.Timestamp;
+import dev.cel.runtime.CelVariableResolver;
+import java.time.Instant;
+import java.util.Optional;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * {@link NowVariable} implements {@link CelVariableResolver}, providing a lazily produced timestamp
+ * for accessing the variable `now` that's constant within an evaluation.
+ */
+final class NowVariable implements CelVariableResolver {
+  /** The name of the 'now' variable. */
+  static final String NOW_NAME = "now";
+
+  /** The resolved value of the 'now' variable. */
+  @Nullable private Timestamp now;
+
+  /** Creates an instance of a "now" variable. */
+  NowVariable() {}
+
+  @Override
+  public Optional find(String name) {
+    if (!name.equals(NOW_NAME)) {
+      return Optional.empty();
+    }
+    if (this.now == null) {
+      Instant nowInstant = Instant.now();
+      now =
+          Timestamp.newBuilder()
+              .setSeconds(nowInstant.getEpochSecond())
+              .setNanos(nowInstant.getNano())
+              .build();
+    }
+    return Optional.of(this.now);
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/FieldValue.java b/src/main/java/build/buf/protovalidate/ObjectValue.java
similarity index 62%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/FieldValue.java
rename to src/main/java/build/buf/protovalidate/ObjectValue.java
index 8ff12de6..a97fa922 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/FieldValue.java
+++ b/src/main/java/build/buf/protovalidate/ObjectValue.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,10 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
-import build.buf.protovalidate.MessageReflector;
-import build.buf.protovalidate.Value;
 import com.google.protobuf.AbstractMessage;
 import com.google.protobuf.Descriptors;
 import com.google.protobuf.Message;
@@ -24,11 +22,10 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.annotation.Nullable;
-import org.projectnessie.cel.common.ULong;
+import org.jspecify.annotations.Nullable;
 
 /** The {@link Value} type that contains a field descriptor and its value. */
-public final class FieldValue implements Value {
+final class ObjectValue implements Value {
 
   /**
    * {@link com.google.protobuf.Descriptors.FieldDescriptor} is the field descriptor for the value.
@@ -39,54 +36,41 @@ public final class FieldValue implements Value {
   private final Object value;
 
   /**
-   * Constructs a new {@link FieldValue}.
+   * Constructs a new {@link ObjectValue}.
    *
    * @param fieldDescriptor The field descriptor for the value.
    * @param value The value associated with the field descriptor.
    */
-  FieldValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) {
+  ObjectValue(Descriptors.FieldDescriptor fieldDescriptor, Object value) {
     this.fieldDescriptor = fieldDescriptor;
     this.value = value;
   }
 
   @Override
+  public Descriptors.FieldDescriptor fieldDescriptor() {
+    return fieldDescriptor;
+  }
+
   @Nullable
+  @Override
   public MessageReflector messageValue() {
-    if (fieldDescriptor.getType() == Descriptors.FieldDescriptor.Type.MESSAGE) {
+    if (fieldDescriptor.getJavaType() == Descriptors.FieldDescriptor.JavaType.MESSAGE) {
       return new ProtobufMessageReflector((Message) value);
     }
     return null;
   }
 
   @Override
-  public  T jvmValue(Class clazz) {
-    if (value instanceof Descriptors.EnumValueDescriptor) {
-      return clazz.cast(((Descriptors.EnumValueDescriptor) value).getNumber());
-    }
-    return clazz.cast(value);
+  public Object celValue() {
+      return ProtoAdapter.toCel(fieldDescriptor, value);
   }
 
   @Override
-  public Object celValue() {
+  public  T jvmValue(Class clazz) {
     if (value instanceof Descriptors.EnumValueDescriptor) {
-      return ((Descriptors.EnumValueDescriptor) value).getNumber();
-    }
-    Descriptors.FieldDescriptor.Type type = fieldDescriptor.getType();
-    if (!fieldDescriptor.isRepeated()
-        && (type == Descriptors.FieldDescriptor.Type.UINT32
-            || type == Descriptors.FieldDescriptor.Type.UINT64
-            || type == Descriptors.FieldDescriptor.Type.FIXED32
-            || type == Descriptors.FieldDescriptor.Type.FIXED64)) {
-      /*
-       * Java does not have native support for unsigned int/long or uint32/uint64 types.
-       * To work with CEL's uint type in Java, special handling is required.
-       *
-       * When using uint32/uint64 in your protobuf objects or CEL expressions in Java,
-       * wrap them with the org.projectnessie.cel.common.ULong type.
-       */
-      return ULong.valueOf(((Number) value).longValue());
+      return clazz.cast(((Descriptors.EnumValueDescriptor) value).getNumber());
     }
-    return value;
+    return clazz.cast(ProtoAdapter.toCel(fieldDescriptor, value));
   }
 
   @Override
@@ -95,7 +79,7 @@ public List repeatedValue() {
     if (fieldDescriptor.isRepeated()) {
       List list = (List) value;
       for (Object o : list) {
-        out.add(new FieldValue(fieldDescriptor, o));
+        out.add(new ListElementValue(fieldDescriptor, o));
       }
     }
     return out;
@@ -113,10 +97,10 @@ public Map mapValue() {
     Map out = new HashMap<>(input.size());
     for (AbstractMessage entry : input) {
       Object keyValue = entry.getField(keyDesc);
-      Value keyJavaValue = new FieldValue(keyDesc, keyValue);
+      Value keyJavaValue = new ObjectValue(keyDesc, keyValue);
 
       Object valValue = entry.getField(valDesc);
-      Value valJavaValue = new FieldValue(valDesc, valValue);
+      Value valJavaValue = new ObjectValue(valDesc, valValue);
 
       out.put(keyJavaValue, valJavaValue);
     }
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java b/src/main/java/build/buf/protovalidate/OneofEvaluator.java
similarity index 62%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java
rename to src/main/java/build/buf/protovalidate/OneofEvaluator.java
index 269f8a8f..88012505 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/OneofEvaluator.java
+++ b/src/main/java/build/buf/protovalidate/OneofEvaluator.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,18 +12,17 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
-import build.buf.protovalidate.MessageReflector;
-import build.buf.protovalidate.ValidationResult;
-import build.buf.protovalidate.Value;
 import build.buf.protovalidate.exceptions.ExecutionException;
-import build.buf.validate.Violation;
+import build.buf.validate.FieldPathElement;
 import com.google.protobuf.Descriptors.OneofDescriptor;
+import com.google.protobuf.Message;
 import java.util.Collections;
+import java.util.List;
 
 /** {@link OneofEvaluator} performs validation on a oneof union. */
-public class OneofEvaluator implements Evaluator {
+final class OneofEvaluator implements Evaluator {
   /** The {@link OneofDescriptor} targeted by this evaluator. */
   private final OneofDescriptor descriptor;
 
@@ -36,7 +35,7 @@ public class OneofEvaluator implements Evaluator {
    * @param descriptor The targeted oneof descriptor.
    * @param required Indicates whether a member of the oneof must be set.
    */
-  public OneofEvaluator(OneofDescriptor descriptor, boolean required) {
+  OneofEvaluator(OneofDescriptor descriptor, boolean required) {
     this.descriptor = descriptor;
     this.required = required;
   }
@@ -47,21 +46,21 @@ public boolean tautology() {
   }
 
   @Override
-  public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException {
+  public List evaluate(Value val, boolean failFast)
+      throws ExecutionException {
     MessageReflector message = val.messageValue();
     if (message == null) {
-      return ValidationResult.EMPTY;
+        return RuleViolation.NO_VIOLATIONS;
     }
     boolean hasField = descriptor.getFields().stream().anyMatch(message::hasField);
-    if (required && !hasField) {
-      return new ValidationResult(
-          Collections.singletonList(
-              Violation.newBuilder()
-                  .setFieldPath(descriptor.getName())
-                  .setConstraintId("required")
-                  .setMessage("exactly one field is required in oneof")
-                  .build()));
+    if (!required || hasField) {
+      return RuleViolation.NO_VIOLATIONS;
     }
-    return ValidationResult.EMPTY;
+    return Collections.singletonList(
+        RuleViolation.newBuilder()
+            .addFirstFieldPathElement(
+                FieldPathElement.newBuilder().setFieldName(descriptor.getName()).build())
+            .setRuleId("required")
+            .setMessage("exactly one field is required in oneof"));
   }
 }
diff --git a/src/main/java/build/buf/protovalidate/ProtoAdapter.java b/src/main/java/build/buf/protovalidate/ProtoAdapter.java
new file mode 100644
index 00000000..b142d594
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/ProtoAdapter.java
@@ -0,0 +1,90 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import com.google.common.primitives.UnsignedLong;
+import com.google.protobuf.AbstractMessage;
+import com.google.protobuf.Descriptors;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * CEL supports protobuf natively but when we pass it field values (like scalars, repeated, and
+ * maps) it has no way to treat them like a proto message field. This class has methods to convert
+ * to a cel values.
+ */
+final class ProtoAdapter {
+  /** Converts a protobuf field value to CEL compatible value. */
+  static Object toCel(Descriptors.FieldDescriptor fieldDescriptor, Object value) {
+    Descriptors.FieldDescriptor.Type type = fieldDescriptor.getType();
+    if (fieldDescriptor.isMapField()) {
+      List input =
+          value instanceof List
+              ? (List) value
+              : Collections.singletonList((AbstractMessage) value);
+      Descriptors.FieldDescriptor keyDesc = fieldDescriptor.getMessageType().findFieldByNumber(1);
+      Descriptors.FieldDescriptor valDesc = fieldDescriptor.getMessageType().findFieldByNumber(2);
+      Map out = new HashMap<>(input.size());
+
+      for (AbstractMessage entry : input) {
+        Object keyValue = entry.getField(keyDesc);
+        Object valValue = entry.getField(valDesc);
+        out.put(toCel(keyDesc, keyValue), toCel(valDesc, valValue));
+      }
+      return out;
+    }
+    // Cel understands protobuf message so we return as is (even if it is repeated).
+    if (type == Descriptors.FieldDescriptor.Type.MESSAGE) {
+      return value;
+    }
+    if (fieldDescriptor.isRepeated()) {
+      List out = new ArrayList<>();
+      List list = (List) value;
+      for (Object element : list) {
+        out.add(scalarToCel(type, element));
+      }
+      return out;
+    }
+    return scalarToCel(type, value);
+  }
+
+  /** Converts a scalar type to cel value. */
+  static Object scalarToCel(Descriptors.FieldDescriptor.Type type, Object value) {
+    switch (type) {
+      case ENUM:
+        if (value instanceof Descriptors.EnumValueDescriptor) {
+          return (long) ((Descriptors.EnumValueDescriptor) value).getNumber();
+        }
+        return value;
+      case FLOAT:
+        return Double.valueOf((Float) value);
+      case INT32:
+      case SINT32:
+      case SFIXED32:
+        return Long.valueOf((Integer) value);
+      case FIXED32:
+      case UINT32:
+        return UnsignedLong.fromLongBits(Long.valueOf((Integer) value));
+      case UINT64:
+      case FIXED64:
+        return UnsignedLong.fromLongBits((Long) value);
+      default:
+        return value;
+    }
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java b/src/main/java/build/buf/protovalidate/ProtobufMessageReflector.java
similarity index 81%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java
rename to src/main/java/build/buf/protovalidate/ProtobufMessageReflector.java
index e76d1946..4d44b92d 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/ProtobufMessageReflector.java
+++ b/src/main/java/build/buf/protovalidate/ProtobufMessageReflector.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,10 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
-import build.buf.protovalidate.MessageReflector;
-import build.buf.protovalidate.Value;
 import com.google.protobuf.Descriptors.FieldDescriptor;
 import com.google.protobuf.Message;
 
@@ -37,6 +35,6 @@ public boolean hasField(FieldDescriptor field) {
 
   @Override
   public Value getField(FieldDescriptor field) {
-    return new FieldValue(field, message.getField(field));
+    return new ObjectValue(field, message.getField(field));
   }
 }
diff --git a/src/main/java/build/buf/protovalidate/RuleCache.java b/src/main/java/build/buf/protovalidate/RuleCache.java
new file mode 100644
index 00000000..6c39852e
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/RuleCache.java
@@ -0,0 +1,317 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.protovalidate.exceptions.CompilationException;
+import build.buf.validate.FieldPath;
+import build.buf.validate.FieldRules;
+import build.buf.validate.ValidateProto;
+import com.google.protobuf.DescriptorProtos;
+import com.google.protobuf.Descriptors;
+import com.google.protobuf.Descriptors.FieldDescriptor;
+import com.google.protobuf.DynamicMessage;
+import com.google.protobuf.ExtensionRegistry;
+import com.google.protobuf.InvalidProtocolBufferException;
+import com.google.protobuf.Message;
+import com.google.protobuf.MessageLite;
+import com.google.protobuf.TypeRegistry;
+import dev.cel.bundle.Cel;
+import dev.cel.common.types.StructTypeReference;
+import dev.cel.runtime.CelEvaluationException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import org.jspecify.annotations.Nullable;
+
+/** A build-through cache for computed standard rules. */
+final class RuleCache {
+  private static class CelRule {
+    final AstExpression astExpression;
+    final FieldDescriptor field;
+    final FieldPath rulePath;
+
+    private CelRule(AstExpression astExpression, FieldDescriptor field, FieldPath rulePath) {
+      this.astExpression = astExpression;
+      this.field = field;
+      this.rulePath = rulePath;
+    }
+  }
+
+  private static final ExtensionRegistry EXTENSION_REGISTRY = ExtensionRegistry.newInstance();
+
+  static {
+    EXTENSION_REGISTRY.add(ValidateProto.predefined);
+  }
+
+  /**
+   * Concurrent map for caching {@link FieldDescriptor} and their associated List of {@link
+   * AstExpression}.
+   */
+  private static final Map> descriptorMap =
+      new ConcurrentHashMap<>();
+
+  /** The environment to use for evaluation. */
+  private final Cel cel;
+
+  /** Registry used to resolve dynamic messages. */
+  private final TypeRegistry typeRegistry;
+
+  /** Registry used to resolve dynamic extensions. */
+  private final ExtensionRegistry extensionRegistry;
+
+  /** Whether to allow unknown rule fields or not. */
+  private final boolean allowUnknownFields;
+
+  /**
+   * Constructs a new build-through cache for the standard rules, with a provided registry to
+   * resolve dynamic extensions.
+   *
+   * @param cel The CEL environment for evaluation.
+   * @param config The configuration to use for the rule cache.
+   */
+  RuleCache(Cel cel, Config config) {
+    this.cel = cel;
+    this.typeRegistry = config.getTypeRegistry();
+    this.extensionRegistry = config.getExtensionRegistry();
+    this.allowUnknownFields = config.isAllowingUnknownFields();
+  }
+
+  /**
+   * Creates the standard rules for the given field. If forItems is true, the rules for repeated
+   * list items is built instead of the rules on the list itself.
+   *
+   * @param fieldDescriptor The field descriptor to be validated.
+   * @param fieldRules The field rule that is used for validation.
+   * @param forItems The field is an item list type.
+   * @return The list of compiled programs.
+   * @throws CompilationException If the rules fail to compile.
+   */
+  List compile(
+      FieldDescriptor fieldDescriptor, FieldRules fieldRules, boolean forItems)
+      throws CompilationException {
+    ResolvedRule resolved = resolveRules(fieldDescriptor, fieldRules, forItems);
+    if (resolved == null) {
+      // Message null means there were no rules resolved.
+      return Collections.emptyList();
+    }
+    Message message = resolved.message;
+    List completeProgramList = new ArrayList<>();
+    for (Map.Entry entry : message.getAllFields().entrySet()) {
+      FieldDescriptor ruleFieldDesc = entry.getKey();
+      List programList =
+          compileRule(fieldDescriptor, forItems, resolved.setOneof, ruleFieldDesc, message);
+      if (programList == null) continue;
+      completeProgramList.addAll(programList);
+    }
+    List programs = new ArrayList<>();
+    for (CelRule rule : completeProgramList) {
+      Cel ruleCel = getRuleCel(fieldDescriptor, message, rule.field, forItems);
+      try {
+        programs.add(
+            new CompiledProgram(
+                ruleCel.createProgram(rule.astExpression.ast),
+                rule.astExpression.source,
+                rule.rulePath,
+                new ObjectValue(rule.field, message.getField(rule.field)),
+                Variable.newRuleVariable(
+                    message, ProtoAdapter.toCel(rule.field, message.getField(rule.field)))));
+      } catch (CelEvaluationException e) {
+        throw new CompilationException(
+            "failed to evaluate rule " + rule.astExpression.source.id, e);
+      }
+    }
+    return Collections.unmodifiableList(programs);
+  }
+
+  private @Nullable List compileRule(
+      FieldDescriptor fieldDescriptor,
+      boolean forItems,
+      FieldDescriptor setOneof,
+      FieldDescriptor ruleFieldDesc,
+      Message message)
+      throws CompilationException {
+    List celRules = descriptorMap.get(fieldDescriptor);
+    if (celRules != null) {
+      return celRules;
+    }
+    build.buf.validate.PredefinedRules rules = getFieldRules(ruleFieldDesc);
+    if (rules == null) return null;
+    List expressions = Expression.fromRules(rules.getCelList());
+    celRules = new ArrayList<>(expressions.size());
+    Cel ruleCel = getRuleCel(fieldDescriptor, message, ruleFieldDesc, forItems);
+    for (Expression expression : expressions) {
+      FieldPath rulePath =
+          FieldPath.newBuilder()
+              .addElements(FieldPathUtils.fieldPathElement(setOneof))
+              .addElements(FieldPathUtils.fieldPathElement(ruleFieldDesc))
+              .build();
+      celRules.add(
+          new CelRule(
+              AstExpression.newAstExpression(ruleCel, expression), ruleFieldDesc, rulePath));
+    }
+    descriptorMap.put(ruleFieldDesc, celRules);
+    return celRules;
+  }
+
+  private build.buf.validate.@Nullable PredefinedRules getFieldRules(FieldDescriptor ruleFieldDesc)
+      throws CompilationException {
+    DescriptorProtos.FieldOptions options = ruleFieldDesc.getOptions();
+    // If the protovalidate field option is unknown, reparse options using our extension registry.
+    if (options.getUnknownFields().hasField(ValidateProto.predefined.getNumber())) {
+      try {
+        options =
+            DescriptorProtos.FieldOptions.parseFrom(options.toByteString(), EXTENSION_REGISTRY);
+      } catch (InvalidProtocolBufferException e) {
+        throw new CompilationException("Failed to parse field options", e);
+      }
+    }
+    if (!options.hasExtension(ValidateProto.predefined)) {
+      return null;
+    }
+    Object extensionValue = options.getField(ValidateProto.predefined.getDescriptor());
+    build.buf.validate.PredefinedRules rules;
+    if (extensionValue instanceof build.buf.validate.PredefinedRules) {
+      rules = (build.buf.validate.PredefinedRules) extensionValue;
+    } else if (extensionValue instanceof MessageLite) {
+      // Extension is parsed but with different gencode. We need to reparse it.
+      try {
+        rules =
+            build.buf.validate.PredefinedRules.parseFrom(
+                ((MessageLite) extensionValue).toByteString());
+      } catch (InvalidProtocolBufferException e) {
+        throw new CompilationException("Failed to parse field rules", e);
+      }
+    } else {
+      // Extension was not a message, just discard it.
+      return null;
+    }
+    return rules;
+  }
+
+  /**
+   * Calculates the environment for a specific rule invocation.
+   *
+   * @param fieldDescriptor The field descriptor of the field with the rule.
+   * @param ruleMessage The message of the standard rules.
+   * @param ruleFieldDesc The field descriptor of the rule.
+   * @param forItems Whether the field is a list type or not.
+   * @return An environment with requisite declarations and types added.
+   */
+  private Cel getRuleCel(
+      FieldDescriptor fieldDescriptor,
+      Message ruleMessage,
+      FieldDescriptor ruleFieldDesc,
+      boolean forItems) {
+    return cel.toCelBuilder()
+        .addMessageTypes(ruleMessage.getDescriptorForType())
+        .addVar(Variable.THIS_NAME, DescriptorMappings.getCELType(fieldDescriptor, forItems))
+        .addVar(
+            Variable.RULES_NAME,
+            StructTypeReference.create(ruleMessage.getDescriptorForType().getFullName()))
+        .addVar(Variable.RULE_NAME, DescriptorMappings.getCELType(ruleFieldDesc, false))
+        .build();
+  }
+
+  private static class ResolvedRule {
+    final Message message;
+    final FieldDescriptor setOneof;
+
+    ResolvedRule(Message message, FieldDescriptor setOneof) {
+      this.message = message;
+      this.setOneof = setOneof;
+    }
+  }
+
+  /**
+   * Extracts the standard rules for the specified field. An exception is thrown if the wrong rules
+   * are applied to a field (typically if there is a type-mismatch). Null is returned if there are
+   * no standard rules to apply to this field.
+   */
+  @Nullable
+  private ResolvedRule resolveRules(
+      FieldDescriptor fieldDescriptor, FieldRules fieldRules, boolean forItems)
+      throws CompilationException {
+    // Get the oneof field descriptor from the field rules.
+    FieldDescriptor oneofFieldDescriptor =
+        fieldRules.getOneofFieldDescriptor(DescriptorMappings.FIELD_RULES_ONEOF_DESC);
+    if (oneofFieldDescriptor == null) {
+      // If the oneof field descriptor is null there are no rules to resolve.
+      return null;
+    }
+
+    // Get the expected rule descriptor based on the provided field descriptor and the flag
+    // indicating whether it is for items.
+    FieldDescriptor expectedRuleDescriptor =
+        DescriptorMappings.getExpectedRuleDescriptor(fieldDescriptor, forItems);
+
+    if (expectedRuleDescriptor != null
+        && !oneofFieldDescriptor.getFullName().equals(expectedRuleDescriptor.getFullName())) {
+      // If the expected rule does not match the actual oneof rule, throw a
+      // CompilationError.
+      throw new CompilationException(
+          String.format(
+              "expected rule %s, got %s on field %s",
+              expectedRuleDescriptor.getName(),
+              oneofFieldDescriptor.getName(),
+              fieldDescriptor.getName()));
+    }
+
+    // If the expected rule descriptor is null or if the field rules do not have the
+    // oneof field descriptor there are no rules to resolve, so return null.
+    if (expectedRuleDescriptor == null || !fieldRules.hasField(oneofFieldDescriptor)) {
+      if (expectedRuleDescriptor == null) {
+        // The only expected rule descriptor for message fields is for well known types.
+        // If we didn't find a descriptor and this is a message, there must be a mismatch.
+        if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
+          throw new CompilationException(
+              String.format(
+                  "mismatched message rules, %s is not a valid rule for field %s",
+                  oneofFieldDescriptor.getName(), fieldDescriptor.getName()));
+        }
+      }
+
+      return null;
+    }
+
+    // Get the field from the field rules identified by the oneof field descriptor, casted
+    // as a Message.
+    Message typeRules = (Message) fieldRules.getField(oneofFieldDescriptor);
+    if (!typeRules.getUnknownFields().isEmpty()) {
+      // If there are unknown fields, try to resolve them using the provided registries. Note that
+      // we use the type registry to resolve the message descriptor. This is because Java protobuf
+      // extension resolution relies on descriptor identity. The user's provided type registry can
+      // provide matching message descriptors for the user's provided extension registry. See the
+      // documentation for Options.setTypeRegistry for more information.
+      Descriptors.Descriptor expectedRuleMessageDescriptor =
+          typeRegistry.find(expectedRuleDescriptor.getMessageType().getFullName());
+      if (expectedRuleMessageDescriptor == null) {
+        expectedRuleMessageDescriptor = expectedRuleDescriptor.getMessageType();
+      }
+      try {
+        typeRules =
+            DynamicMessage.parseFrom(
+                expectedRuleMessageDescriptor, typeRules.toByteString(), extensionRegistry);
+      } catch (InvalidProtocolBufferException e) {
+        throw new RuntimeException(e);
+      }
+    }
+    if (!allowUnknownFields && !typeRules.getUnknownFields().isEmpty()) {
+      throw new CompilationException("unrecognized field rules");
+    }
+    return new ResolvedRule(typeRules, oneofFieldDescriptor);
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ConstraintResolver.java b/src/main/java/build/buf/protovalidate/RuleResolver.java
similarity index 65%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/ConstraintResolver.java
rename to src/main/java/build/buf/protovalidate/RuleResolver.java
index b94cfb8e..4901ab1a 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/ConstraintResolver.java
+++ b/src/main/java/build/buf/protovalidate/RuleResolver.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,12 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
 import build.buf.protovalidate.exceptions.CompilationException;
-import build.buf.validate.FieldConstraints;
-import build.buf.validate.MessageConstraints;
-import build.buf.validate.OneofConstraints;
+import build.buf.validate.FieldRules;
+import build.buf.validate.MessageRules;
+import build.buf.validate.OneofRules;
 import build.buf.validate.ValidateProto;
 import com.google.protobuf.DescriptorProtos;
 import com.google.protobuf.Descriptors.Descriptor;
@@ -27,8 +27,8 @@
 import com.google.protobuf.InvalidProtocolBufferException;
 import com.google.protobuf.MessageLite;
 
-/** Manages the resolution of protovalidate constraints. */
-class ConstraintResolver {
+/** Manages the resolution of protovalidate rules. */
+final class RuleResolver {
   private static final ExtensionRegistry EXTENSION_REGISTRY = ExtensionRegistry.newInstance();
 
   static {
@@ -38,12 +38,12 @@ class ConstraintResolver {
   }
 
   /**
-   * Resolves the constraints for a message descriptor.
+   * Resolves the rules for a message descriptor.
    *
    * @param desc the message descriptor.
-   * @return the resolved {@link MessageConstraints}.
+   * @return the resolved {@link MessageRules}.
    */
-  MessageConstraints resolveMessageConstraints(Descriptor desc)
+  MessageRules resolveMessageRules(Descriptor desc)
       throws InvalidProtocolBufferException, CompilationException {
     DescriptorProtos.MessageOptions options = desc.getOptions();
     // If the protovalidate message extension is unknown, reparse using extension registry.
@@ -52,29 +52,29 @@ MessageConstraints resolveMessageConstraints(Descriptor desc)
           DescriptorProtos.MessageOptions.parseFrom(options.toByteString(), EXTENSION_REGISTRY);
     }
     if (!options.hasExtension(ValidateProto.message)) {
-      return MessageConstraints.getDefaultInstance();
+      return MessageRules.getDefaultInstance();
     }
     // Don't use getExtension here to avoid exception if descriptor types don't match.
     // This can occur if the extension is generated to a different Java package.
     Object value = options.getField(ValidateProto.message.getDescriptor());
-    if (value instanceof MessageConstraints) {
-      return ((MessageConstraints) value);
+    if (value instanceof MessageRules) {
+      return ((MessageRules) value);
     }
     if (value instanceof MessageLite) {
-      // Possible that this represents the same constraint type, just generated to a different
+      // Possible that this represents the same rule type, just generated to a different
       // java_package.
-      return MessageConstraints.parseFrom(((MessageLite) value).toByteString());
+      return MessageRules.parseFrom(((MessageLite) value).toByteString());
     }
-    throw new CompilationException("unexpected message constraint option type: " + value);
+    throw new CompilationException("unexpected message rule option type: " + value);
   }
 
   /**
-   * Resolves the constraints for a oneof descriptor.
+   * Resolves the rules for a oneof descriptor.
    *
    * @param desc the oneof descriptor.
-   * @return the resolved {@link OneofConstraints}.
+   * @return the resolved {@link OneofRules}.
    */
-  OneofConstraints resolveOneofConstraints(OneofDescriptor desc)
+  OneofRules resolveOneofRules(OneofDescriptor desc)
       throws InvalidProtocolBufferException, CompilationException {
     DescriptorProtos.OneofOptions options = desc.getOptions();
     // If the protovalidate oneof extension is unknown, reparse using extension registry.
@@ -82,29 +82,29 @@ OneofConstraints resolveOneofConstraints(OneofDescriptor desc)
       options = DescriptorProtos.OneofOptions.parseFrom(options.toByteString(), EXTENSION_REGISTRY);
     }
     if (!options.hasExtension(ValidateProto.oneof)) {
-      return OneofConstraints.getDefaultInstance();
+      return OneofRules.getDefaultInstance();
     }
     // Don't use getExtension here to avoid exception if descriptor types don't match.
     // This can occur if the extension is generated to a different Java package.
     Object value = options.getField(ValidateProto.oneof.getDescriptor());
-    if (value instanceof OneofConstraints) {
-      return ((OneofConstraints) value);
+    if (value instanceof OneofRules) {
+      return ((OneofRules) value);
     }
     if (value instanceof MessageLite) {
-      // Possible that this represents the same constraint type, just generated to a different
+      // Possible that this represents the same rule type, just generated to a different
       // java_package.
-      return OneofConstraints.parseFrom(((MessageLite) value).toByteString());
+      return OneofRules.parseFrom(((MessageLite) value).toByteString());
     }
-    throw new CompilationException("unexpected oneof constraint option type: " + value);
+    throw new CompilationException("unexpected oneof rule option type: " + value);
   }
 
   /**
-   * Resolves the constraints for a field descriptor.
+   * Resolves the rules for a field descriptor.
    *
    * @param desc the field descriptor.
-   * @return the resolved {@link FieldConstraints}.
+   * @return the resolved {@link FieldRules}.
    */
-  FieldConstraints resolveFieldConstraints(FieldDescriptor desc)
+  FieldRules resolveFieldRules(FieldDescriptor desc)
       throws InvalidProtocolBufferException, CompilationException {
     DescriptorProtos.FieldOptions options = desc.getOptions();
     // If the protovalidate field option is unknown, reparse using extension registry.
@@ -112,19 +112,19 @@ FieldConstraints resolveFieldConstraints(FieldDescriptor desc)
       options = DescriptorProtos.FieldOptions.parseFrom(options.toByteString(), EXTENSION_REGISTRY);
     }
     if (!options.hasExtension(ValidateProto.field)) {
-      return FieldConstraints.getDefaultInstance();
+      return FieldRules.getDefaultInstance();
     }
     // Don't use getExtension here to avoid exception if descriptor types don't match.
     // This can occur if the extension is generated to a different Java package.
     Object value = options.getField(ValidateProto.field.getDescriptor());
-    if (value instanceof FieldConstraints) {
-      return ((FieldConstraints) value);
+    if (value instanceof FieldRules) {
+      return ((FieldRules) value);
     }
     if (value instanceof MessageLite) {
-      // Possible that this represents the same constraint type, just generated to a different
+      // Possible that this represents the same rule type, just generated to a different
       // java_package.
-      return FieldConstraints.parseFrom(((MessageLite) value).toByteString());
+      return FieldRules.parseFrom(((MessageLite) value).toByteString());
     }
-    throw new CompilationException("unexpected field constraint option type: " + value);
+    throw new CompilationException("unexpected field rule option type: " + value);
   }
 }
diff --git a/src/main/java/build/buf/protovalidate/RuleViolation.java b/src/main/java/build/buf/protovalidate/RuleViolation.java
new file mode 100644
index 00000000..d5c39773
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/RuleViolation.java
@@ -0,0 +1,263 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.validate.FieldPath;
+import build.buf.validate.FieldPathElement;
+import com.google.protobuf.Descriptors;
+import java.util.ArrayDeque;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Deque;
+import java.util.List;
+import java.util.Objects;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * {@link RuleViolation} contains all the collected information about an individual rule violation.
+ */
+final class RuleViolation implements Violation {
+  /** Static value to return when there are no violations. */
+  static final List NO_VIOLATIONS = Collections.emptyList();
+
+  /** {@link FieldValue} represents a Protobuf field value inside a Protobuf message. */
+  static class FieldValue implements Violation.FieldValue {
+    private final @Nullable Object value;
+    private final Descriptors.FieldDescriptor descriptor;
+
+    /**
+     * Constructs a {@link FieldValue} from a value and a descriptor directly.
+     *
+     * @param value Bare Protobuf field value of field.
+     * @param descriptor Field descriptor pertaining to this field.
+     */
+    FieldValue(@Nullable Object value, Descriptors.FieldDescriptor descriptor) {
+      this.value = value;
+      this.descriptor = descriptor;
+    }
+
+    /**
+     * Constructs a {@link FieldValue} from a {@link Value}. The value must be for a Protobuf field,
+     * e.g. it must have a FieldDescriptor.
+     *
+     * @param value A {@link Value} to create this {@link FieldValue} from.
+     */
+    FieldValue(Value value) {
+      this.value = value.jvmValue(Object.class);
+      this.descriptor = Objects.requireNonNull(value.fieldDescriptor());
+    }
+
+    @Override
+    public @Nullable Object getValue() {
+      return value;
+    }
+
+    @Override
+    public Descriptors.FieldDescriptor getDescriptor() {
+      return descriptor;
+    }
+  }
+
+  private final build.buf.validate.Violation proto;
+  private final @Nullable FieldValue fieldValue;
+  private final @Nullable FieldValue ruleValue;
+
+  /** Builds a Violation instance. */
+  static class Builder {
+    private @Nullable String ruleId;
+    private @Nullable String message;
+    private boolean forKey = false;
+    private final Deque fieldPath = new ArrayDeque<>();
+    private final Deque rulePath = new ArrayDeque<>();
+    private @Nullable FieldValue fieldValue;
+    private @Nullable FieldValue ruleValue;
+
+    /**
+     * Sets the rule ID field of the resulting violation.
+     *
+     * @param ruleId Rule ID value to use.
+     * @return The builder.
+     */
+    Builder setRuleId(String ruleId) {
+      this.ruleId = ruleId;
+      return this;
+    }
+
+    /**
+     * Sets the message field of the resulting violation.
+     *
+     * @param message Message value to use.
+     * @return The builder.
+     */
+    Builder setMessage(String message) {
+      this.message = message;
+      return this;
+    }
+
+    /**
+     * Sets whether the violation is for a map key or not.
+     *
+     * @param forKey If true, signals that the resulting violation is for a map key.
+     * @return The builder.
+     */
+    Builder setForKey(boolean forKey) {
+      this.forKey = forKey;
+      return this;
+    }
+
+    /**
+     * Adds field path elements to the end of the field path.
+     *
+     * @param fieldPathElements Field path elements to add.
+     * @return The builder.
+     */
+    Builder addAllFieldPathElements(Collection fieldPathElements) {
+      this.fieldPath.addAll(fieldPathElements);
+      return this;
+    }
+
+    /**
+     * Adds a field path element to the beginning of the field path.
+     *
+     * @param fieldPathElement A field path element to add to the beginning of the field path.
+     * @return The builder.
+     */
+    Builder addFirstFieldPathElement(@Nullable FieldPathElement fieldPathElement) {
+      if (fieldPathElement != null) {
+        fieldPath.addFirst(fieldPathElement);
+      }
+      return this;
+    }
+
+    /**
+     * Adds field path elements to the end of the rule path.
+     *
+     * @param rulePathElements Field path elements to add.
+     * @return The builder.
+     */
+    Builder addAllRulePathElements(Collection rulePathElements) {
+      rulePath.addAll(rulePathElements);
+      return this;
+    }
+
+    /**
+     * Adds a field path element to the beginning of the rule path.
+     *
+     * @param rulePathElements A field path element to add to the beginning of the rule path.
+     * @return The builder.
+     */
+    Builder addFirstRulePathElement(FieldPathElement rulePathElements) {
+      rulePath.addFirst(rulePathElements);
+      return this;
+    }
+
+    /**
+     * Sets the field value that corresponds to the violation.
+     *
+     * @param fieldValue The field value corresponding to this violation.
+     * @return The builder.
+     */
+    Builder setFieldValue(@Nullable FieldValue fieldValue) {
+      this.fieldValue = fieldValue;
+      return this;
+    }
+
+    /**
+     * Sets the rule value that corresponds to the violation.
+     *
+     * @param ruleValue The rule value corresponding to this violation.
+     * @return The builder.
+     */
+    Builder setRuleValue(@Nullable FieldValue ruleValue) {
+      this.ruleValue = ruleValue;
+      return this;
+    }
+
+    /**
+     * Builds a Violation instance with the provided parameters.
+     *
+     * @return A Violation instance.
+     */
+    RuleViolation build() {
+      build.buf.validate.Violation.Builder protoBuilder = build.buf.validate.Violation.newBuilder();
+      if (ruleId != null) {
+        protoBuilder.setRuleId(ruleId);
+      }
+      if (message != null) {
+        protoBuilder.setMessage(message);
+      }
+      if (forKey) {
+        protoBuilder.setForKey(true);
+      }
+      if (!fieldPath.isEmpty()) {
+        protoBuilder.setField(FieldPath.newBuilder().addAllElements(fieldPath));
+      }
+      if (!rulePath.isEmpty()) {
+        protoBuilder.setRule(FieldPath.newBuilder().addAllElements(rulePath));
+      }
+      return new RuleViolation(protoBuilder.build(), fieldValue, ruleValue);
+    }
+
+    private Builder() {}
+  }
+
+  /**
+   * Creates a new empty builder for building a {@link RuleViolation}.
+   *
+   * @return A new, empty {@link Builder}.
+   */
+  static Builder newBuilder() {
+    return new Builder();
+  }
+
+  private RuleViolation(
+      build.buf.validate.Violation proto,
+      @Nullable FieldValue fieldValue,
+      @Nullable FieldValue ruleValue) {
+    this.proto = proto;
+    this.fieldValue = fieldValue;
+    this.ruleValue = ruleValue;
+  }
+
+  /**
+   * Gets the protobuf data that corresponds to this rule violation.
+   *
+   * @return The protobuf violation data.
+   */
+  @Override
+  public build.buf.validate.Violation toProto() {
+    return proto;
+  }
+
+  /**
+   * Gets the field value that corresponds to the violation.
+   *
+   * @return The field value corresponding to this violation.
+   */
+  @Override
+  public @Nullable FieldValue getFieldValue() {
+    return fieldValue;
+  }
+
+  /**
+   * Gets the rule value that corresponds to the violation.
+   *
+   * @return The rule value corresponding to this violation.
+   */
+  @Override
+  public @Nullable FieldValue getRuleValue() {
+    return ruleValue;
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/RuleViolationHelper.java b/src/main/java/build/buf/protovalidate/RuleViolationHelper.java
new file mode 100644
index 00000000..d134b6d4
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/RuleViolationHelper.java
@@ -0,0 +1,54 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.validate.FieldPath;
+import build.buf.validate.FieldPathElement;
+import java.util.Collections;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+
+final class RuleViolationHelper {
+  private static final List EMPTY_PREFIX = Collections.emptyList();
+
+  private final @Nullable FieldPath rulePrefix;
+
+  private final @Nullable FieldPathElement fieldPathElement;
+
+  RuleViolationHelper(@Nullable ValueEvaluator evaluator) {
+    if (evaluator != null) {
+      this.rulePrefix = evaluator.getNestedRule();
+      if (evaluator.getDescriptor() != null) {
+        this.fieldPathElement = FieldPathUtils.fieldPathElement(evaluator.getDescriptor());
+      } else {
+        this.fieldPathElement = null;
+      }
+    } else {
+      this.rulePrefix = null;
+      this.fieldPathElement = null;
+    }
+  }
+
+  @Nullable FieldPathElement getFieldPathElement() {
+    return fieldPathElement;
+  }
+
+  List getRulePrefixElements() {
+    if (rulePrefix == null) {
+      return EMPTY_PREFIX;
+    }
+    return rulePrefix.getElementsList();
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java b/src/main/java/build/buf/protovalidate/UnknownDescriptorEvaluator.java
similarity index 67%
rename from src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java
rename to src/main/java/build/buf/protovalidate/UnknownDescriptorEvaluator.java
index 6b25d07d..ea74468c 100644
--- a/src/main/java/build/buf/protovalidate/internal/evaluator/UnknownDescriptorEvaluator.java
+++ b/src/main/java/build/buf/protovalidate/UnknownDescriptorEvaluator.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,20 +12,18 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package build.buf.protovalidate.internal.evaluator;
+package build.buf.protovalidate;
 
-import build.buf.protovalidate.ValidationResult;
-import build.buf.protovalidate.Value;
 import build.buf.protovalidate.exceptions.ExecutionException;
-import build.buf.validate.Violation;
 import com.google.protobuf.Descriptors.Descriptor;
 import java.util.Collections;
+import java.util.List;
 
 /**
  * An {@link Evaluator} for an unknown descriptor. This is returned only if lazy-building of
  * evaluators has been disabled and an unknown descriptor is encountered.
  */
-class UnknownDescriptorEvaluator implements Evaluator {
+final class UnknownDescriptorEvaluator implements Evaluator {
   /** The descriptor targeted by this evaluator. */
   private final Descriptor desc;
 
@@ -40,11 +38,9 @@ public boolean tautology() {
   }
 
   @Override
-  public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException {
-    return new ValidationResult(
-        Collections.singletonList(
-            Violation.newBuilder()
-                .setMessage("No evaluator available for " + desc.getFullName())
-                .build()));
+  public List evaluate(Value val, boolean failFast)
+      throws ExecutionException {
+    return Collections.singletonList(
+        RuleViolation.newBuilder().setMessage("No evaluator available for " + desc.getFullName()));
   }
 }
diff --git a/src/main/java/build/buf/protovalidate/Uri.java b/src/main/java/build/buf/protovalidate/Uri.java
new file mode 100644
index 00000000..f829047a
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/Uri.java
@@ -0,0 +1,941 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CoderResult;
+import java.nio.charset.StandardCharsets;
+
+/** Ipv6 is a class used to parse a given string to determine if it is a URI or URI reference. */
+final class Uri {
+  private final String str;
+  private int index;
+  private boolean pctEncodedFound;
+
+  Uri(String str) {
+    this.str = str;
+  }
+
+  /**
+   * Determines whether string is a valid URI.
+   *
+   * 

Parses the rule: + * + *

URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+   */
+  boolean uri() {
+    int start = this.index;
+
+    if (!(this.scheme() && this.take(':') && this.hierPart())) {
+      this.index = start;
+      return false;
+    }
+
+    if (this.take('?') && !this.query()) {
+      return false;
+    }
+
+    if (this.take('#') && !this.fragment()) {
+      return false;
+    }
+
+    if (this.index != this.str.length()) {
+      this.index = start;
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Determines whether the current position is a valid hier-part.
+   *
+   * 

Parses the rule: + * + *

hier-part = "//" authority path-abempty
+   *                / path-absolute
+   *                / path-rootless
+   *                / path-empty
+   */
+  private boolean hierPart() {
+    int start = this.index;
+
+    if (this.takeDoubleSlash() && this.authority() && this.pathAbempty()) {
+      return true;
+    }
+
+    this.index = start;
+
+    return this.pathAbsolute() || this.pathRootless() || this.pathEmpty();
+  }
+
+  /**
+   * Determines whether string is a valid URI reference.
+   *
+   * 

Parses the rule: + * + *

URI-reference = URI / relative-ref
+   */
+  boolean uriReference() {
+    return this.uri() || this.relativeRef();
+  }
+
+  /**
+   * Determines whether the current position is a valid relative reference.
+   *
+   * 

Parses the rule: + * + *

relative-ref = relative-part [ "?" query ] [ "#" fragment ].
+   */
+  private boolean relativeRef() {
+    int start = this.index;
+
+    if (!this.relativePart()) {
+      return false;
+    }
+
+    if (this.take('?') && !this.query()) {
+      this.index = start;
+      return false;
+    }
+
+    if (this.take('#') && !this.fragment()) {
+      this.index = start;
+      return false;
+    }
+
+    if (this.index != this.str.length()) {
+      this.index = start;
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Determines whether the current position is a valid relative part.
+   *
+   * 

Parses the rule: + * + *

relative-part = "//" authority path-abempty
+   *                    / path-absolute
+   *                    / path-noscheme
+   *                    / path-empty
+   */
+  private boolean relativePart() {
+    int start = this.index;
+
+    if (this.takeDoubleSlash() && this.authority() && this.pathAbempty()) {
+      return true;
+    }
+
+    this.index = start;
+
+    return this.pathAbsolute() || this.pathNoscheme() || this.pathEmpty();
+  }
+
+  private boolean takeDoubleSlash() {
+    boolean isSlash = take('/');
+
+    return isSlash && take('/');
+  }
+
+  /**
+   * Determines whether the current position is a valid scheme.
+   *
+   * 

Parses the rule: + * + *

scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+   */
+  private boolean scheme() {
+    int start = this.index;
+
+    if (this.alpha()) {
+      while (this.alpha() || this.digit() || this.take('+') || this.take('-') || this.take('.')) {}
+
+      if (this.peek(':')) {
+        return true;
+      }
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid authority.
+   *
+   * 

Parses the rule: + * + *

authority = [ userinfo "@" ] host [ ":" port ]
+   *
+   * Lead by double slash ("") and terminated by "/", "?", "#", or end of URI.
+   */
+  private boolean authority() {
+    int start = this.index;
+
+    if (this.userinfo()) {
+      if (!this.take('@')) {
+        this.index = start;
+        return false;
+      }
+    }
+
+    if (!this.host()) {
+      this.index = start;
+      return false;
+    }
+
+    if (this.take(':')) {
+      if (!this.port()) {
+        this.index = start;
+        return false;
+      }
+    }
+
+    if (!this.isAuthorityEnd()) {
+      this.index = start;
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Determines whether the current position is the end of the authority.
+   *
+   * 

The authority component [...] is terminated by one of the following: + * + *

    + *
  • the next slash ("/") + *
  • question mark ("?") + *
  • number sign ("#") character + *
  • the end of the URI. + *
+ */ + private boolean isAuthorityEnd() { + if (this.index >= this.str.length()) { + return true; + } + char c = this.str.charAt(this.index); + return (c == '?' || c == '#' || c == '/'); + } + + /** + * Determines whether the current position is a valid userinfo. + * + *

Parses the rule: + * + *

userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
+   *
+   * Terminated by "@" in authority.
+   */
+  private boolean userinfo() {
+    int start = this.index;
+
+    while (true) {
+      if (this.unreserved() || this.pctEncoded() || this.subDelims() || this.take(':')) {
+        continue;
+      }
+
+      if (this.peek('@')) {
+        return true;
+      }
+
+      this.index = start;
+
+      return false;
+    }
+  }
+
+  private static int unhex(char c) {
+    if ('0' <= c && c <= '9') {
+      return c - '0';
+    } else if ('a' <= c && c <= 'f') {
+      return c - 'a' + 10;
+    } else if ('A' <= c && c <= 'F') {
+      return c - 'A' + 10;
+    }
+
+    return 0;
+  }
+
+  /**
+   * Verifies that str is correctly percent-encoded.
+   *
+   * 

Note that we essentially want to mimic the behavior of decodeURIComponent, which would fail + * on malformed URLs. Java does have various methods for decoding URLs, but none behave + * consistently with decodeURIComponent. + * + *

The code below is a combination of `checkHostPctEncoded` from the protovalidate-go + * implementation and Java's java.net.URI#decode methods. + */ + private boolean checkHostPctEncoded(String str) { + CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder(); + + int strLen = str.length(); + ByteBuffer buffer = ByteBuffer.allocate(strLen); + CharBuffer out = CharBuffer.allocate(strLen); + + // Unhex str and convert to a ByteBuffer. + for (int i = 0; i < str.length(); ) { + if (str.charAt(i) == '%') { + // If we encounter a %, unhex the two following digits, extract their + // last 4 bits, cast to a byte. + byte b = + (byte) + (((unhex(str.charAt(i + 1)) & 0xf) << 4) | ((unhex(str.charAt(i + 2)) & 0xf) << 0)); + buffer.put(b); + i += 3; + } else { + // Not percent encoded, extract the last 4 bits, convert to a byte + // and add to the byte buffer. + buffer.put((byte) (str.charAt(i) & 0xf)); + i++; + } + } + + // Attempt to decode the byte buffer as UTF-8. + CoderResult f = decoder.decode((ByteBuffer) buffer.flip(), out, true); + + // If an error occurred, return false as invalid. + if (f.isError()) { + return false; + } + // Flush the buffer + f = decoder.flush(out); + + // If an error occurred, return false as invalid. + // Otherwise return true. + return !f.isError(); + } + + /** + * Determines whether the current position is a valid host. + * + *

Parses the rule: + * + *

host = IP-literal / IPv4address / reg-name.
+   */
+  private boolean host() {
+    int start = this.index;
+    this.pctEncodedFound = false;
+
+    // Note: IPv4address is a subset of reg-name
+    if ((this.peek('[') && this.ipLiteral()) || this.regName()) {
+      if (this.pctEncodedFound) {
+        String rawHost = this.str.substring(start, this.index);
+        // RFC 3986:
+        // > URI producing applications must not use percent-encoding in host
+        // > unless it is used to represent a UTF-8 character sequence.
+        return this.checkHostPctEncoded(rawHost);
+      }
+
+      return true;
+    }
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid port.
+   *
+   * 

Parses the rule: + * + *

port = *DIGIT
+   *
+   * Terminated by end of authority.
+   */
+  private boolean port() {
+    int start = this.index;
+
+    while (true) {
+      if (this.digit()) {
+        continue;
+      }
+
+      if (this.isAuthorityEnd()) {
+        return true;
+      }
+
+      this.index = start;
+
+      return false;
+    }
+  }
+
+  /**
+   * Determines whether the current position is a valid IP literal.
+   *
+   * 

Parses the rule from RFC 6874: + * + *

IP-literal = "[" ( IPv6address / IPv6addrz / IPvFuture  ) "]"
+   */
+  private boolean ipLiteral() {
+    int start = this.index;
+
+    if (this.take('[')) {
+      int j = this.index;
+
+      if (this.ipv6Address() && this.take(']')) {
+        return true;
+      }
+
+      this.index = j;
+
+      if (this.ipv6Addrz() && this.take(']')) {
+        return true;
+      }
+
+      this.index = j;
+
+      if (this.ipvFuture() && this.take(']')) {
+        return true;
+      }
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid ipv6 address.
+   *
+   * 

ipv6Address parses the rule "IPv6address". + * + *

Relies on the implementation of isIp. + */ + private boolean ipv6Address() { + int start = this.index; + + while (this.hexDig() || this.take(':')) {} + + if (CustomOverload.isIp(this.str.substring(start, this.index), 6)) { + return true; + } + + this.index = start; + + return false; + } + + /** + * Determines whether the current position is a valid IPv6addrz. + * + *

Parses the rule: + * + *

IPv6addrz = IPv6address "%25" ZoneID
+   */
+  private boolean ipv6Addrz() {
+    int start = this.index;
+
+    if (this.ipv6Address() && this.take('%') && this.take('2') && this.take('5') && this.zoneID()) {
+      return true;
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid zone ID.
+   *
+   * 

Parses the rule: + * + *

ZoneID = 1*( unreserved / pct-encoded )
+   */
+  private boolean zoneID() {
+    int start = this.index;
+
+    while (this.unreserved() || this.pctEncoded()) {}
+
+    if (this.index - start > 0) {
+      return true;
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid IPvFuture.
+   *
+   * 

Parses the rule: + * + *

IPvFuture  = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
+   */
+  private boolean ipvFuture() {
+    int start = this.index;
+
+    if (this.take('v') && this.hexDig()) {
+      while (this.hexDig()) {}
+
+      if (this.take('.')) {
+        int j = 0;
+
+        while (this.unreserved() || this.subDelims() || this.take(':')) {
+          j++;
+        }
+
+        if (j >= 1) {
+          return true;
+        }
+      }
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid reg-name.
+   *
+   * 

Parses the rule: + * + *

reg-name = *( unreserved / pct-encoded / sub-delims )
+   *
+   * Terminates on start of port (":") or end of authority.
+   */
+  private boolean regName() {
+    int start = this.index;
+
+    while (true) {
+      if (this.unreserved() || this.pctEncoded() || this.subDelims()) {
+        continue;
+      }
+
+      if (this.isAuthorityEnd()) {
+        // End of authority
+        return true;
+      }
+
+      if (this.peek(':')) {
+        return true;
+      }
+
+      this.index = start;
+
+      return false;
+    }
+  }
+
+  /**
+   * Determines whether the current position is the end of the path.
+   *
+   * 

The path is terminated by one of the following: + * + *

    + *
  • the first question mark ("?") + *
  • number sign ("#") character + *
  • the end of the URI. + *
+ */ + private boolean isPathEnd() { + if (this.index >= this.str.length()) { + return true; + } + + char c = this.str.charAt(this.index); + + return (c == '?' || c == '#'); + } + + /** + * Determines whether the current position is a valid path-abempty. + * + *

Parses the rule: + * + *

path-abempty = *( "/" segment )
+   *
+   * Terminated by end of path: "?", "#", or end of URI.
+   */
+  private boolean pathAbempty() {
+    int start = this.index;
+
+    while (this.take('/') && this.segment()) {}
+
+    if (this.isPathEnd()) {
+      return true;
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid path-absolute.
+   *
+   * 

Parses the rule: + * + *

path-absolute = "/" [ segment-nz *( "/" segment ) ]
+   *
+   * Terminated by end of path: "?", "#", or end of URI.
+   */
+  private boolean pathAbsolute() {
+    int start = this.index;
+
+    if (this.take('/')) {
+      if (this.segmentNz()) {
+        while (this.take('/') && this.segment()) {}
+      }
+
+      if (this.isPathEnd()) {
+        return true;
+      }
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid path-noscheme.
+   *
+   * 

Parses the rule: + * + *

path-noscheme = segment-nz-nc *( "/" segment )
+   *
+   * Terminated by end of path: "?", "#", or end of URI.
+   */
+  private boolean pathNoscheme() {
+    int start = this.index;
+
+    if (this.segmentNzNc()) {
+      while (this.take('/') && this.segment()) {}
+
+      if (this.isPathEnd()) {
+        return true;
+      }
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid path-rootless.
+   *
+   * 

Parses the rule: + * + *

path-rootless = segment-nz *( "/" segment )
+   *
+   * Terminated by end of path: "?", "#", or end of URI.
+   */
+  private boolean pathRootless() {
+    int start = this.index;
+
+    if (this.segmentNz()) {
+      while (this.take('/') && this.segment()) {}
+
+      if (this.isPathEnd()) {
+        return true;
+      }
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid path-empty.
+   *
+   * 

Parses the rule: + * + *

path-empty = 0
+   *
+   * Terminated by end of path: "?", "#", or end of URI.
+   */
+  private boolean pathEmpty() {
+    return this.isPathEnd();
+  }
+
+  /**
+   * Determines whether the current position is a valid segment.
+   *
+   * 

Parses the rule: + * + *

segment = *pchar
+   */
+  private boolean segment() {
+    while (this.pchar()) {}
+
+    return true;
+  }
+
+  /**
+   * Determines whether the current position is a valid segment-nz.
+   *
+   * 

Parses the rule: + * + *

segment-nz = 1*pchar
+   */
+  private boolean segmentNz() {
+    int start = this.index;
+
+    if (this.pchar()) {
+      while (this.pchar()) {}
+      return true;
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid segment-nz-nc.
+   *
+   * 

Parses the rule: + * + *

segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
+   *                   ; non-zero-length segment without any colon ":"
+   */
+  private boolean segmentNzNc() {
+    int start = this.index;
+
+    while (this.unreserved() || this.pctEncoded() || this.subDelims() || this.take('@')) {}
+
+    if (this.index - start > 0) {
+      return true;
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a valid pchar.
+   *
+   * 

Parses the rule: + * + *

pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+   */
+  private boolean pchar() {
+    return (this.unreserved()
+        || this.pctEncoded()
+        || this.subDelims()
+        || this.take(':')
+        || this.take('@'));
+  }
+
+  /**
+   * Determines whether the current position is a valid query.
+   *
+   * 

Parses the rule: + * + *

query = *( pchar / "/" / "?" )
+   *
+   * Terminated by "#" or end of URI.
+   */
+  private boolean query() {
+    int start = this.index;
+
+    while (true) {
+      if (this.pchar() || this.take('/') || this.take('?')) {
+        continue;
+      }
+
+      if (this.peek('#') || this.index == this.str.length()) {
+        return true;
+      }
+
+      this.index = start;
+
+      return false;
+    }
+  }
+
+  /**
+   * Determines whether the current position is a valid fragment.
+   *
+   * 

Parses the rule: + * + *

fragment = *( pchar / "/" / "?" )
+   *
+   * Terminated by end of URI.
+   */
+  private boolean fragment() {
+    int start = this.index;
+
+    while (true) {
+      if (this.pchar() || this.take('/') || this.take('?')) {
+        continue;
+      }
+
+      if (this.index == this.str.length()) {
+        return true;
+      }
+
+      this.index = start;
+
+      return false;
+    }
+  }
+
+  /**
+   * Determines whether the current position is a valid pct-encoded.
+   *
+   * 

Parses the rule: + * + *

pct-encoded = "%"+HEXDIG+HEXDIG
+   *
+   * Sets `pctEncodedFound` to true if a valid triplet was found.
+   */
+  private boolean pctEncoded() {
+    int start = this.index;
+
+    if (this.take('%') && this.hexDig() && this.hexDig()) {
+      this.pctEncodedFound = true;
+
+      return true;
+    }
+
+    this.index = start;
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is an unreserved character.
+   *
+   * 

Parses the rule: + * + *

unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+   */
+  private boolean unreserved() {
+    return (this.alpha()
+        || this.digit()
+        || this.take('-')
+        || this.take('_')
+        || this.take('.')
+        || this.take('~'));
+  }
+
+  /**
+   * Determines whether the current position is a sub-delim.
+   *
+   * 

Parses the rule: + * + *

sub-delims  = "!" / "$" / "&" / "'" / "(" / ")"
+   *                  / "*" / "+" / "," / ";" / "="
+   */
+  private boolean subDelims() {
+    return (this.take('!')
+        || this.take('$')
+        || this.take('&')
+        || this.take('\'')
+        || this.take('(')
+        || this.take(')')
+        || this.take('*')
+        || this.take('+')
+        || this.take(',')
+        || this.take(';')
+        || this.take('='));
+  }
+
+  /**
+   * Determines whether the current position is an alpha character.
+   *
+   * 

Parses the rule: + * + *

ALPHA =  %x41-5A / %x61-7A ; A-Z / a-z
+   */
+  private boolean alpha() {
+    if (this.index >= this.str.length()) {
+      return false;
+    }
+
+    char c = this.str.charAt(this.index);
+
+    if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) {
+      this.index++;
+      return true;
+    }
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a hex digit.
+   *
+   * 

Parses the rule: + * + *

HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
+   */
+  private boolean hexDig() {
+    if (this.index >= this.str.length()) {
+      return false;
+    }
+
+    char c = this.str.charAt(this.index);
+
+    if (('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')) {
+      this.index++;
+      return true;
+    }
+
+    return false;
+  }
+
+  /**
+   * Determines whether the current position is a digit.
+   *
+   * 

Parses the rule: + * + *

DIGIT = %x30-39 ; 0-9
+   */
+  private boolean digit() {
+    if (this.index >= this.str.length()) {
+      return false;
+    }
+
+    char c = this.str.charAt(this.index);
+    if ('0' <= c && c <= '9') {
+      this.index++;
+      return true;
+    }
+    return false;
+  }
+
+  /** Take the given char at the current position, incrementing the index if necessary. */
+  private boolean take(char c) {
+    if (this.index >= this.str.length()) {
+      return false;
+    }
+
+    if (this.str.charAt(this.index) == c) {
+      this.index++;
+      return true;
+    }
+
+    return false;
+  }
+
+  private boolean peek(char c) {
+    return this.index < this.str.length() && this.str.charAt(this.index) == c;
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/ValidateLibrary.java b/src/main/java/build/buf/protovalidate/ValidateLibrary.java
new file mode 100644
index 00000000..f82c744b
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/ValidateLibrary.java
@@ -0,0 +1,73 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import dev.cel.checker.CelCheckerBuilder;
+import dev.cel.common.CelVarDecl;
+import dev.cel.common.types.SimpleType;
+import dev.cel.compiler.CelCompilerLibrary;
+import dev.cel.parser.CelParserBuilder;
+import dev.cel.parser.CelStandardMacro;
+import dev.cel.runtime.CelRuntimeBuilder;
+import dev.cel.runtime.CelRuntimeLibrary;
+import dev.cel.runtime.CelStandardFunctions;
+import dev.cel.runtime.CelStandardFunctions.StandardFunction;
+import dev.cel.runtime.CelStandardFunctions.StandardFunction.Overload.Conversions;
+
+/**
+ * Custom {@link CelCompilerLibrary} and {@link CelRuntimeLibrary}. Provides all the custom
+ * extension function definitions and overloads.
+ */
+final class ValidateLibrary implements CelCompilerLibrary, CelRuntimeLibrary {
+
+  /** Creates a ValidateLibrary with all custom declarations and overloads. */
+  ValidateLibrary() {}
+
+  @Override
+  public void setParserOptions(CelParserBuilder parserBuilder) {
+    parserBuilder.setStandardMacros(
+        CelStandardMacro.ALL,
+        CelStandardMacro.EXISTS,
+        CelStandardMacro.EXISTS_ONE,
+        CelStandardMacro.FILTER,
+        CelStandardMacro.HAS,
+        CelStandardMacro.MAP,
+        CelStandardMacro.MAP_FILTER);
+  }
+
+  @Override
+  public void setCheckerOptions(CelCheckerBuilder checkerBuilder) {
+    checkerBuilder
+        .addVarDeclarations(
+            CelVarDecl.newVarDeclaration(NowVariable.NOW_NAME, SimpleType.TIMESTAMP))
+        .addFunctionDeclarations(CustomDeclarations.create());
+  }
+
+  @Override
+  public void setRuntimeOptions(CelRuntimeBuilder runtimeBuilder) {
+    runtimeBuilder
+        .addFunctionBindings(CustomOverload.create())
+        .setStandardEnvironmentEnabled(false)
+        .setStandardFunctions(
+            CelStandardFunctions.newBuilder()
+                .filterFunctions(
+                    // CEL doesn't validate, that the bytes are valid utf-8, so we provide our own
+                    // implementation.
+                    (function, overload) ->
+                        function != StandardFunction.STRING
+                            || !overload.equals(Conversions.BYTES_TO_STRING))
+                .build());
+  }
+}
diff --git a/src/main/java/build/buf/protovalidate/ValidationResult.java b/src/main/java/build/buf/protovalidate/ValidationResult.java
index 32f5c201..b92691f6 100644
--- a/src/main/java/build/buf/protovalidate/ValidationResult.java
+++ b/src/main/java/build/buf/protovalidate/ValidationResult.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -14,14 +14,14 @@
 
 package build.buf.protovalidate;
 
-import build.buf.validate.Violation;
+import build.buf.validate.Violations;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 /**
- * {@link ValidationResult} is returned when a constraint is executed. It contains a list of
- * violations. This is non-fatal. If there are no violations, the constraint is considered to have
- * passed.
+ * {@link ValidationResult} is returned when a rule is executed. It contains a list of violations.
+ * This is non-fatal. If there are no violations, the rule is considered to have passed.
  */
 public class ValidationResult {
 
@@ -68,15 +68,34 @@ public List getViolations() {
   @Override
   public String toString() {
     StringBuilder builder = new StringBuilder();
-    builder.append("Validation error:");
-    for (Violation violation : violations) {
-      builder.append("\n - ");
-      if (!violation.getFieldPath().isEmpty()) {
-        builder.append(violation.getFieldPath());
-        builder.append(": ");
+    if (isSuccess()) {
+      builder.append("Validation OK");
+    } else {
+      builder.append("Validation error:");
+      for (Violation violation : violations) {
+        builder.append("\n - ");
+        if (violation.toProto().hasField()) {
+          builder.append(FieldPathUtils.fieldPathString(violation.toProto().getField()));
+          builder.append(": ");
+        }
+        builder.append(
+            String.format(
+                "%s [%s]", violation.toProto().getMessage(), violation.toProto().getRuleId()));
       }
-      builder.append(String.format("%s [%s]", violation.getMessage(), violation.getConstraintId()));
     }
     return builder.toString();
   }
+
+  /**
+   * Converts the validation result to its equivalent protobuf form.
+   *
+   * @return The protobuf form of this validation result.
+   */
+  public build.buf.validate.Violations toProto() {
+    List protoViolations = new ArrayList<>();
+    for (Violation violation : violations) {
+      protoViolations.add(violation.toProto());
+    }
+    return Violations.newBuilder().addAllViolations(protoViolations).build();
+  }
 }
diff --git a/src/main/java/build/buf/protovalidate/Validator.java b/src/main/java/build/buf/protovalidate/Validator.java
index 61d43adb..f8e67195 100644
--- a/src/main/java/build/buf/protovalidate/Validator.java
+++ b/src/main/java/build/buf/protovalidate/Validator.java
@@ -1,4 +1,4 @@
-// Copyright 2023-2024 Buf Technologies, Inc.
+// Copyright 2023-2025 Buf Technologies, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,92 +15,24 @@
 package build.buf.protovalidate;
 
 import build.buf.protovalidate.exceptions.CompilationException;
+import build.buf.protovalidate.exceptions.ExecutionException;
 import build.buf.protovalidate.exceptions.ValidationException;
-import build.buf.protovalidate.internal.celext.ValidateLibrary;
-import build.buf.protovalidate.internal.evaluator.Evaluator;
-import build.buf.protovalidate.internal.evaluator.EvaluatorBuilder;
-import build.buf.protovalidate.internal.evaluator.MessageValue;
-import com.google.protobuf.Descriptors.Descriptor;
 import com.google.protobuf.Message;
-import org.projectnessie.cel.Env;
-import org.projectnessie.cel.Library;
-
-/** Performs validation on any proto.Message values. The Validator is safe for concurrent use. */
-public class Validator {
-  /** evaluatorBuilder is the builder used to construct the evaluator for a given message. */
-  private final EvaluatorBuilder evaluatorBuilder;
-
-  /**
-   * failFast indicates whether the validator should stop evaluating constraints after the first
-   * violation.
-   */
-  private final boolean failFast;
-
-  /**
-   * Constructs a new {@link Validator}.
-   *
-   * @param config specified configuration.
-   */
-  public Validator(Config config) {
-    Env env = Env.newEnv(Library.Lib(new ValidateLibrary()));
-    this.evaluatorBuilder = new EvaluatorBuilder(env, config);
-    this.failFast = config.isFailFast();
-  }
-
-  /** Constructs a new {@link Validator} with a default configuration. */
-  public Validator() {
-    Config config = Config.newBuilder().build();
-    Env env = Env.newEnv(Library.Lib(new ValidateLibrary()));
-    this.evaluatorBuilder = new EvaluatorBuilder(env, config);
-    this.failFast = config.isFailFast();
-  }
 
+/** A validator that can be used to validate messages */
+public interface Validator {
   /**
-   * Checks that message satisfies its constraints. Constraints are defined within the Protobuf file
-   * as options from the buf.validate package. A {@link ValidationResult} is returned which contains
-   * a list of violations. If the list is empty, the message is valid. If the list is non-empty, the
-   * message is invalid. An exception is thrown if the message cannot be validated because the
-   * evaluation logic for the message cannot be built ({@link CompilationException}), or there is a
-   * type error when attempting to evaluate a CEL expression associated with the message ({@link
-   * build.buf.protovalidate.exceptions.ExecutionException}).
+   * Checks that message satisfies its rules. Rules are defined within the Protobuf file as options
+   * from the buf.validate package. A {@link ValidationResult} is returned which contains a list of
+   * violations. If the list is empty, the message is valid. If the list is non-empty, the message
+   * is invalid. An exception is thrown if the message cannot be validated because the evaluation
+   * logic for the message cannot be built ({@link CompilationException}), or there is a type error
+   * when attempting to evaluate a CEL expression associated with the message ({@link
+   * ExecutionException}).
    *
    * @param msg the {@link Message} to be validated.
    * @return the {@link ValidationResult} from the evaluation.
    * @throws ValidationException if there are any compilation or validation execution errors.
    */
-  public ValidationResult validate(Message msg) throws ValidationException {
-    if (msg == null) {
-      return ValidationResult.EMPTY;
-    }
-    Descriptor descriptor = msg.getDescriptorForType();
-    Evaluator evaluator = evaluatorBuilder.load(descriptor);
-    return evaluator.evaluate(new MessageValue(msg), failFast);
-  }
-
-  /**
-   * Loads messages that are expected to be validated, allowing the {@link Validator} to warm up.
-   * Messages included transitively (i.e., fields with message values) are automatically handled.
-   *
-   * @param messages the list of {@link Message} to load.
-   * @throws CompilationException if there are any compilation errors during warm-up.
-   */
-  public void loadMessages(Message... messages) throws CompilationException {
-    for (Message message : messages) {
-      this.evaluatorBuilder.load(message.getDescriptorForType());
-    }
-  }
-
-  /**
-   * Loads message descriptors that are expected to be validated, allowing the {@link Validator} to
-   * warm up. Messages included transitively (i.e., fields with message values) are automatically
-   * handled.
-   *
-   * @param descriptors the list of {@link Descriptor} to load.
-   * @throws CompilationException if there are any compilation errors during warm-up.
-   */
-  public void loadDescriptors(Descriptor... descriptors) throws CompilationException {
-    for (Descriptor descriptor : descriptors) {
-      this.evaluatorBuilder.load(descriptor);
-    }
-  }
+  ValidationResult validate(Message msg) throws ValidationException;
 }
diff --git a/src/main/java/build/buf/protovalidate/ValidatorFactory.java b/src/main/java/build/buf/protovalidate/ValidatorFactory.java
new file mode 100644
index 00000000..adb50c8c
--- /dev/null
+++ b/src/main/java/build/buf/protovalidate/ValidatorFactory.java
@@ -0,0 +1,102 @@
+// Copyright 2023-2025 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package build.buf.protovalidate;
+
+import build.buf.protovalidate.exceptions.CompilationException;
+import com.google.protobuf.Descriptors.Descriptor;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * ValidatorFactory is used to create a validator.
+ *
+ * 

Validators can be created with an optional {@link Config} to customize behavior. They can also + * be created with a list of seed descriptors to warmup the validator cache ahead of time as well as + * an indicator to lazily-load any descriptors not provided into the cache. + */ +public final class ValidatorFactory { + // Prevent instantiation + private ValidatorFactory() {} + + /** A builder class used for building a validator. */ + public static class ValidatorBuilder { + /** The config object to use for instantiating a validator. */ + @Nullable private Config config; + + /** + * Create a validator with the given config + * + * @param config The {@link Config} to configure the validator. + * @return The builder instance + */ + public ValidatorBuilder withConfig(Config config) { + this.config = config; + return this; + } + + // Prevent instantiation + private ValidatorBuilder() {} + + /** + * Build a new validator + * + * @return A new {@link Validator} instance. + */ + public Validator build() { + Config cfg = this.config; + if (cfg == null) { + cfg = Config.newBuilder().build(); + } + return new ValidatorImpl(cfg); + } + + /** + * Build the validator, warming up the cache with any provided descriptors. + * + * @param descriptors the list of descriptors to warm up the cache. + * @param disableLazy whether to disable lazy loading of validation rules. When validation is + * performed, a message's rules will be looked up in a cache. If they are not found, by + * default they will be processed and lazily-loaded into the cache. Setting this to false + * will not attempt to lazily-load descriptor information not found in the cache and + * essentially makes the entire cache read-only, eliminating thread contention. + * @return A new {@link Validator} instance. + * @throws CompilationException If any of the given descriptors' validation rules fail + * processing while warming up the cache. + * @throws IllegalStateException If disableLazy is set to true and no descriptors are passed. + */ + public Validator buildWithDescriptors(List descriptors, boolean disableLazy) + throws CompilationException, IllegalStateException { + if (disableLazy && (descriptors == null || descriptors.isEmpty())) { + throw new IllegalStateException( + "a list of descriptors is required when disableLazy is true"); + } + + Config cfg = this.config; + if (cfg == null) { + cfg = Config.newBuilder().build(); + } + return new ValidatorImpl(cfg, descriptors, disableLazy); + } + } + + /** + * Creates a new builder for a validator. + * + * @return A Validator builder + */ + public static ValidatorBuilder newBuilder() { + return new ValidatorBuilder(); + } +} diff --git a/src/main/java/build/buf/protovalidate/ValidatorImpl.java b/src/main/java/build/buf/protovalidate/ValidatorImpl.java new file mode 100644 index 00000000..d1748775 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/ValidatorImpl.java @@ -0,0 +1,76 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import build.buf.protovalidate.exceptions.CompilationException; +import build.buf.protovalidate.exceptions.ValidationException; +import com.google.protobuf.Descriptors.Descriptor; +import com.google.protobuf.Message; +import dev.cel.bundle.Cel; +import dev.cel.bundle.CelFactory; +import java.util.ArrayList; +import java.util.List; + +final class ValidatorImpl implements Validator { + /** evaluatorBuilder is the builder used to construct the evaluator for a given message. */ + private final EvaluatorBuilder evaluatorBuilder; + + /** + * failFast indicates whether the validator should stop evaluating rules after the first + * violation. + */ + private final boolean failFast; + + ValidatorImpl(Config config) { + ValidateLibrary validateLibrary = new ValidateLibrary(); + Cel cel = + CelFactory.standardCelBuilder() + .addCompilerLibraries(validateLibrary) + .addRuntimeLibraries(validateLibrary) + .build(); + this.evaluatorBuilder = new EvaluatorBuilder(cel, config); + this.failFast = config.isFailFast(); + } + + ValidatorImpl(Config config, List descriptors, boolean disableLazy) + throws CompilationException { + ValidateLibrary validateLibrary = new ValidateLibrary(); + Cel cel = + CelFactory.standardCelBuilder() + .addCompilerLibraries(validateLibrary) + .addRuntimeLibraries(validateLibrary) + .build(); + this.evaluatorBuilder = new EvaluatorBuilder(cel, config, descriptors, disableLazy); + this.failFast = config.isFailFast(); + } + + @Override + public ValidationResult validate(Message msg) throws ValidationException { + if (msg == null) { + return ValidationResult.EMPTY; + } + Descriptor descriptor = msg.getDescriptorForType(); + Evaluator evaluator = evaluatorBuilder.load(descriptor); + List result = evaluator.evaluate(new MessageValue(msg), this.failFast); + if (result.isEmpty()) { + return ValidationResult.EMPTY; + } + List violations = new ArrayList<>(result.size()); + for (RuleViolation.Builder builder : result) { + violations.add(builder.build()); + } + return new ValidationResult(violations); + } +} diff --git a/src/main/java/build/buf/protovalidate/Value.java b/src/main/java/build/buf/protovalidate/Value.java index 8b0c5225..e76e3928 100644 --- a/src/main/java/build/buf/protovalidate/Value.java +++ b/src/main/java/build/buf/protovalidate/Value.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,23 +14,31 @@ package build.buf.protovalidate; +import com.google.protobuf.Descriptors; import java.util.List; import java.util.Map; -import javax.annotation.Nullable; +import org.jspecify.annotations.Nullable; /** * {@link Value} is a wrapper around a protobuf value that provides helper methods for accessing the * value. */ public interface Value { + /** + * Get the field descriptor that corresponds to the underlying Value, if it is a message field. + * + * @return The underlying {@link Descriptors.FieldDescriptor}. null if the underlying value is not + * a message field. + */ + Descriptors.@Nullable FieldDescriptor fieldDescriptor(); + /** * Get the underlying value as a {@link MessageReflector} type. * - * @return The underlying {@link MessageReflector} value. null if the underlying value is not a - * {@link MessageReflector} type. + * @return The underlying {@link MessageReflector} value. null if the underlying value is not a {@link + * MessageReflector} type. */ - @Nullable - MessageReflector messageValue(); + @Nullable MessageReflector messageValue(); /** * Get the underlying value as a list. @@ -63,6 +71,5 @@ public interface Value { * @return The value cast to the inferred class type. * @param The class type. */ - @Nullable T jvmValue(Class clazz); } diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java b/src/main/java/build/buf/protovalidate/ValueEvaluator.java similarity index 50% rename from src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java rename to src/main/java/build/buf/protovalidate/ValueEvaluator.java index 2a85024e..19d9ab31 100644 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/ValueEvaluator.java +++ b/src/main/java/build/buf/protovalidate/ValueEvaluator.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,22 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -package build.buf.protovalidate.internal.evaluator; +package build.buf.protovalidate; -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.Violation; +import build.buf.validate.FieldPath; +import com.google.protobuf.Descriptors; import java.util.ArrayList; import java.util.List; import java.util.Objects; -import javax.annotation.Nullable; +import org.jspecify.annotations.Nullable; /** * {@link ValueEvaluator} performs validation on any concrete value contained within a singular * field, repeated elements, or the keys/values of a map. */ -class ValueEvaluator implements Evaluator { +final class ValueEvaluator implements Evaluator { + /** The {@link Descriptors.FieldDescriptor} targeted by this evaluator */ + private final Descriptors.@Nullable FieldDescriptor descriptor; + + /** The nested rule path that this value evaluator is for */ + @Nullable private final FieldPath nestedRule; + /** The default or zero-value for this value's type. */ @Nullable private Object zero; @@ -35,13 +40,28 @@ class ValueEvaluator implements Evaluator { private final List evaluators = new ArrayList<>(); /** - * Indicates that the Constraints should not be applied if the field is unset or the default - * (typically zero) value. + * Indicates that the Rules should not be applied if the field is unset or the default (typically + * zero) value. */ private boolean ignoreEmpty; /** Constructs a {@link ValueEvaluator}. */ - ValueEvaluator() {} + ValueEvaluator(Descriptors.@Nullable FieldDescriptor descriptor, @Nullable FieldPath nestedRule) { + this.descriptor = descriptor; + this.nestedRule = nestedRule; + } + + Descriptors.@Nullable FieldDescriptor getDescriptor() { + return descriptor; + } + + @Nullable FieldPath getNestedRule() { + return nestedRule; + } + + boolean hasNestedRule() { + return this.nestedRule != null; + } @Override public boolean tautology() { @@ -49,22 +69,23 @@ public boolean tautology() { } @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { + public List evaluate(Value val, boolean failFast) + throws ExecutionException { if (this.shouldIgnore(val.jvmValue(Object.class))) { - return ValidationResult.EMPTY; + return RuleViolation.NO_VIOLATIONS; } - List violations = new ArrayList<>(); + List allViolations = new ArrayList<>(); for (Evaluator evaluator : evaluators) { - ValidationResult evalResult = evaluator.evaluate(val, failFast); - if (failFast && !evalResult.getViolations().isEmpty()) { - return evalResult; + List violations = evaluator.evaluate(val, failFast); + if (failFast && !violations.isEmpty()) { + return violations; } - violations.addAll(evalResult.getViolations()); + allViolations.addAll(violations); } - if (violations.isEmpty()) { - return ValidationResult.EMPTY; + if (allViolations.isEmpty()) { + return RuleViolation.NO_VIOLATIONS; } - return new ValidationResult(violations); + return allViolations; } /** @@ -72,18 +93,18 @@ public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionEx * * @param eval The evaluator to append. */ - public void append(Evaluator eval) { + void append(Evaluator eval) { if (!eval.tautology()) { this.evaluators.add(eval); } } - public void setIgnoreEmpty(Object zero) { + void setIgnoreEmpty(Object zero) { this.ignoreEmpty = true; this.zero = zero; } - private boolean shouldIgnore(@Nullable Object value) { + private boolean shouldIgnore(Object value) { return this.ignoreEmpty && Objects.equals(value, this.zero); } } diff --git a/src/main/java/build/buf/protovalidate/Variable.java b/src/main/java/build/buf/protovalidate/Variable.java new file mode 100644 index 00000000..c449cb72 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/Variable.java @@ -0,0 +1,87 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import dev.cel.runtime.CelVariableResolver; +import java.util.Optional; +import org.jspecify.annotations.Nullable; + +/** + * {@link Variable} implements {@link CelVariableResolver}, providing a lightweight named variable + * to cel.Program executions. + */ +final class Variable implements CelVariableResolver { + /** The {@value} variable in CEL. */ + static final String THIS_NAME = "this"; + + /** The {@value} variable in CEL. */ + static final String RULES_NAME = "rules"; + + /** The {@value} variable in CEL. */ + static final String RULE_NAME = "rule"; + + /** The variable's name */ + private final String name; + + /** The value for this variable */ + @Nullable private final Object val; + + /** Creates a variable with the given name and value. */ + private Variable(String name, @Nullable Object val) { + this.name = name; + this.val = val; + } + + /** + * Creates a "this" variable. + * + * @param val the value. + * @return {@link Variable}. + */ + static CelVariableResolver newThisVariable(@Nullable Object val) { + return CelVariableResolver.hierarchicalVariableResolver( + new NowVariable(), new Variable(THIS_NAME, val)); + } + + /** + * Creates a "rules" variable. + * + * @param val the value. + * @return {@link Variable}. + */ + static CelVariableResolver newRulesVariable(Object val) { + return new Variable(RULES_NAME, val); + } + + /** + * Creates a "rule" variable. + * + * @param rules the value of the "rules" variable. + * @param val the value of the "rule" variable. + * @return {@link Variable}. + */ + static CelVariableResolver newRuleVariable(Object rules, Object val) { + return CelVariableResolver.hierarchicalVariableResolver( + newRulesVariable(rules), new Variable(RULE_NAME, val)); + } + + @Override + public Optional find(String name) { + if (!this.name.equals(name) || val == null) { + return Optional.empty(); + } + return Optional.of(val); + } +} diff --git a/src/main/java/build/buf/protovalidate/Violation.java b/src/main/java/build/buf/protovalidate/Violation.java new file mode 100644 index 00000000..ffc7e9f2 --- /dev/null +++ b/src/main/java/build/buf/protovalidate/Violation.java @@ -0,0 +1,59 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import com.google.protobuf.Descriptors; +import org.jspecify.annotations.Nullable; + +/** {@link Violation} provides all the collected information about an individual rule violation. */ +public interface Violation { + /** {@link FieldValue} represents a Protobuf field value inside a Protobuf message. */ + interface FieldValue { + /** + * Gets the value of the field, which may be null, a primitive, a Map or a List. + * + * @return The value of the protobuf field. + */ + @Nullable Object getValue(); + + /** + * Gets the field descriptor of the field this value is from. + * + * @return A FieldDescriptor pertaining to this field. + */ + Descriptors.FieldDescriptor getDescriptor(); + } + + /** + * Gets the protobuf form of this violation. + * + * @return The protobuf form of this violation. + */ + build.buf.validate.Violation toProto(); + + /** + * Gets the value of the field this violation pertains to, or null if there is none. + * + * @return Value of the field associated with the violation, or null if there is none. + */ + @Nullable FieldValue getFieldValue(); + + /** + * Gets the value of the rule this violation pertains to, or null if there is none. + * + * @return Value of the rule associated with the violation, or null if there is none. + */ + @Nullable FieldValue getRuleValue(); +} diff --git a/src/main/java/build/buf/protovalidate/exceptions/CompilationException.java b/src/main/java/build/buf/protovalidate/exceptions/CompilationException.java index 863b1889..b1f1398c 100644 --- a/src/main/java/build/buf/protovalidate/exceptions/CompilationException.java +++ b/src/main/java/build/buf/protovalidate/exceptions/CompilationException.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ package build.buf.protovalidate.exceptions; -/** CompilationException is returned when a constraint fails to compile. This is a fatal error. */ +/** CompilationException is returned when a rule fails to compile. This is a fatal error. */ public class CompilationException extends ValidationException { /** * Creates a CompilationException with the specified message. diff --git a/src/main/java/build/buf/protovalidate/exceptions/ExecutionException.java b/src/main/java/build/buf/protovalidate/exceptions/ExecutionException.java index 6342029a..2c3b3471 100644 --- a/src/main/java/build/buf/protovalidate/exceptions/ExecutionException.java +++ b/src/main/java/build/buf/protovalidate/exceptions/ExecutionException.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ package build.buf.protovalidate.exceptions; -/** ExecutionException is returned when a constraint fails to execute. This is a fatal error. */ +/** ExecutionException is returned when a rule fails to execute. This is a fatal error. */ public class ExecutionException extends ValidationException { /** * Creates an ExecutionException with the specified message. diff --git a/src/main/java/build/buf/protovalidate/exceptions/ValidationException.java b/src/main/java/build/buf/protovalidate/exceptions/ValidationException.java index 88d78d57..ad989ba5 100644 --- a/src/main/java/build/buf/protovalidate/exceptions/ValidationException.java +++ b/src/main/java/build/buf/protovalidate/exceptions/ValidationException.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/main/java/build/buf/protovalidate/internal/celext/CustomDeclarations.java b/src/main/java/build/buf/protovalidate/internal/celext/CustomDeclarations.java deleted file mode 100644 index 0ab6a3b2..00000000 --- a/src/main/java/build/buf/protovalidate/internal/celext/CustomDeclarations.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.celext; - -import com.google.api.expr.v1alpha1.Decl; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Locale; -import org.projectnessie.cel.checker.Decls; -import org.projectnessie.cel.checker.Types; -import org.projectnessie.cel.common.types.TimestampT; - -/** Defines custom declaration functions. */ -final class CustomDeclarations { - - /** - * Create the custom function declaration list. - * - * @return the list of function declarations. - */ - static List create() { - List decls = new ArrayList<>(); - - // Add 'now' variable declaration - decls.add(Decls.newVar("now", Decls.newObjectType(TimestampT.TimestampType.typeName()))); - - // Add 'isIp' function declaration - decls.add( - Decls.newFunction( - "isIp", - Decls.newInstanceOverload("is_ip", Arrays.asList(Decls.String, Decls.Int), Decls.Bool), - Decls.newInstanceOverload( - "is_ip_unary", Collections.singletonList(Decls.String), Decls.Bool))); - - // Add 'isIpPrefix' function declaration - decls.add( - Decls.newFunction( - "isIpPrefix", - Decls.newInstanceOverload( - "is_ip_prefix_int_bool", - Arrays.asList(Decls.String, Decls.Int, Decls.Bool), - Decls.Bool), - Decls.newInstanceOverload( - "is_ip_prefix_int", Arrays.asList(Decls.String, Decls.Int), Decls.Bool), - Decls.newInstanceOverload( - "is_ip_prefix_bool", Arrays.asList(Decls.String, Decls.Bool), Decls.Bool), - Decls.newInstanceOverload( - "is_ip_prefix", Collections.singletonList(Decls.String), Decls.Bool))); - - // Add 'isUriRef' function declaration - decls.add( - Decls.newFunction( - "isUriRef", - Decls.newInstanceOverload( - "is_uri_ref", Collections.singletonList(Decls.String), Decls.Bool))); - - // Add 'isUri' function declaration - decls.add( - Decls.newFunction( - "isUri", - Decls.newInstanceOverload( - "is_uri", Collections.singletonList(Decls.String), Decls.Bool))); - - // Add 'isEmail' function declaration - decls.add( - Decls.newFunction( - "isEmail", - Decls.newInstanceOverload( - "is_email", Collections.singletonList(Decls.String), Decls.Bool))); - - // Add 'isHostname' function declaration - decls.add( - Decls.newFunction( - "isHostname", - Decls.newInstanceOverload( - "is_hostname", Collections.singletonList(Decls.String), Decls.Bool))); - - decls.add( - Decls.newFunction( - "isHostAndPort", - Decls.newInstanceOverload( - "string_bool_is_host_and_port_bool", - Arrays.asList(Decls.String, Decls.Bool), - Decls.Bool))); - - // Add 'startsWith' function declaration - decls.add( - Decls.newFunction( - "startsWith", - Decls.newInstanceOverload( - "starts_with_bytes", Arrays.asList(Decls.Bytes, Decls.Bytes), Decls.Bool))); - - // Add 'endsWith' function declaration - decls.add( - Decls.newFunction( - "endsWith", - Decls.newInstanceOverload( - "ends_with_bytes", Arrays.asList(Decls.Bytes, Decls.Bytes), Decls.Bool))); - - // Add 'contains' function declaration - decls.add( - Decls.newFunction( - "contains", - Decls.newInstanceOverload( - "contains_bytes", Arrays.asList(Decls.Bytes, Decls.Bytes), Decls.Bool))); - - // Add 'isNan' function declaration - decls.add( - Decls.newFunction( - "isNan", - Decls.newInstanceOverload( - "is_nan", Collections.singletonList(Decls.Double), Decls.Bool))); - - // Add 'isInf' function declaration - decls.add( - Decls.newFunction( - "isInf", - Decls.newInstanceOverload( - "is_inf_unary", Collections.singletonList(Decls.Double), Decls.Bool), - Decls.newInstanceOverload( - "is_inf_binary", Arrays.asList(Decls.Double, Decls.Int), Decls.Bool))); - - // Add 'unique' function declaration - List uniqueOverloads = new ArrayList<>(); - for (com.google.api.expr.v1alpha1.Type type : - Arrays.asList(Decls.String, Decls.Int, Decls.Uint, Decls.Double, Decls.Bytes, Decls.Bool)) { - uniqueOverloads.add( - Decls.newInstanceOverload( - String.format("unique_%s", Types.formatCheckedType(type).toLowerCase(Locale.US)), - Collections.singletonList(type), - Decls.Bool)); - uniqueOverloads.add( - Decls.newInstanceOverload( - String.format("unique_list_%s", Types.formatCheckedType(type).toLowerCase(Locale.US)), - Collections.singletonList(Decls.newListType(type)), - Decls.Bool)); - } - decls.add(Decls.newFunction("unique", uniqueOverloads)); - - // Add 'format' function declaration - List formatOverloads = new ArrayList<>(); - for (com.google.api.expr.v1alpha1.Type type : - Arrays.asList( - Decls.String, - Decls.Int, - Decls.Uint, - Decls.Double, - Decls.Bytes, - Decls.Bool, - Decls.Duration, - Decls.Timestamp)) { - formatOverloads.add( - Decls.newInstanceOverload( - String.format("format_%s", Types.formatCheckedType(type).toLowerCase(Locale.US)), - Arrays.asList(Decls.String, Decls.newListType(type)), - Decls.String)); - formatOverloads.add( - Decls.newInstanceOverload( - String.format("format_list_%s", Types.formatCheckedType(type).toLowerCase(Locale.US)), - Arrays.asList(Decls.String, Decls.newListType(Decls.newListType(type))), - Decls.String)); - formatOverloads.add( - Decls.newInstanceOverload( - String.format( - "format_bytes_%s", Types.formatCheckedType(type).toLowerCase(Locale.US)), - Arrays.asList(Decls.Bytes, Decls.newListType(type)), - Decls.Bytes)); - formatOverloads.add( - Decls.newInstanceOverload( - String.format( - "format_bytes_list_%s", Types.formatCheckedType(type).toLowerCase(Locale.US)), - Arrays.asList(Decls.Bytes, Decls.newListType(Decls.newListType(type))), - Decls.Bytes)); - } - decls.add(Decls.newFunction("format", formatOverloads)); - - return Collections.unmodifiableList(decls); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/celext/CustomOverload.java b/src/main/java/build/buf/protovalidate/internal/celext/CustomOverload.java deleted file mode 100644 index 34b980c1..00000000 --- a/src/main/java/build/buf/protovalidate/internal/celext/CustomOverload.java +++ /dev/null @@ -1,649 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.celext; - -import com.google.common.base.Ascii; -import com.google.common.base.Splitter; -import com.google.common.net.InetAddresses; -import com.google.common.primitives.Bytes; -import inet.ipaddr.IPAddress; -import inet.ipaddr.IPAddressString; -import jakarta.mail.internet.AddressException; -import jakarta.mail.internet.InternetAddress; -import java.net.Inet4Address; -import java.net.Inet6Address; -import java.net.InetAddress; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.HashSet; -import java.util.Set; -import org.projectnessie.cel.common.types.BoolT; -import org.projectnessie.cel.common.types.Err; -import org.projectnessie.cel.common.types.IntT; -import org.projectnessie.cel.common.types.ListT; -import org.projectnessie.cel.common.types.StringT; -import org.projectnessie.cel.common.types.Types; -import org.projectnessie.cel.common.types.ref.TypeEnum; -import org.projectnessie.cel.common.types.ref.Val; -import org.projectnessie.cel.common.types.traits.Lister; -import org.projectnessie.cel.interpreter.functions.Overload; - -/** Defines custom function overloads (the implementation). */ -final class CustomOverload { - - private static final String OVERLOAD_FORMAT = "format"; - private static final String OVERLOAD_UNIQUE = "unique"; - private static final String OVERLOAD_STARTS_WITH = "startsWith"; - private static final String OVERLOAD_ENDS_WITH = "endsWith"; - private static final String OVERLOAD_CONTAINS = "contains"; - private static final String OVERLOAD_IS_HOSTNAME = "isHostname"; - private static final String OVERLOAD_IS_EMAIL = "isEmail"; - private static final String OVERLOAD_IS_IP = "isIp"; - private static final String OVERLOAD_IS_IP_PREFIX = "isIpPrefix"; - private static final String OVERLOAD_IS_URI = "isUri"; - private static final String OVERLOAD_IS_URI_REF = "isUriRef"; - private static final String OVERLOAD_IS_NAN = "isNan"; - private static final String OVERLOAD_IS_INF = "isInf"; - private static final String OVERLOAD_IS_HOST_AND_PORT = "isHostAndPort"; - - /** - * Create custom function overload list. - * - * @return an array of overloaded functions. - */ - static Overload[] create() { - return new Overload[] { - format(), - unique(), - startsWith(), - endsWith(), - contains(), - isHostname(), - isEmail(), - isIp(), - isIpPrefix(), - isUri(), - isUriRef(), - isNan(), - isInf(), - isHostAndPort(), - }; - } - - /** - * Creates a custom binary function overload for the "format" operation. - * - * @return The {@link Overload} instance for the "format" operation. - */ - private static Overload format() { - return Overload.binary( - OVERLOAD_FORMAT, - (lhs, rhs) -> { - if (lhs.type().typeEnum() != TypeEnum.String || rhs.type().typeEnum() != TypeEnum.List) { - return Err.noSuchOverload(lhs, OVERLOAD_FORMAT, rhs); - } - ListT list = (ListT) rhs.convertToType(ListT.ListType); - String formatString = (String) lhs.value(); - try { - return StringT.stringOf(Format.format(formatString, list)); - } catch (Err.ErrException e) { - return e.getErr(); - } - }); - } - - /** - * Creates a custom unary function overload for the "unique" operation. - * - * @return The {@link Overload} instance for the "unique" operation. - */ - private static Overload unique() { - return Overload.unary( - OVERLOAD_UNIQUE, - (val) -> { - if (val.type().typeEnum() != TypeEnum.List) { - return Err.noSuchOverload(val, OVERLOAD_UNIQUE, null); - } - return uniqueList((Lister) val); - }); - } - - /** - * Creates a custom binary function overload for the "startsWith" operation. - * - * @return The {@link Overload} instance for the "startsWith" operation. - */ - private static Overload startsWith() { - return Overload.binary( - OVERLOAD_STARTS_WITH, - (lhs, rhs) -> { - TypeEnum lhsType = lhs.type().typeEnum(); - if (lhsType != rhs.type().typeEnum()) { - return Err.noSuchOverload(lhs, OVERLOAD_STARTS_WITH, rhs); - } - if (lhsType == TypeEnum.String) { - String receiver = lhs.value().toString(); - String param = rhs.value().toString(); - return Types.boolOf(receiver.startsWith(param)); - } - if (lhsType == TypeEnum.Bytes) { - byte[] receiver = (byte[]) lhs.value(); - byte[] param = (byte[]) rhs.value(); - if (receiver.length < param.length) { - return BoolT.False; - } - for (int i = 0; i < param.length; i++) { - if (param[i] != receiver[i]) { - return BoolT.False; - } - } - return BoolT.True; - } - return Err.noSuchOverload(lhs, OVERLOAD_STARTS_WITH, rhs); - }); - } - - /** - * Creates a custom binary function overload for the "endsWith" operation. - * - * @return The {@link Overload} instance for the "endsWith" operation. - */ - private static Overload endsWith() { - return Overload.binary( - OVERLOAD_ENDS_WITH, - (lhs, rhs) -> { - TypeEnum lhsType = lhs.type().typeEnum(); - if (lhsType != rhs.type().typeEnum()) { - return Err.noSuchOverload(lhs, OVERLOAD_ENDS_WITH, rhs); - } - if (lhsType == TypeEnum.String) { - String receiver = (String) lhs.value(); - String param = (String) rhs.value(); - return Types.boolOf(receiver.endsWith(param)); - } - if (lhsType == TypeEnum.Bytes) { - byte[] receiver = (byte[]) lhs.value(); - byte[] param = (byte[]) rhs.value(); - if (receiver.length < param.length) { - return BoolT.False; - } - for (int i = 0; i < param.length; i++) { - if (param[param.length - i - 1] != receiver[receiver.length - i - 1]) { - return BoolT.False; - } - } - return BoolT.True; - } - return Err.noSuchOverload(lhs, OVERLOAD_ENDS_WITH, rhs); - }); - } - - /** - * Creates a custom binary function overload for the "contains" operation. - * - * @return The {@link Overload} instance for the "contains" operation. - */ - private static Overload contains() { - return Overload.binary( - OVERLOAD_CONTAINS, - (lhs, rhs) -> { - TypeEnum lhsType = lhs.type().typeEnum(); - if (lhsType != rhs.type().typeEnum()) { - return Err.noSuchOverload(lhs, OVERLOAD_CONTAINS, rhs); - } - if (lhsType == TypeEnum.String) { - String receiver = lhs.value().toString(); - String param = rhs.value().toString(); - return Types.boolOf(receiver.contains(param)); - } - if (lhsType == TypeEnum.Bytes) { - byte[] receiver = (byte[]) lhs.value(); - byte[] param = (byte[]) rhs.value(); - return Types.boolOf(Bytes.indexOf(receiver, param) != -1); - } - return Err.noSuchOverload(lhs, OVERLOAD_CONTAINS, rhs); - }); - } - - /** - * Creates a custom binary function overload for the "isHostname" operation. - * - * @return The {@link Overload} instance for the "isHostname" operation. - */ - private static Overload isHostname() { - return Overload.unary( - OVERLOAD_IS_HOSTNAME, - value -> { - if (value.type().typeEnum() != TypeEnum.String) { - return Err.noSuchOverload(value, OVERLOAD_IS_HOSTNAME, null); - } - String host = (String) value.value(); - if (host.isEmpty()) { - return BoolT.False; - } - return Types.boolOf(validateHostname(host)); - }); - } - - /** - * Creates a custom unary function overload for the "isEmail" operation. - * - * @return The {@link Overload} instance for the "isEmail" operation. - */ - private static Overload isEmail() { - return Overload.unary( - OVERLOAD_IS_EMAIL, - value -> { - if (value.type().typeEnum() != TypeEnum.String) { - return Err.noSuchOverload(value, OVERLOAD_IS_EMAIL, null); - } - String addr = (String) value.value(); - if (addr.isEmpty()) { - return BoolT.False; - } - return Types.boolOf(validateEmail(addr)); - }); - } - - /** - * Creates a custom function overload for the "isIp" operation. - * - * @return The {@link Overload} instance for the "isIp" operation. - */ - private static Overload isIp() { - return Overload.overload( - OVERLOAD_IS_IP, - null, - value -> { - if (value.type().typeEnum() != TypeEnum.String) { - return Err.noSuchOverload(value, OVERLOAD_IS_IP, null); - } - String addr = (String) value.value(); - if (addr.isEmpty()) { - return BoolT.False; - } - return Types.boolOf(validateIP(addr, 0L)); - }, - (lhs, rhs) -> { - if (lhs.type().typeEnum() != TypeEnum.String || rhs.type().typeEnum() != TypeEnum.Int) { - return Err.noSuchOverload(lhs, OVERLOAD_IS_IP, rhs); - } - String address = (String) lhs.value(); - if (address.isEmpty()) { - return BoolT.False; - } - return Types.boolOf(validateIP(address, rhs.intValue())); - }, - null); - } - - /** - * Creates a custom function overload for the "isIpPrefix" operation. - * - * @return The {@link Overload} instance for the "isIpPrefix" operation. - */ - private static Overload isIpPrefix() { - return Overload.overload( - OVERLOAD_IS_IP_PREFIX, - null, - value -> { - if (value.type().typeEnum() != TypeEnum.String - && value.type().typeEnum() != TypeEnum.Bool) { - return Err.noSuchOverload(value, OVERLOAD_IS_IP_PREFIX, null); - } - String prefix = (String) value.value(); - if (prefix.isEmpty()) { - return BoolT.False; - } - return Types.boolOf(validateIPPrefix(prefix, 0L, false)); - }, - (lhs, rhs) -> { - if (lhs.type().typeEnum() != TypeEnum.String - || (rhs.type().typeEnum() != TypeEnum.Int - && rhs.type().typeEnum() != TypeEnum.Bool)) { - return Err.noSuchOverload(lhs, OVERLOAD_IS_IP_PREFIX, rhs); - } - String prefix = (String) lhs.value(); - if (prefix.isEmpty()) { - return BoolT.False; - } - if (rhs.type().typeEnum() == TypeEnum.Int) { - return Types.boolOf(validateIPPrefix(prefix, rhs.intValue(), false)); - } - return Types.boolOf(validateIPPrefix(prefix, 0L, rhs.booleanValue())); - }, - (values) -> { - if (values.length != 3 - || values[0].type().typeEnum() != TypeEnum.String - || values[1].type().typeEnum() != TypeEnum.Int - || values[2].type().typeEnum() != TypeEnum.Bool) { - return Err.noSuchOverload(values[0], OVERLOAD_IS_IP_PREFIX, "", values); - } - String prefix = (String) values[0].value(); - if (prefix.isEmpty()) { - return BoolT.False; - } - return Types.boolOf( - validateIPPrefix(prefix, values[1].intValue(), values[2].booleanValue())); - }); - } - - /** - * Creates a custom unary function overload for the "isUri" operation. - * - * @return The {@link Overload} instance for the "isUri" operation. - */ - private static Overload isUri() { - return Overload.unary( - OVERLOAD_IS_URI, - value -> { - if (value.type().typeEnum() != TypeEnum.String) { - return Err.noSuchOverload(value, OVERLOAD_IS_URI, null); - } - String addr = (String) value.value(); - if (addr.isEmpty()) { - return BoolT.False; - } - try { - return Types.boolOf(new URL(addr).toURI().isAbsolute()); - } catch (MalformedURLException | URISyntaxException e) { - return BoolT.False; - } - }); - } - - /** - * Creates a custom unary function overload for the "isUriRef" operation. - * - * @return The {@link Overload} instance for the "isUriRef" operation. - */ - private static Overload isUriRef() { - return Overload.unary( - OVERLOAD_IS_URI_REF, - value -> { - if (value.type().typeEnum() != TypeEnum.String) { - return Err.noSuchOverload(value, OVERLOAD_IS_URI_REF, null); - } - String addr = (String) value.value(); - if (addr.isEmpty()) { - return BoolT.False; - } - try { - // TODO: The URL api requires a host or it always fails. - String host = "http://protovalidate.buf.build"; - URL url = new URL(host + addr); - return Types.boolOf(url.getPath() != null && !url.getPath().isEmpty()); - } catch (MalformedURLException e) { - return BoolT.False; - } - }); - } - - /** - * Creates a custom unary function overload for the "isNan" operation. - * - * @return The {@link Overload} instance for the "isNan" operation. - */ - private static Overload isNan() { - return Overload.unary( - OVERLOAD_IS_NAN, - value -> { - if (value.type().typeEnum() != TypeEnum.Double) { - return Err.noSuchOverload(value, OVERLOAD_IS_NAN, null); - } - Double doubleVal = (Double) value.value(); - return Types.boolOf(doubleVal.isNaN()); - }); - } - - /** - * Creates a custom unary function overload for the "isInf" operation. - * - * @return The {@link Overload} instance for the "isInf" operation. - */ - private static Overload isInf() { - return Overload.overload( - OVERLOAD_IS_INF, - null, - value -> { - if (value.type().typeEnum() != TypeEnum.Double) { - return Err.noSuchOverload(value, OVERLOAD_IS_INF, null); - } - Double doubleVal = (Double) value.value(); - return Types.boolOf(doubleVal.isInfinite()); - }, - (lhs, rhs) -> { - if (lhs.type().typeEnum() != TypeEnum.Double || rhs.type().typeEnum() != TypeEnum.Int) { - return Err.noSuchOverload(lhs, OVERLOAD_IS_INF, rhs); - } - Double value = (Double) lhs.value(); - long sign = rhs.intValue(); - if (sign == 0) { - return Types.boolOf(value.isInfinite()); - } - double expectedValue = (sign > 0) ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; - return Types.boolOf(value == expectedValue); - }, - null); - } - - private static Overload isHostAndPort() { - return Overload.overload( - OVERLOAD_IS_HOST_AND_PORT, - null, - null, - (lhs, rhs) -> { - if (lhs.type().typeEnum() != TypeEnum.String || rhs.type().typeEnum() != TypeEnum.Bool) { - return Err.noSuchOverload(lhs, OVERLOAD_IS_HOST_AND_PORT, rhs); - } - String value = (String) lhs.value(); - boolean portRequired = rhs.booleanValue(); - return Types.boolOf(hostAndPort(value, portRequired)); - }, - null); - } - - private static boolean hostAndPort(String value, boolean portRequired) { - if (value.isEmpty()) { - return false; - } - int splitIdx = value.lastIndexOf(':'); - if (value.charAt(0) == '[') { // ipv6 - int end = value.indexOf(']'); - if (end + 1 == value.length()) { // no port - return !portRequired && validateIP(value.substring(1, end), 6); - } - if (end + 1 == splitIdx) { // port - return validateIP(value.substring(1, end), 6) - && validatePort(value.substring(splitIdx + 1)); - } - return false; // malformed - } - if (splitIdx < 0) { - return !portRequired && (validateHostname(value) || validateIP(value, 4)); - } - String host = value.substring(0, splitIdx); - String port = value.substring(splitIdx + 1); - return (validateHostname(host) || validateIP(host, 4)) && validatePort(port); - } - - private static boolean validatePort(String value) { - try { - int portNum = Integer.parseInt(value); - return portNum >= 0 && portNum <= 65535; - } catch (NumberFormatException nfe) { - return false; - } - } - - /** - * Determines if the input list contains unique values. If the list contains duplicate values, it - * returns {@link BoolT#False}. If the list contains unique values, it returns {@link BoolT#True}. - * - * @param list The input list to check for uniqueness. - * @return {@link BoolT#True} if the list contains unique scalar values, {@link BoolT#False} - * otherwise. - */ - private static Val uniqueList(Lister list) { - long size = list.size().intValue(); - if (size == 0) { - return BoolT.True; - } - Set exist = new HashSet<>((int) size); - Val firstVal = list.get(IntT.intOf(0)); - switch (firstVal.type().typeEnum()) { - case Bool: - case Int: - case Uint: - case Double: - case String: - case Bytes: - break; - default: - return Err.noSuchOverload(list, OVERLOAD_UNIQUE, null); - } - exist.add(firstVal); - for (int i = 1; i < size; i++) { - Val val = list.get(IntT.intOf(i)); - if (!exist.add(val)) { - return BoolT.False; - } - } - return BoolT.True; - } - - /** - * Validates if the input string is a valid email address. - * - * @param addr The input string to validate as an email address. - * @return {@code true} if the input string is a valid email address, {@code false} otherwise. - */ - private static boolean validateEmail(String addr) { - try { - InternetAddress emailAddr = new InternetAddress(addr); - emailAddr.validate(); - if (addr.contains("<") || !emailAddr.getAddress().equals(addr)) { - return false; - } - addr = emailAddr.getAddress(); - if (addr.length() > 254) { - return false; - } - String[] parts = addr.split("@", 2); - return parts[0].length() < 64 && validateHostname(parts[1]); - } catch (AddressException ex) { - return false; - } - } - - /** - * Validates if the input string is a valid hostname. - * - * @param host The input string to validate as a hostname. - * @return {@code true} if the input string is a valid hostname, {@code false} otherwise. - */ - private static boolean validateHostname(String host) { - if (host.length() > 253) { - return false; - } - String s = Ascii.toLowerCase(host.endsWith(".") ? host.substring(0, host.length() - 1) : host); - Iterable parts = Splitter.on('.').split(s); - boolean allDigits = false; - for (String part : parts) { - allDigits = true; - int l = part.length(); - if (l == 0 || l > 63 || part.charAt(0) == '-' || part.charAt(l - 1) == '-') { - return false; - } - for (int i = 0; i < l; i++) { - char ch = part.charAt(i); - if (!Ascii.isLowerCase(ch) && !isDigit(ch) && ch != '-') { - return false; - } - allDigits = allDigits && isDigit(ch); - } - } - // the last part cannot be all numbers - return !allDigits; - } - - private static boolean isDigit(char c) { - return c >= '0' && c <= '9'; - } - - /** - * Validates if the input string is a valid IP address. - * - * @param addr The input string to validate as an IP address. - * @param ver The IP version to validate against (0 for any version, 4 for IPv4, 6 for IPv6). - * @return {@code true} if the input string is a valid IP address of the specified version, {@code - * false} otherwise. - */ - private static boolean validateIP(String addr, long ver) { - InetAddress address; - try { - address = InetAddresses.forString(addr); - } catch (Exception e) { - return false; - } - if (ver == 0L) { - return true; - } else if (ver == 4L) { - return address instanceof Inet4Address; - } else if (ver == 6L) { - return address instanceof Inet6Address; - } - return false; - } - - /** - * Validates if the input string is a valid IP prefix. - * - * @param prefix The input string to validate as an IP prefix. - * @param ver The IP version to validate against (0 for any version, 4 for IPv4, 6 for IPv6). - * @param strict If strict is true and host bits are set in the supplied address, then false is - * returned. - * @return {@code true} if the input string is a valid IP prefix of the specified version, {@code - * false} otherwise. - */ - private static boolean validateIPPrefix(String prefix, long ver, boolean strict) { - IPAddressString str; - IPAddress addr; - try { - str = new IPAddressString(prefix); - addr = str.toAddress(); - } catch (Exception e) { - return false; - } - if (!addr.isPrefixed()) { - return false; - } - if (strict) { - IPAddress mask = addr.getNetworkMask().withoutPrefixLength(); - if (!addr.mask(mask).equals(str.getHostAddress())) { - return false; - } - } - if (ver == 0L) { - return true; - } else if (ver == 4L) { - return addr.isIPv4(); - } else if (ver == 6L) { - return addr.isIPv6(); - } - return false; - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/celext/Format.java b/src/main/java/build/buf/protovalidate/internal/celext/Format.java deleted file mode 100644 index df662494..00000000 --- a/src/main/java/build/buf/protovalidate/internal/celext/Format.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.celext; - -import com.google.protobuf.Duration; -import com.google.protobuf.Timestamp; -import java.nio.charset.StandardCharsets; -import java.text.DecimalFormat; -import java.util.List; -import org.projectnessie.cel.common.types.Err.ErrException; -import org.projectnessie.cel.common.types.IntT; -import org.projectnessie.cel.common.types.ListT; -import org.projectnessie.cel.common.types.pb.Db; -import org.projectnessie.cel.common.types.pb.DefaultTypeAdapter; -import org.projectnessie.cel.common.types.ref.TypeEnum; -import org.projectnessie.cel.common.types.ref.Val; - -/** String formatter for CEL evaluation. */ -final class Format { - private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray(); - private static final char[] LOWER_HEX_ARRAY = "0123456789abcdef".toCharArray(); - - /** - * Format the string with a {@link ListT}. - * - * @param fmtString the string to format. - * @param list the arguments. - * @return the formatted string. - * @throws ErrException If an error occurs formatting the string. - */ - static String format(String fmtString, ListT list) { - // StringBuilder to accumulate the formatted string - StringBuilder builder = new StringBuilder(); - int index = 0; - int argIndex = 0; - while (index < fmtString.length()) { - char c = fmtString.charAt(index++); - if (c != '%') { - // Append non-format characters directly - builder.append(c); - // Add the entire character if it's not a UTF-8 character. - if ((c & 0x80) != 0) { - // Add the rest of the UTF-8 character. - while (index < fmtString.length() && (fmtString.charAt(index) & 0xc0) == 0x80) { - builder.append(fmtString.charAt(index++)); - } - } - continue; - } - if (index >= fmtString.length()) { - throw new ErrException("format: expected format specifier"); - } - if (fmtString.charAt(index) == '%') { - // Escaped '%', append '%' and move to the next character - builder.append('%'); - index++; - continue; - } - if (argIndex >= list.size().intValue()) { - throw new ErrException("format: not enough arguments"); - } - Val arg = list.get(IntT.intOf(argIndex++)); - c = fmtString.charAt(index++); - int precision = 6; - if (c == '.') { - // parse the precision - precision = 0; - while (index < fmtString.length() - && '0' <= fmtString.charAt(index) - && fmtString.charAt(index) <= '9') { - precision = precision * 10 + (fmtString.charAt(index++) - '0'); - } - if (index >= fmtString.length()) { - throw new ErrException("format: expected format specifier"); - } - c = fmtString.charAt(index++); - } - - switch (c) { - case 'd': - formatDecimal(builder, arg); - break; - case 'x': - formatHex(builder, arg, LOWER_HEX_ARRAY); - break; - case 'X': - formatHex(builder, arg, HEX_ARRAY); - break; - case 's': - formatString(builder, arg); - break; - case 'e': - case 'f': - case 'b': - case 'o': - default: - throw new ErrException("format: unparsable format specifier %s", c); - } - } - return builder.toString(); - } - - /** - * Converts a byte array to a hexadecimal string representation. - * - * @param bytes the byte array to convert. - * @param digits the array of hexadecimal digits. - * @return the hexadecimal string representation. - */ - private static String bytesToHex(byte[] bytes, char[] digits) { - char[] hexChars = new char[bytes.length * 2]; - for (int j = 0; j < bytes.length; j++) { - int v = bytes[j] & 0xFF; - hexChars[j * 2] = digits[v >>> 4]; - hexChars[j * 2 + 1] = digits[v & 0x0F]; - } - return new String(hexChars); - } - - /** - * Formats a string value. - * - * @param builder the StringBuilder to append the formatted string to. - * @param val the value to format. - */ - private static void formatString(StringBuilder builder, Val val) { - if (val.type().typeEnum() == TypeEnum.String) { - builder.append(val.value()); - } else if (val.type().typeEnum() == TypeEnum.Bytes) { - builder.append(val.value()); - } else { - formatStringSafe(builder, val, false); - } - } - - /** - * Formats a string value safely for other value types. - * - * @param builder the StringBuilder to append the formatted string to. - * @param val the value to format. - * @param listType indicates if the value type is a list. - */ - private static void formatStringSafe(StringBuilder builder, Val val, boolean listType) { - TypeEnum type = val.type().typeEnum(); - if (type == TypeEnum.Bool) { - builder.append(val.booleanValue()); - } else if (type == TypeEnum.Int || type == TypeEnum.Uint) { - formatDecimal(builder, val); - } else if (type == TypeEnum.Double) { - DecimalFormat format = new DecimalFormat("0.#"); - builder.append(format.format(val.value())); - } else if (type == TypeEnum.String) { - builder.append("\"").append(val.value().toString()).append("\""); - } else if (type == TypeEnum.Bytes) { - formatBytes(builder, val); - } else if (type == TypeEnum.Duration) { - formatDuration(builder, val, listType); - } else if (type == TypeEnum.Timestamp) { - formatTimestamp(builder, val); - } else if (type == TypeEnum.List) { - formatList(builder, val); - } else if (type == TypeEnum.Map) { - throw new ErrException("unimplemented stringSafe map type"); - } else if (type == TypeEnum.Null) { - throw new ErrException("unimplemented stringSafe null type"); - } - } - - /** - * Formats a list value. - * - * @param builder the StringBuilder to append the formatted list value to. - * @param val the value to format. - */ - @SuppressWarnings("rawtypes") - private static void formatList(StringBuilder builder, Val val) { - builder.append('['); - List list = val.convertToNative(List.class); - for (int i = 0; i < list.size(); i++) { - Object obj = list.get(i); - formatStringSafe(builder, DefaultTypeAdapter.nativeToValue(Db.newDb(), null, obj), true); - if (i != list.size() - 1) { - builder.append(", "); - } - } - builder.append(']'); - } - - /** - * Formats a timestamp value. - * - * @param builder the StringBuilder to append the formatted timestamp value to. - * @param val the value to format. - */ - private static void formatTimestamp(StringBuilder builder, Val val) { - builder.append("timestamp("); - Timestamp timestamp = val.convertToNative(Timestamp.class); - builder.append(timestamp.toString()); - builder.append(")"); - } - - /** - * Formats a duration value. - * - * @param builder the StringBuilder to append the formatted duration value to. - * @param val the value to format. - * @param listType indicates if the value type is a list. - */ - private static void formatDuration(StringBuilder builder, Val val, boolean listType) { - if (listType) { - builder.append("duration(\""); - } - Duration duration = val.convertToNative(Duration.class); - - double totalSeconds = duration.getSeconds() + (duration.getNanos() / 1_000_000_000.0); - - DecimalFormat format = new DecimalFormat("0.#########"); - builder.append(format.format(totalSeconds)); - builder.append("s"); - if (listType) { - builder.append("\")"); - } - } - - /** - * Formats a byte array value. - * - * @param builder the StringBuilder to append the formatted byte array value to. - * @param val the value to format. - */ - private static void formatBytes(StringBuilder builder, Val val) { - builder - .append("\"") - .append(new String((byte[]) val.value(), StandardCharsets.UTF_8)) - .append("\""); - } - - /** - * Formats a hexadecimal value. - * - * @param builder the StringBuilder to append the formatted hexadecimal value to. - * @param val the value to format. - * @param digits the array of hexadecimal digits. - */ - private static void formatHex(StringBuilder builder, Val val, char[] digits) { - String hexString; - TypeEnum type = val.type().typeEnum(); - if (type == TypeEnum.Int || type == TypeEnum.Uint) { - hexString = Long.toHexString(val.intValue()); - } else if (type == TypeEnum.Bytes) { - byte[] bytes = (byte[]) val.value(); - hexString = bytesToHex(bytes, digits); - } else if (type == TypeEnum.String) { - hexString = val.value().toString(); - } else { - throw new ErrException("formatHex: expected int or string"); - } - builder.append(hexString); - } - - /** - * Formats a decimal value. - * - * @param builder the StringBuilder to append the formatted decimal value to. - * @param arg the value to format. - */ - private static void formatDecimal(StringBuilder builder, Val arg) { - builder.append(arg.value()); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/celext/ValidateLibrary.java b/src/main/java/build/buf/protovalidate/internal/celext/ValidateLibrary.java deleted file mode 100644 index d87da052..00000000 --- a/src/main/java/build/buf/protovalidate/internal/celext/ValidateLibrary.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.celext; - -import build.buf.protovalidate.internal.expression.NowVariable; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import org.projectnessie.cel.EnvOption; -import org.projectnessie.cel.EvalOption; -import org.projectnessie.cel.Library; -import org.projectnessie.cel.ProgramOption; - -/** - * Custom {@link Library} for CEL. Provides all the custom extension function definitions and - * overloads. - */ -public class ValidateLibrary implements Library { - - /** Creates a ValidateLibrary with all custom declarations and overloads. */ - public ValidateLibrary() {} - - /** - * Returns the compile options for the CEL environment. - * - * @return the compile options. - */ - @Override - public List getCompileOptions() { - return Collections.singletonList(EnvOption.declarations(CustomDeclarations.create())); - } - - /** - * Returns the program options for the CEL program. - * - * @return the program options. - */ - @Override - public List getProgramOptions() { - return Arrays.asList( - ProgramOption.evalOptions(EvalOption.OptOptimize), - ProgramOption.globals(new NowVariable()), - ProgramOption.functions(CustomOverload.create())); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java b/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java deleted file mode 100644 index 1881a882..00000000 --- a/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.constraints; - -import build.buf.protovalidate.Config; -import build.buf.protovalidate.exceptions.CompilationException; -import build.buf.protovalidate.internal.expression.AstExpression; -import build.buf.protovalidate.internal.expression.CompiledProgram; -import build.buf.protovalidate.internal.expression.Expression; -import build.buf.protovalidate.internal.expression.Variable; -import build.buf.validate.FieldConstraints; -import build.buf.validate.ValidateProto; -import com.google.protobuf.DescriptorProtos; -import com.google.protobuf.Descriptors; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.DynamicMessage; -import com.google.protobuf.ExtensionRegistry; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.Message; -import com.google.protobuf.MessageLite; -import com.google.protobuf.TypeRegistry; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.Nullable; -import org.projectnessie.cel.Ast; -import org.projectnessie.cel.Env; -import org.projectnessie.cel.EnvOption; -import org.projectnessie.cel.EvalOption; -import org.projectnessie.cel.Program; -import org.projectnessie.cel.ProgramOption; -import org.projectnessie.cel.checker.Decls; -import org.projectnessie.cel.common.types.ref.Val; -import org.projectnessie.cel.interpreter.Activation; - -/** A build-through cache for computed standard constraints. */ -public class ConstraintCache { - private static class CelRule { - public final AstExpression astExpression; - public final FieldDescriptor field; - - public CelRule(AstExpression astExpression, FieldDescriptor field) { - this.astExpression = astExpression; - this.field = field; - } - } - - private static final ExtensionRegistry EXTENSION_REGISTRY = ExtensionRegistry.newInstance(); - - static { - EXTENSION_REGISTRY.add(ValidateProto.predefined); - } - - /** Partial eval options for evaluating the constraint's expression. */ - private static final ProgramOption PARTIAL_EVAL_OPTIONS = - ProgramOption.evalOptions( - EvalOption.OptTrackState, - EvalOption.OptExhaustiveEval, - EvalOption.OptOptimize, - EvalOption.OptPartialEval); - - /** - * Concurrent map for caching {@link FieldDescriptor} and their associated List of {@link - * AstExpression}. - */ - private static final Map> descriptorMap = - new ConcurrentHashMap<>(); - - /** The environment to use for evaluation. */ - private final Env env; - - /** Registry used to resolve dynamic messages. */ - private final TypeRegistry typeRegistry; - - /** Registry used to resolve dynamic extensions. */ - private final ExtensionRegistry extensionRegistry; - - /** Whether to allow unknown constraint fields or not. */ - private final boolean allowUnknownFields; - - /** - * Constructs a new build-through cache for the standard constraints, with a provided registry to - * resolve dynamic extensions. - * - * @param env The CEL environment for evaluation. - * @param config The configuration to use for the constraint cache. - */ - public ConstraintCache(Env env, Config config) { - this.env = env; - this.typeRegistry = config.getTypeRegistry(); - this.extensionRegistry = config.getExtensionRegistry(); - this.allowUnknownFields = config.isAllowingUnknownFields(); - } - - /** - * Creates the standard constraints for the given field. If forItems is true, the constraints for - * repeated list items is built instead of the constraints on the list itself. - * - * @param fieldDescriptor The field descriptor to be validated. - * @param fieldConstraints The field constraint that is used for validation. - * @param forItems The field is an item list type. - * @return The list of compiled programs. - * @throws CompilationException If the constraints fail to compile. - */ - public List compile( - FieldDescriptor fieldDescriptor, FieldConstraints fieldConstraints, boolean forItems) - throws CompilationException { - Message message = resolveConstraints(fieldDescriptor, fieldConstraints, forItems); - if (message == null) { - // Message null means there were no constraints resolved. - return Collections.emptyList(); - } - List completeProgramList = new ArrayList<>(); - for (Map.Entry entry : message.getAllFields().entrySet()) { - FieldDescriptor constraintFieldDesc = entry.getKey(); - List programList = - compileRule(fieldDescriptor, forItems, constraintFieldDesc, message); - if (programList == null) continue; - completeProgramList.addAll(programList); - } - List programs = new ArrayList<>(); - for (CelRule rule : completeProgramList) { - Env ruleEnv = getRuleEnv(fieldDescriptor, message, rule.field, forItems); - Variable ruleVar = Variable.newRuleVariable(message, message.getField(rule.field)); - ProgramOption globals = ProgramOption.globals(ruleVar); - try { - Program program = ruleEnv.program(rule.astExpression.ast, globals, PARTIAL_EVAL_OPTIONS); - Program.EvalResult evalResult = program.eval(Activation.emptyActivation()); - Val value = evalResult.getVal(); - if (value != null) { - Object val = value.value(); - if (val instanceof Boolean && value.booleanValue()) { - continue; - } - if (val instanceof String && val.equals("")) { - continue; - } - } - Ast residual = ruleEnv.residualAst(rule.astExpression.ast, evalResult.getEvalDetails()); - programs.add( - new CompiledProgram(ruleEnv.program(residual, globals), rule.astExpression.source)); - } catch (Exception e) { - programs.add( - new CompiledProgram( - ruleEnv.program(rule.astExpression.ast, globals), rule.astExpression.source)); - } - } - return Collections.unmodifiableList(programs); - } - - private @Nullable List compileRule( - FieldDescriptor fieldDescriptor, - boolean forItems, - FieldDescriptor constraintFieldDesc, - Message message) - throws CompilationException { - List celRules = descriptorMap.get(fieldDescriptor); - if (celRules != null) { - return celRules; - } - build.buf.validate.PredefinedConstraints constraints = getFieldConstraints(constraintFieldDesc); - if (constraints == null) return null; - List expressions = Expression.fromConstraints(constraints.getCelList()); - celRules = new ArrayList<>(expressions.size()); - Env ruleEnv = getRuleEnv(fieldDescriptor, message, constraintFieldDesc, forItems); - for (Expression expression : expressions) { - celRules.add( - new CelRule(AstExpression.newAstExpression(ruleEnv, expression), constraintFieldDesc)); - } - descriptorMap.put(constraintFieldDesc, celRules); - return celRules; - } - - private @Nullable build.buf.validate.PredefinedConstraints getFieldConstraints( - FieldDescriptor constraintFieldDesc) throws CompilationException { - DescriptorProtos.FieldOptions options = constraintFieldDesc.getOptions(); - // If the protovalidate field option is unknown, reparse options using our extension registry. - if (options.getUnknownFields().hasField(ValidateProto.predefined.getNumber())) { - try { - options = - DescriptorProtos.FieldOptions.parseFrom(options.toByteString(), EXTENSION_REGISTRY); - } catch (InvalidProtocolBufferException e) { - throw new CompilationException("Failed to parse field options", e); - } - } - if (!options.hasExtension(ValidateProto.predefined)) { - return null; - } - Object extensionValue = options.getField(ValidateProto.predefined.getDescriptor()); - build.buf.validate.PredefinedConstraints constraints; - if (extensionValue instanceof build.buf.validate.PredefinedConstraints) { - constraints = (build.buf.validate.PredefinedConstraints) extensionValue; - } else if (extensionValue instanceof MessageLite) { - // Extension is parsed but with different gencode. We need to reparse it. - try { - constraints = - build.buf.validate.PredefinedConstraints.parseFrom( - ((MessageLite) extensionValue).toByteString()); - } catch (InvalidProtocolBufferException e) { - throw new CompilationException("Failed to parse field constraints", e); - } - } else { - // Extension was not a message, just discard it. - return null; - } - return constraints; - } - - /** - * Calculates the environment for a specific rule invocation. - * - * @param fieldDescriptor The field descriptor of the field with the constraint. - * @param constraintMessage The message of the standard constraints. - * @param constraintFieldDesc The field descriptor of the constraint. - * @param forItems Whether the field is a list type or not. - * @return An environment with requisite declarations and types added. - */ - private Env getRuleEnv( - FieldDescriptor fieldDescriptor, - Message constraintMessage, - FieldDescriptor constraintFieldDesc, - boolean forItems) { - return env.extend( - EnvOption.types(constraintMessage.getDefaultInstanceForType()), - EnvOption.declarations( - Decls.newVar( - Variable.THIS_NAME, DescriptorMappings.getCELType(fieldDescriptor, forItems)), - Decls.newVar( - Variable.RULES_NAME, - Decls.newObjectType(constraintMessage.getDescriptorForType().getFullName())), - Decls.newVar( - Variable.RULE_NAME, DescriptorMappings.getCELType(constraintFieldDesc, forItems)))); - } - - /** - * Extracts the standard constraints for the specified field. An exception is thrown if the wrong - * constraints are applied to a field (typically if there is a type-mismatch). Null is returned if - * there are no standard constraints to apply to this field. - */ - @Nullable - private Message resolveConstraints( - FieldDescriptor fieldDescriptor, FieldConstraints fieldConstraints, boolean forItems) - throws CompilationException { - // Get the oneof field descriptor from the field constraints. - FieldDescriptor oneofFieldDescriptor = - fieldConstraints.getOneofFieldDescriptor(DescriptorMappings.FIELD_CONSTRAINTS_ONEOF_DESC); - if (oneofFieldDescriptor == null) { - // If the oneof field descriptor is null there are no constraints to resolve. - return null; - } - - // Get the expected constraint descriptor based on the provided field descriptor and the flag - // indicating whether it is for items. - FieldDescriptor expectedConstraintDescriptor = - DescriptorMappings.getExpectedConstraintDescriptor(fieldDescriptor, forItems); - if (expectedConstraintDescriptor != null - && !oneofFieldDescriptor.getFullName().equals(expectedConstraintDescriptor.getFullName())) { - // If the expected constraint does not match the actual oneof constraint, throw a - // CompilationError. - throw new CompilationException( - String.format( - "expected constraint %s, got %s on field %s", - expectedConstraintDescriptor.getName(), - oneofFieldDescriptor.getName(), - fieldDescriptor.getName())); - } - - // If the expected constraint descriptor is null or if the field constraints do not have the - // oneof field descriptor - // there are no constraints to resolve, so return null. - if (expectedConstraintDescriptor == null || !fieldConstraints.hasField(oneofFieldDescriptor)) { - return null; - } - - // Get the field from the field constraints identified by the oneof field descriptor, casted - // as a Message. - Message typeConstraints = (Message) fieldConstraints.getField(oneofFieldDescriptor); - if (!typeConstraints.getUnknownFields().isEmpty()) { - // If there are unknown fields, try to resolve them using the provided registries. Note that - // we use the type registry to resolve the message descriptor. This is because Java protobuf - // extension resolution relies on descriptor identity. The user's provided type registry can - // provide matching message descriptors for the user's provided extension registry. See the - // documentation for Options.setTypeRegistry for more information. - Descriptors.Descriptor expectedConstraintMessageDescriptor = - typeRegistry.find(expectedConstraintDescriptor.getMessageType().getFullName()); - if (expectedConstraintMessageDescriptor == null) { - expectedConstraintMessageDescriptor = expectedConstraintDescriptor.getMessageType(); - } - try { - typeConstraints = - DynamicMessage.parseFrom( - expectedConstraintMessageDescriptor, - typeConstraints.toByteString(), - extensionRegistry); - } catch (InvalidProtocolBufferException e) { - throw new RuntimeException(e); - } - } - if (!allowUnknownFields && !typeConstraints.getUnknownFields().isEmpty()) { - throw new CompilationException("unrecognized field constraints"); - } - return typeConstraints; - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java b/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java deleted file mode 100644 index 9866bcb6..00000000 --- a/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.constraints; - -import build.buf.validate.FieldConstraints; -import com.google.api.expr.v1alpha1.Type; -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.Descriptors.OneofDescriptor; -import java.util.HashMap; -import java.util.Map; -import javax.annotation.Nullable; -import org.projectnessie.cel.checker.Decls; - -/** - * DescriptorMappings provides mappings between protocol buffer descriptors and CEL declarations. - */ -public final class DescriptorMappings { - /** Provides a {@link Descriptor} for {@link FieldConstraints}. */ - static final Descriptor FIELD_CONSTRAINTS_DESC = FieldConstraints.getDescriptor(); - - /** Provides the {@link OneofDescriptor} for the type union in {@link FieldConstraints}. */ - static final OneofDescriptor FIELD_CONSTRAINTS_ONEOF_DESC = - FIELD_CONSTRAINTS_DESC.getOneofs().get(0); - - /** Provides the {@link FieldDescriptor} for the map standard constraints. */ - static final FieldDescriptor MAP_FIELD_CONSTRAINTS_DESC = - FIELD_CONSTRAINTS_DESC.findFieldByName("map"); - - /** Provides the {@link FieldDescriptor} for the repeated standard constraints. */ - static final FieldDescriptor REPEATED_FIELD_CONSTRAINTS_DESC = - FIELD_CONSTRAINTS_DESC.findFieldByName("repeated"); - - /** Maps protocol buffer field kinds to their expected field constraints. */ - static final Map EXPECTED_STANDARD_CONSTRAINTS = - new HashMap<>(); - - /** - * Returns the {@link build.buf.validate.FieldConstraints} field that is expected for the given - * wrapper well-known type's full name. If ok is false, no standard constraints exist for that - * type. - */ - static final Map EXPECTED_WKT_CONSTRAINTS = new HashMap<>(); - - static { - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.FLOAT, FIELD_CONSTRAINTS_DESC.findFieldByName("float")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.DOUBLE, FIELD_CONSTRAINTS_DESC.findFieldByName("double")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.INT32, FIELD_CONSTRAINTS_DESC.findFieldByName("int32")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.INT64, FIELD_CONSTRAINTS_DESC.findFieldByName("int64")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.UINT32, FIELD_CONSTRAINTS_DESC.findFieldByName("uint32")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.UINT64, FIELD_CONSTRAINTS_DESC.findFieldByName("uint64")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.SINT32, FIELD_CONSTRAINTS_DESC.findFieldByName("sint32")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.SINT64, FIELD_CONSTRAINTS_DESC.findFieldByName("sint64")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.FIXED32, FIELD_CONSTRAINTS_DESC.findFieldByName("fixed32")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.FIXED64, FIELD_CONSTRAINTS_DESC.findFieldByName("fixed64")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.SFIXED32, FIELD_CONSTRAINTS_DESC.findFieldByName("sfixed32")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.SFIXED64, FIELD_CONSTRAINTS_DESC.findFieldByName("sfixed64")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.BOOL, FIELD_CONSTRAINTS_DESC.findFieldByName("bool")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.STRING, FIELD_CONSTRAINTS_DESC.findFieldByName("string")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.BYTES, FIELD_CONSTRAINTS_DESC.findFieldByName("bytes")); - EXPECTED_STANDARD_CONSTRAINTS.put( - FieldDescriptor.Type.ENUM, FIELD_CONSTRAINTS_DESC.findFieldByName("enum")); - - EXPECTED_WKT_CONSTRAINTS.put( - "google.protobuf.Any", FIELD_CONSTRAINTS_DESC.findFieldByName("any")); - EXPECTED_WKT_CONSTRAINTS.put( - "google.protobuf.Duration", FIELD_CONSTRAINTS_DESC.findFieldByName("duration")); - EXPECTED_WKT_CONSTRAINTS.put( - "google.protobuf.Timestamp", FIELD_CONSTRAINTS_DESC.findFieldByName("timestamp")); - } - - private DescriptorMappings() {} - - /** - * Returns the {@link FieldConstraints} field that is expected for the given protocol buffer field - * kind. - * - * @param fqn Fully qualified name of protobuf value wrapper. - * @return The constraints field descriptor for the specified wrapper fully qualified name. - */ - @Nullable - public static FieldDescriptor expectedWrapperConstraints(String fqn) { - switch (fqn) { - case "google.protobuf.BoolValue": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.BOOL); - case "google.protobuf.BytesValue": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.BYTES); - case "google.protobuf.DoubleValue": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.DOUBLE); - case "google.protobuf.FloatValue": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.FLOAT); - case "google.protobuf.Int32Value": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.INT32); - case "google.protobuf.Int64Value": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.INT64); - case "google.protobuf.StringValue": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.STRING); - case "google.protobuf.UInt32Value": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.UINT32); - case "google.protobuf.UInt64Value": - return EXPECTED_STANDARD_CONSTRAINTS.get(FieldDescriptor.Type.UINT64); - default: - return null; - } - } - - /** - * Maps a {@link FieldDescriptor.Type} to a compatible {@link com.google.api.expr.v1alpha1.Type}. - * - * @param kind The protobuf field type. - * @return The corresponding CEL type for the protobuf field. - */ - public static Type protoKindToCELType(FieldDescriptor.Type kind) { - switch (kind) { - case FLOAT: - case DOUBLE: - return Decls.newPrimitiveType(Type.PrimitiveType.DOUBLE); - case INT32: - case INT64: - case SINT32: - case SINT64: - case SFIXED32: - case SFIXED64: - case ENUM: - return Decls.newPrimitiveType(Type.PrimitiveType.INT64); - case UINT32: - case UINT64: - case FIXED32: - case FIXED64: - return Decls.newPrimitiveType(Type.PrimitiveType.UINT64); - case BOOL: - return Decls.newPrimitiveType(Type.PrimitiveType.BOOL); - case STRING: - return Decls.newPrimitiveType(Type.PrimitiveType.STRING); - case BYTES: - return Decls.newPrimitiveType(Type.PrimitiveType.BYTES); - case MESSAGE: - case GROUP: - return Type.newBuilder().setMessageType(kind.getJavaType().name()).build(); - default: - return Type.newBuilder() - .setPrimitive(Type.PrimitiveType.PRIMITIVE_TYPE_UNSPECIFIED) - .build(); - } - } - - /** - * Produces the field descriptor from the {@link FieldConstraints} 'type' oneof that matches the - * provided target field descriptor. If the returned value is null, the field does not expect any - * standard constraints. - */ - @Nullable - static FieldDescriptor getExpectedConstraintDescriptor( - FieldDescriptor fieldDescriptor, boolean forItems) { - if (fieldDescriptor.isMapField()) { - return DescriptorMappings.MAP_FIELD_CONSTRAINTS_DESC; - } else if (fieldDescriptor.isRepeated() && !forItems) { - return DescriptorMappings.REPEATED_FIELD_CONSTRAINTS_DESC; - } else if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - return DescriptorMappings.EXPECTED_WKT_CONSTRAINTS.get( - fieldDescriptor.getMessageType().getFullName()); - } else { - return DescriptorMappings.EXPECTED_STANDARD_CONSTRAINTS.get(fieldDescriptor.getType()); - } - } - - /** - * Resolves the CEL value type for the provided {@link FieldDescriptor}. If forItems is true, the - * type for the repeated list items is returned instead of the list type itself. - */ - static Type getCELType(FieldDescriptor fieldDescriptor, boolean forItems) { - if (!forItems) { - if (fieldDescriptor.isMapField()) { - return Decls.newMapType( - getCELType(fieldDescriptor.getMessageType().findFieldByNumber(1), true), - getCELType(fieldDescriptor.getMessageType().findFieldByNumber(2), true)); - } else if (fieldDescriptor.isRepeated()) { - return Decls.newListType(getCELType(fieldDescriptor, true)); - } - } - - if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - String fqn = fieldDescriptor.getMessageType().getFullName(); - switch (fqn) { - case "google.protobuf.Any": - return Decls.newWellKnownType(Type.WellKnownType.ANY); - case "google.protobuf.Duration": - return Decls.newWellKnownType(Type.WellKnownType.DURATION); - case "google.protobuf.Timestamp": - return Decls.newWellKnownType(Type.WellKnownType.TIMESTAMP); - default: - return Decls.newObjectType(fieldDescriptor.getFullName()); - } - } - return DescriptorMappings.protoKindToCELType(fieldDescriptor.getType()); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java deleted file mode 100644 index fea3bf80..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/AnyEvaluator.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.protovalidate.MessageReflector; -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; -import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.Violation; -import com.google.protobuf.Descriptors; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * A specialized evaluator for applying {@link build.buf.validate.AnyRules} to an {@link - * com.google.protobuf.Any} message. This is handled outside CEL which attempts to hydrate {@link - * com.google.protobuf.Any}'s within an expression, breaking evaluation if the type is unknown at - * runtime. - */ -class AnyEvaluator implements Evaluator { - private final Descriptors.FieldDescriptor typeURLDescriptor; - private final Set in; - private final Set notIn; - - /** Constructs a new evaluator for {@link build.buf.validate.AnyRules} messages. */ - AnyEvaluator(Descriptors.FieldDescriptor typeURLDescriptor, List in, List notIn) { - this.typeURLDescriptor = typeURLDescriptor; - this.in = stringsToSet(in); - this.notIn = stringsToSet(notIn); - } - - @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - MessageReflector anyValue = val.messageValue(); - if (anyValue == null) { - return ValidationResult.EMPTY; - } - List violationList = new ArrayList<>(); - String typeURL = anyValue.getField(typeURLDescriptor).jvmValue(String.class); - if (!in.isEmpty() && !in.contains(typeURL)) { - Violation violation = - Violation.newBuilder() - .setConstraintId("any.in") - .setMessage("type URL must be in the allow list") - .build(); - violationList.add(violation); - if (failFast) { - return new ValidationResult(violationList); - } - } - if (!notIn.isEmpty() && notIn.contains(typeURL)) { - Violation violation = - Violation.newBuilder() - .setConstraintId("any.not_in") - .setMessage("type URL must not be in the block list") - .build(); - violationList.add(violation); - } - return new ValidationResult(violationList); - } - - @Override - public boolean tautology() { - return in.isEmpty() && notIn.isEmpty(); - } - - /** stringsToMap converts a string list to a set for fast lookup. */ - private static Set stringsToSet(List strings) { - if (strings.isEmpty()) { - return Collections.emptySet(); - } - return new HashSet<>(strings); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java deleted file mode 100644 index 53b20a87..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/EnumEvaluator.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; -import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.Violation; -import com.google.protobuf.Descriptors; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -/** - * {@link EnumEvaluator} checks an enum value being a member of the defined values exclusively. This - * check is handled outside CEL as enums are completely type erased to integers. - */ -class EnumEvaluator implements Evaluator { - /** Captures all the defined values for this enum */ - private final Set values; - - /** - * Constructs a new evaluator for enum values. - * - * @param valueDescriptors the list of {@link Descriptors.EnumValueDescriptor} for the enum. - */ - EnumEvaluator(List valueDescriptors) { - if (valueDescriptors.isEmpty()) { - this.values = Collections.emptySet(); - } else { - this.values = - valueDescriptors.stream() - .map(Descriptors.EnumValueDescriptor::getNumber) - .collect(Collectors.toSet()); - } - } - - @Override - public boolean tautology() { - return false; - } - - /** - * Evaluates an enum value. - * - * @param val the value to evaluate. - * @param failFast indicates if the evaluation should stop on the first violation. - * @return the {@link ValidationResult} of the evaluation. - * @throws ExecutionException if an error occurs during the evaluation. - */ - @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - Integer enumValue = val.jvmValue(Integer.class); - if (enumValue == null) { - return ValidationResult.EMPTY; - } - if (!values.contains(enumValue)) { - return new ValidationResult( - Collections.singletonList( - Violation.newBuilder() - .setConstraintId("enum.defined_only") - .setMessage("value must be one of the defined enum values") - .build())); - } - return ValidationResult.EMPTY; - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ErrorPathUtils.java b/src/main/java/build/buf/protovalidate/internal/evaluator/ErrorPathUtils.java deleted file mode 100644 index 8367ffaf..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/ErrorPathUtils.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.validate.Violation; -import com.google.common.base.Strings; -import com.google.errorprone.annotations.FormatMethod; -import com.google.errorprone.annotations.FormatString; -import java.util.List; -import java.util.stream.Collectors; - -/** Utility class for manipulating error paths in violations. */ -final class ErrorPathUtils { - private ErrorPathUtils() {} - - /** - * Prefixes the error paths of the given violations with a format string and its arguments. - * - * @param violations The list of violations to modify. - * @param format The format string to use as the prefix. - * @param args The arguments to apply to the format string. - * @return The modified list of violations with prefixed error paths. - */ - @FormatMethod - static List prefixErrorPaths( - List violations, @FormatString String format, Object... args) { - String prefix = String.format(format, args); - return violations.stream() - .map( - violation -> { - String fieldPath = violation.getFieldPath(); - String prefixedFieldPath; - if (fieldPath.isEmpty()) { - prefixedFieldPath = prefix; - } else if (fieldPath.charAt(0) == '[') { - prefixedFieldPath = prefix + fieldPath; - } else { - prefixedFieldPath = Strings.lenientFormat("%s.%s", prefix, fieldPath); - } - return violation.toBuilder().setFieldPath(prefixedFieldPath).build(); - }) - .collect(Collectors.toList()); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/EvaluatorBuilder.java b/src/main/java/build/buf/protovalidate/internal/evaluator/EvaluatorBuilder.java deleted file mode 100644 index 9cc74185..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/EvaluatorBuilder.java +++ /dev/null @@ -1,516 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.protovalidate.Config; -import build.buf.protovalidate.exceptions.CompilationException; -import build.buf.protovalidate.internal.constraints.ConstraintCache; -import build.buf.protovalidate.internal.constraints.DescriptorMappings; -import build.buf.protovalidate.internal.expression.AstExpression; -import build.buf.protovalidate.internal.expression.CelPrograms; -import build.buf.protovalidate.internal.expression.CompiledProgram; -import build.buf.protovalidate.internal.expression.Expression; -import build.buf.protovalidate.internal.expression.Variable; -import build.buf.validate.Constraint; -import build.buf.validate.FieldConstraints; -import build.buf.validate.Ignore; -import build.buf.validate.MessageConstraints; -import build.buf.validate.OneofConstraints; -import com.google.common.collect.ImmutableMap; -import com.google.protobuf.ByteString; -import com.google.protobuf.Descriptors; -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.DynamicMessage; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.Message; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Objects; -import org.projectnessie.cel.Env; -import org.projectnessie.cel.EnvOption; -import org.projectnessie.cel.checker.Decls; - -/** A build-through cache of message evaluators keyed off the provided descriptor. */ -public class EvaluatorBuilder { - private volatile ImmutableMap evaluatorCache = ImmutableMap.of(); - - private final Env env; - private final boolean disableLazy; - private final ConstraintCache constraints; - - /** - * Constructs a new {@link EvaluatorBuilder}. - * - * @param env The CEL environment for evaluation. - * @param config The configuration to use for the evaluation. - */ - public EvaluatorBuilder(Env env, Config config) { - this.env = env; - this.disableLazy = config.isDisableLazy(); - this.constraints = new ConstraintCache(env, config); - } - - /** - * Returns a pre-cached {@link Evaluator} for the given descriptor or, if the descriptor is - * unknown, returns an evaluator that always throws a {@link CompilationException}. - * - * @param desc Protobuf descriptor type. - * @return An evaluator for the descriptor type. - * @throws CompilationException If an evaluator can't be created for the specified descriptor. - */ - public Evaluator load(Descriptor desc) throws CompilationException { - Evaluator evaluator = evaluatorCache.get(desc); - if (evaluator == null && disableLazy) { - return new UnknownDescriptorEvaluator(desc); - } - return build(desc); - } - - /** - * Either returns a memoized {@link Evaluator} for the given descriptor, or lazily constructs a - * new one. - */ - private Evaluator build(Descriptor desc) throws CompilationException { - Evaluator eval = evaluatorCache.get(desc); - if (eval != null) { - return eval; - } - synchronized (this) { - // Check again (we may have lost race with another thread which populated the map with this - // descriptor). - eval = evaluatorCache.get(desc); - if (eval != null) { - return eval; - } - // Rebuild cache with this descriptor (and any of its dependencies). - ImmutableMap updatedCache = - new DescriptorCacheBuilder(env, constraints, evaluatorCache).build(desc); - evaluatorCache = updatedCache; - eval = updatedCache.get(desc); - if (eval == null) { - throw new IllegalStateException( - "updated cache missing evaluator for descriptor - should not happen"); - } - } - return eval; - } - - private static class DescriptorCacheBuilder { - private final ConstraintResolver resolver = new ConstraintResolver(); - private final Env env; - private final ConstraintCache constraintCache; - private final HashMap cache; - - private DescriptorCacheBuilder( - Env env, - ConstraintCache constraintCache, - ImmutableMap previousCache) { - this.env = Objects.requireNonNull(env, "env"); - this.constraintCache = Objects.requireNonNull(constraintCache, "constraintCache"); - this.cache = new HashMap<>(previousCache); - } - - /** - * Creates an immutable cache containing the descriptor (and any other descriptors it - * references). - * - * @param descriptor Descriptor used to build the cache. - * @return Immutable map of descriptors to evaluators. - * @throws CompilationException If an error occurs compiling a constraint on the cache. - */ - public ImmutableMap build(Descriptor descriptor) - throws CompilationException { - createMessageEvaluator(descriptor); - return ImmutableMap.copyOf(cache); - } - - private Evaluator createMessageEvaluator(Descriptor desc) throws CompilationException { - Evaluator eval = cache.get(desc); - if (eval != null) { - return eval; - } - MessageEvaluator msgEval = new MessageEvaluator(); - cache.put(desc, msgEval); - buildMessage(desc, msgEval); - return msgEval; - } - - private void buildMessage(Descriptor desc, MessageEvaluator msgEval) - throws CompilationException { - try { - DynamicMessage defaultInstance = DynamicMessage.newBuilder(desc).buildPartial(); - Descriptor descriptor = defaultInstance.getDescriptorForType(); - MessageConstraints msgConstraints = resolver.resolveMessageConstraints(descriptor); - if (msgConstraints.getDisabled()) { - return; - } - processMessageExpressions(descriptor, msgConstraints, msgEval, defaultInstance); - processOneofConstraints(descriptor, msgEval); - processFields(descriptor, msgEval); - } catch (InvalidProtocolBufferException e) { - throw new CompilationException( - "failed to parse proto definition: " + desc.getFullName(), e); - } - } - - private void processMessageExpressions( - Descriptor desc, - MessageConstraints msgConstraints, - MessageEvaluator msgEval, - DynamicMessage message) - throws CompilationException { - List celList = msgConstraints.getCelList(); - if (celList.isEmpty()) { - return; - } - Env finalEnv = - env.extend( - EnvOption.types(message), - EnvOption.declarations( - Decls.newVar(Variable.THIS_NAME, Decls.newObjectType(desc.getFullName())))); - List compiledPrograms = compileConstraints(celList, finalEnv); - if (compiledPrograms.isEmpty()) { - throw new CompilationException("compile returned null"); - } - msgEval.append(new CelPrograms(compiledPrograms)); - } - - private void processOneofConstraints(Descriptor desc, MessageEvaluator msgEval) - throws InvalidProtocolBufferException, CompilationException { - List oneofs = desc.getOneofs(); - for (Descriptors.OneofDescriptor oneofDesc : oneofs) { - OneofConstraints oneofConstraints = resolver.resolveOneofConstraints(oneofDesc); - OneofEvaluator oneofEvaluatorEval = - new OneofEvaluator(oneofDesc, oneofConstraints.getRequired()); - msgEval.append(oneofEvaluatorEval); - } - } - - private void processFields(Descriptor desc, MessageEvaluator msgEval) - throws CompilationException, InvalidProtocolBufferException { - List fields = desc.getFields(); - for (FieldDescriptor fieldDescriptor : fields) { - FieldDescriptor descriptor = desc.findFieldByName(fieldDescriptor.getName()); - FieldConstraints fieldConstraints = resolver.resolveFieldConstraints(descriptor); - FieldEvaluator fldEval = buildField(descriptor, fieldConstraints); - msgEval.append(fldEval); - } - } - - private FieldEvaluator buildField( - FieldDescriptor fieldDescriptor, FieldConstraints fieldConstraints) - throws CompilationException { - ValueEvaluator valueEvaluatorEval = new ValueEvaluator(); - boolean ignoreDefault = - fieldDescriptor.hasPresence() && shouldIgnoreDefault(fieldConstraints); - Object zero = null; - if (ignoreDefault) { - zero = zeroValue(fieldDescriptor, false); - } - FieldEvaluator fieldEvaluator = - new FieldEvaluator( - valueEvaluatorEval, - fieldDescriptor, - fieldConstraints.getRequired(), - fieldDescriptor.hasPresence() || shouldIgnoreEmpty(fieldConstraints), - fieldDescriptor.hasPresence() && shouldIgnoreDefault(fieldConstraints), - zero); - buildValue(fieldDescriptor, fieldConstraints, false, fieldEvaluator.valueEvaluator); - return fieldEvaluator; - } - - @SuppressWarnings("deprecation") - private boolean shouldSkip(FieldConstraints constraints) { - return constraints.getSkipped() || constraints.getIgnore() == Ignore.IGNORE_ALWAYS; - } - - @SuppressWarnings("deprecation") - private static boolean shouldIgnoreEmpty(FieldConstraints constraints) { - return constraints.getIgnoreEmpty() - || constraints.getIgnore() == Ignore.IGNORE_IF_UNPOPULATED - || constraints.getIgnore() == Ignore.IGNORE_IF_DEFAULT_VALUE; - } - - private static boolean shouldIgnoreDefault(FieldConstraints constraints) { - return constraints.getIgnore() == Ignore.IGNORE_IF_DEFAULT_VALUE; - } - - private void buildValue( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluator) - throws CompilationException { - processIgnoreEmpty(fieldDescriptor, fieldConstraints, forItems, valueEvaluator); - processFieldExpressions(fieldDescriptor, fieldConstraints, valueEvaluator); - processEmbeddedMessage(fieldDescriptor, fieldConstraints, forItems, valueEvaluator); - processWrapperConstraints(fieldDescriptor, fieldConstraints, forItems, valueEvaluator); - processStandardConstraints(fieldDescriptor, fieldConstraints, forItems, valueEvaluator); - processAnyConstraints(fieldDescriptor, fieldConstraints, forItems, valueEvaluator); - processEnumConstraints(fieldDescriptor, fieldConstraints, valueEvaluator); - processMapConstraints(fieldDescriptor, fieldConstraints, valueEvaluator); - processRepeatedConstraints(fieldDescriptor, fieldConstraints, forItems, valueEvaluator); - } - - private void processIgnoreEmpty( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - if (forItems && shouldIgnoreEmpty(fieldConstraints)) { - valueEvaluatorEval.setIgnoreEmpty(zeroValue(fieldDescriptor, true)); - } - } - - private Object zeroValue(FieldDescriptor fieldDescriptor, boolean forItems) - throws CompilationException { - final Object zero; - if (forItems && fieldDescriptor.isRepeated()) { - switch (fieldDescriptor.getType().getJavaType()) { - case INT: - zero = 0; - break; - case LONG: - zero = 0L; - break; - case FLOAT: - zero = 0F; - break; - case DOUBLE: - zero = 0D; - break; - case BOOLEAN: - zero = false; - break; - case STRING: - zero = ""; - break; - case BYTE_STRING: - zero = ByteString.EMPTY; - break; - case ENUM: - zero = fieldDescriptor.getEnumType().getValues().get(0); - break; - case MESSAGE: - zero = createMessageForType(fieldDescriptor.getMessageType()); - break; - default: - zero = fieldDescriptor.getDefaultValue(); - break; - } - } else if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE - && !fieldDescriptor.isRepeated()) { - zero = createMessageForType(fieldDescriptor.getMessageType()); - } else { - zero = fieldDescriptor.getDefaultValue(); - } - return zero; - } - - private Message createMessageForType(Descriptor messageType) throws CompilationException { - try { - return DynamicMessage.parseFrom(messageType, new byte[0]); - } catch (InvalidProtocolBufferException e) { - throw new CompilationException("field descriptor type is invalid " + e.getMessage(), e); - } - } - - private void processFieldExpressions( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - List constraintsCelList = fieldConstraints.getCelList(); - if (constraintsCelList.isEmpty()) { - return; - } - List opts; - if (fieldDescriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - try { - DynamicMessage defaultInstance = - DynamicMessage.parseFrom(fieldDescriptor.getMessageType(), new byte[0]); - opts = - Arrays.asList( - EnvOption.types(defaultInstance), - EnvOption.declarations( - Decls.newVar( - Variable.THIS_NAME, - Decls.newObjectType(fieldDescriptor.getMessageType().getFullName())))); - } catch (InvalidProtocolBufferException e) { - throw new CompilationException("field descriptor type is invalid " + e.getMessage(), e); - } - } else { - opts = - Collections.singletonList( - EnvOption.declarations( - Decls.newVar( - Variable.THIS_NAME, - DescriptorMappings.protoKindToCELType(fieldDescriptor.getType())))); - } - Env finalEnv = env.extend(opts.toArray(new EnvOption[0])); - List compiledPrograms = compileConstraints(constraintsCelList, finalEnv); - if (!compiledPrograms.isEmpty()) { - valueEvaluatorEval.append(new CelPrograms(compiledPrograms)); - } - } - - private void processEmbeddedMessage( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - if (fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.MESSAGE - || shouldSkip(fieldConstraints) - || fieldDescriptor.isMapField() - || (fieldDescriptor.isRepeated() && !forItems)) { - return; - } - Evaluator embedEval = createMessageEvaluator(fieldDescriptor.getMessageType()); - valueEvaluatorEval.append(embedEval); - } - - private void processWrapperConstraints( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - if (fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.MESSAGE - || shouldSkip(fieldConstraints) - || fieldDescriptor.isMapField() - || (fieldDescriptor.isRepeated() && !forItems)) { - return; - } - FieldDescriptor expectedWrapperDescriptor = - DescriptorMappings.expectedWrapperConstraints( - fieldDescriptor.getMessageType().getFullName()); - if (expectedWrapperDescriptor == null - || !fieldConstraints.hasField(expectedWrapperDescriptor)) { - return; - } - ValueEvaluator unwrapped = new ValueEvaluator(); - buildValue( - fieldDescriptor.getMessageType().findFieldByName("value"), - fieldConstraints, - true, - unwrapped); - valueEvaluatorEval.append(unwrapped); - } - - private void processStandardConstraints( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - List compile = - constraintCache.compile(fieldDescriptor, fieldConstraints, forItems); - if (compile.isEmpty()) { - return; - } - valueEvaluatorEval.append(new CelPrograms(compile)); - } - - private void processAnyConstraints( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluatorEval) { - if ((fieldDescriptor.isRepeated() && !forItems) - || fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.MESSAGE - || !fieldDescriptor.getMessageType().getFullName().equals("google.protobuf.Any")) { - return; - } - FieldDescriptor typeURLDesc = fieldDescriptor.getMessageType().findFieldByName("type_url"); - AnyEvaluator anyEvaluatorEval = - new AnyEvaluator( - typeURLDesc, - fieldConstraints.getAny().getInList(), - fieldConstraints.getAny().getNotInList()); - valueEvaluatorEval.append(anyEvaluatorEval); - } - - private void processEnumConstraints( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - ValueEvaluator valueEvaluatorEval) { - if (fieldDescriptor.getJavaType() != FieldDescriptor.JavaType.ENUM) { - return; - } - if (fieldConstraints.getEnum().getDefinedOnly()) { - Descriptors.EnumDescriptor enumDescriptor = fieldDescriptor.getEnumType(); - valueEvaluatorEval.append(new EnumEvaluator(enumDescriptor.getValues())); - } - } - - private void processMapConstraints( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - if (!fieldDescriptor.isMapField()) { - return; - } - MapEvaluator mapEval = new MapEvaluator(fieldConstraints, fieldDescriptor); - buildValue( - fieldDescriptor.getMessageType().findFieldByNumber(1), - fieldConstraints.getMap().getKeys(), - true, - mapEval.getKeyEvaluator()); - buildValue( - fieldDescriptor.getMessageType().findFieldByNumber(2), - fieldConstraints.getMap().getValues(), - true, - mapEval.getValueEvaluator()); - valueEvaluatorEval.append(mapEval); - } - - private void processRepeatedConstraints( - FieldDescriptor fieldDescriptor, - FieldConstraints fieldConstraints, - boolean forItems, - ValueEvaluator valueEvaluatorEval) - throws CompilationException { - if (fieldDescriptor.isMapField() || !fieldDescriptor.isRepeated() || forItems) { - return; - } - ListEvaluator listEval = new ListEvaluator(); - buildValue( - fieldDescriptor, - fieldConstraints.getRepeated().getItems(), - true, - listEval.itemConstraints); - valueEvaluatorEval.append(listEval); - } - - private static List compileConstraints(List constraints, Env env) - throws CompilationException { - List expressions = Expression.fromConstraints(constraints); - List compiledPrograms = new ArrayList<>(); - for (Expression expression : expressions) { - AstExpression astExpression = AstExpression.newAstExpression(env, expression); - compiledPrograms.add( - new CompiledProgram(env.program(astExpression.ast), astExpression.source)); - } - return compiledPrograms; - } - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java deleted file mode 100644 index aad70060..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/FieldEvaluator.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.protovalidate.MessageReflector; -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; -import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.Violation; -import com.google.protobuf.Descriptors.FieldDescriptor; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import javax.annotation.Nullable; - -/** Performs validation on a single message field, defined by its descriptor. */ -class FieldEvaluator implements Evaluator { - /** The {@link ValueEvaluator} to apply to the field's value */ - public final ValueEvaluator valueEvaluator; - - /** The {@link FieldDescriptor} targeted by this evaluator */ - private final FieldDescriptor descriptor; - - /** Indicates that the field must have a set value. */ - private final boolean required; - - /** - * ignoreEmpty indicates if a field should skip validation on its zero value. This field is - * generally true for nullable fields or fields with the ignore_empty constraint explicitly set. - */ - private final boolean ignoreEmpty; - - private final boolean ignoreDefault; - - @Nullable private final Object zero; - - /** Constructs a new {@link FieldEvaluator} */ - FieldEvaluator( - ValueEvaluator valueEvaluator, - FieldDescriptor descriptor, - boolean required, - boolean ignoreEmpty, - boolean ignoreDefault, - @Nullable Object zero) { - this.valueEvaluator = valueEvaluator; - this.descriptor = descriptor; - this.required = required; - this.ignoreEmpty = ignoreEmpty; - this.ignoreDefault = ignoreDefault; - this.zero = zero; - } - - @Override - public boolean tautology() { - return !required && valueEvaluator.tautology(); - } - - @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - MessageReflector message = val.messageValue(); - if (message == null) { - return ValidationResult.EMPTY; - } - boolean hasField; - if (descriptor.isRepeated()) { - if (descriptor.isMapField()) { - hasField = !message.getField(descriptor).mapValue().isEmpty(); - } else { - hasField = !message.getField(descriptor).repeatedValue().isEmpty(); - } - } else { - hasField = message.hasField(descriptor); - } - if (required && !hasField) { - return new ValidationResult( - Collections.singletonList( - Violation.newBuilder() - .setFieldPath(descriptor.getName()) - .setConstraintId("required") - .setMessage("value is required") - .build())); - } - if (ignoreEmpty && !hasField) { - return ValidationResult.EMPTY; - } - Value fieldValue = message.getField(descriptor); - if (ignoreDefault && Objects.equals(zero, fieldValue.jvmValue(Object.class))) { - return ValidationResult.EMPTY; - } - ValidationResult evalResult = valueEvaluator.evaluate(fieldValue, failFast); - List violations = - ErrorPathUtils.prefixErrorPaths(evalResult.getViolations(), "%s", descriptor.getName()); - return new ValidationResult(violations); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java deleted file mode 100644 index e420f91e..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/ListEvaluator.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; -import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.Violation; -import java.util.ArrayList; -import java.util.List; - -/** Performs validation on the elements of a repeated field. */ -class ListEvaluator implements Evaluator { - - /** Constraints are checked on every item of the list. */ - final ValueEvaluator itemConstraints; - - /** Constructs a {@link ListEvaluator}. */ - ListEvaluator() { - this.itemConstraints = new ValueEvaluator(); - } - - @Override - public boolean tautology() { - return itemConstraints.tautology(); - } - - @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - List allViolations = new ArrayList<>(); - List repeatedValues = val.repeatedValue(); - for (int i = 0; i < repeatedValues.size(); i++) { - ValidationResult evalResult = itemConstraints.evaluate(repeatedValues.get(i), failFast); - if (evalResult.getViolations().isEmpty()) { - continue; - } - List violations = - ErrorPathUtils.prefixErrorPaths(evalResult.getViolations(), "[%d]", i); - if (failFast && !violations.isEmpty()) { - return evalResult; - } - allViolations.addAll(violations); - } - return new ValidationResult(allViolations); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java b/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java deleted file mode 100644 index 149e3d49..00000000 --- a/src/main/java/build/buf/protovalidate/internal/evaluator/MapEvaluator.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.evaluator; - -import build.buf.protovalidate.ValidationResult; -import build.buf.protovalidate.Value; -import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.FieldConstraints; -import build.buf.validate.Violation; -import com.google.protobuf.Descriptors; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** Performs validation on a map field's key-value pairs. */ -class MapEvaluator implements Evaluator { - /** Constraint for checking the map keys */ - private final ValueEvaluator keyEvaluator; - - /** Constraint for checking the map values */ - private final ValueEvaluator valueEvaluator; - - /** - * Constructs a {@link MapEvaluator}. - * - * @param fieldConstraints The field constraints to apply to the map. - * @param fieldDescriptor The descriptor of the map field being evaluated. - */ - MapEvaluator(FieldConstraints fieldConstraints, Descriptors.FieldDescriptor fieldDescriptor) { - this.keyEvaluator = new ValueEvaluator(); - this.valueEvaluator = new ValueEvaluator(); - } - - /** - * Gets the key evaluator associated with this map evaluator. - * - * @return The key evaluator. - */ - public ValueEvaluator getKeyEvaluator() { - return keyEvaluator; - } - - /** - * Gets the value evaluator associated with this map evaluator. - * - * @return The value evaluator. - */ - public ValueEvaluator getValueEvaluator() { - return valueEvaluator; - } - - @Override - public boolean tautology() { - return keyEvaluator.tautology() && valueEvaluator.tautology(); - } - - @Override - public ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException { - List violations = new ArrayList<>(); - Map mapValue = val.mapValue(); - for (Map.Entry entry : mapValue.entrySet()) { - violations.addAll(evalPairs(entry.getKey(), entry.getValue(), failFast)); - if (failFast && !violations.isEmpty()) { - return new ValidationResult(violations); - } - } - if (violations.isEmpty()) { - return ValidationResult.EMPTY; - } - return new ValidationResult(violations); - } - - private List evalPairs(Value key, Value value, boolean failFast) - throws ExecutionException { - List keyViolations = keyEvaluator.evaluate(key, failFast).getViolations(); - final List valueViolations; - if (failFast && !keyViolations.isEmpty()) { - // Don't evaluate value constraints if failFast is enabled and keys failed validation. - // We still need to continue execution to the end to properly prefix violation field paths. - valueViolations = Collections.emptyList(); - } else { - valueViolations = valueEvaluator.evaluate(value, failFast).getViolations(); - } - if (keyViolations.isEmpty() && valueViolations.isEmpty()) { - return Collections.emptyList(); - } - List violations = new ArrayList<>(keyViolations.size() + valueViolations.size()); - violations.addAll(keyViolations); - violations.addAll(valueViolations); - - Object keyName = key.jvmValue(Object.class); - if (keyName == null) { - return Collections.emptyList(); - } - List prefixedViolations; - if (keyName instanceof Number) { - prefixedViolations = ErrorPathUtils.prefixErrorPaths(violations, "[%s]", keyName); - } else { - prefixedViolations = ErrorPathUtils.prefixErrorPaths(violations, "[\"%s\"]", keyName); - } - return prefixedViolations; - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java b/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java deleted file mode 100644 index fba764b6..00000000 --- a/src/main/java/build/buf/protovalidate/internal/expression/AstExpression.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.expression; - -import build.buf.protovalidate.exceptions.CompilationException; -import com.google.api.expr.v1alpha1.Type; -import org.projectnessie.cel.Ast; -import org.projectnessie.cel.Env; - -/** {@link AstExpression} is a compiled CEL {@link Ast}. */ -public class AstExpression { - /** The compiled CEL AST. */ - public final Ast ast; - - /** Contains the original expression from the proto file. */ - public final Expression source; - - /** Constructs a new {@link AstExpression}. */ - private AstExpression(Ast ast, Expression source) { - this.ast = ast; - this.source = source; - } - - /** - * Compiles the given expression to a {@link AstExpression}. - * - * @param env The CEL environment. - * @param expr The expression to compile. - * @return The compiled {@link AstExpression}. - * @throws CompilationException if the expression compilation fails. - */ - public static AstExpression newAstExpression(Env env, Expression expr) - throws CompilationException { - Env.AstIssuesTuple astIssuesTuple = env.compile(expr.expression); - if (astIssuesTuple.hasIssues()) { - throw new CompilationException( - "Failed to compile expression " + expr.id + ":\n" + astIssuesTuple.getIssues()); - } - Ast ast = astIssuesTuple.getAst(); - Type outType = ast.getResultType(); - if (outType.getPrimitive() != Type.PrimitiveType.BOOL - && outType.getPrimitive() != Type.PrimitiveType.STRING) { - throw new CompilationException( - String.format( - "Expression outputs, wanted either bool or string: %s %s", expr.id, outType)); - } - return new AstExpression(ast, expr); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/expression/CompiledProgram.java b/src/main/java/build/buf/protovalidate/internal/expression/CompiledProgram.java deleted file mode 100644 index 17154f16..00000000 --- a/src/main/java/build/buf/protovalidate/internal/expression/CompiledProgram.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.expression; - -import build.buf.protovalidate.exceptions.ExecutionException; -import build.buf.validate.Violation; -import javax.annotation.Nullable; -import org.projectnessie.cel.Program; -import org.projectnessie.cel.common.types.Err; -import org.projectnessie.cel.common.types.ref.Val; - -/** - * {@link CompiledProgram} is a parsed and type-checked {@link Program} along with the source {@link - * Expression}. - */ -public class CompiledProgram { - /** A compiled CEL program that can be evaluated against a set of variable bindings. */ - private final Program program; - - /** The original expression that was compiled into the program from the proto file. */ - private final Expression source; - - /** - * Constructs a new {@link CompiledProgram}. - * - * @param program The compiled CEL program. - * @param source The original expression that was compiled into the program. - */ - public CompiledProgram(Program program, Expression source) { - this.program = program; - this.source = source; - } - - /** - * Evaluate the compiled program with a given set of {@link Variable} bindings. - * - * @param bindings Variable bindings used for the evaluation. - * @return The {@link build.buf.validate.Violation} from the evaluation, or null if there are no - * violations. - * @throws ExecutionException If the evaluation of the CEL program fails with an error. - */ - @Nullable - public Violation eval(Variable bindings) throws ExecutionException { - Program.EvalResult evalResult = program.eval(bindings); - Val val = evalResult.getVal(); - if (val instanceof Err) { - throw new ExecutionException(String.format("error evaluating %s: %s", source.id, val)); - } - Object value = val.value(); - if (value instanceof String) { - if ("".equals(value)) { - return null; - } - return Violation.newBuilder() - .setConstraintId(this.source.id) - .setMessage(value.toString()) - .build(); - } else if (value instanceof Boolean) { - if (val.booleanValue()) { - return null; - } - return Violation.newBuilder() - .setConstraintId(this.source.id) - .setMessage(this.source.message) - .build(); - } else { - throw new ExecutionException(String.format("resolved to an unexpected type %s", val)); - } - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/expression/NowVariable.java b/src/main/java/build/buf/protovalidate/internal/expression/NowVariable.java deleted file mode 100644 index 6fbf4158..00000000 --- a/src/main/java/build/buf/protovalidate/internal/expression/NowVariable.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.expression; - -import java.time.Instant; -import javax.annotation.Nullable; -import org.projectnessie.cel.common.types.TimestampT; -import org.projectnessie.cel.interpreter.Activation; -import org.projectnessie.cel.interpreter.ResolvedValue; - -/** - * {@link NowVariable} implements {@link Activation}, providing a lazily produced timestamp for - * accessing the variable `now` that's constant within an evaluation. - */ -public class NowVariable implements Activation { - /** The name of the 'now' variable. */ - private static final String NOW_NAME = "now"; - - /** The resolved value of the 'now' variable. */ - @Nullable private ResolvedValue resolvedValue; - - /** Creates an instance of a "now" variable. */ - public NowVariable() {} - - @Override - public ResolvedValue resolveName(String name) { - if (!name.equals(NOW_NAME)) { - return ResolvedValue.ABSENT; - } else if (resolvedValue != null) { - return resolvedValue; - } - Instant instant = Instant.now(); // UTC. - TimestampT value = TimestampT.timestampOf(instant); - resolvedValue = ResolvedValue.resolvedValue(value); - return resolvedValue; - } - - @Override - public Activation parent() { - return Activation.emptyActivation(); - } -} diff --git a/src/main/java/build/buf/protovalidate/internal/expression/Variable.java b/src/main/java/build/buf/protovalidate/internal/expression/Variable.java deleted file mode 100644 index b0aaebfd..00000000 --- a/src/main/java/build/buf/protovalidate/internal/expression/Variable.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.expression; - -import javax.annotation.Nullable; -import org.projectnessie.cel.interpreter.Activation; -import org.projectnessie.cel.interpreter.ResolvedValue; - -/** - * {@link Variable} implements {@link org.projectnessie.cel.interpreter.Activation}, providing a - * lightweight named variable to cel.Program executions. - */ -public class Variable implements Activation { - /** The {@value} variable in CEL. */ - public static final String THIS_NAME = "this"; - - /** The {@value} variable in CEL. */ - public static final String RULES_NAME = "rules"; - - /** The {@value} variable in CEL. */ - public static final String RULE_NAME = "rule"; - - /** The parent activation */ - private final Activation next; - - /** The variable's name */ - private final String name; - - /** The value for this variable */ - @Nullable private final Object val; - - /** Creates a variable with the given name and value. */ - private Variable(Activation activation, String name, @Nullable Object val) { - this.next = activation; - this.name = name; - this.val = val; - } - - /** - * Creates a "this" variable. - * - * @param val the value. - * @return {@link Variable}. - */ - public static Variable newThisVariable(@Nullable Object val) { - return new Variable(new NowVariable(), THIS_NAME, val); - } - - /** - * Creates a "rules" variable. - * - * @param val the value. - * @return {@link Variable}. - */ - public static Variable newRulesVariable(Object val) { - return new Variable(Activation.emptyActivation(), RULES_NAME, val); - } - - /** - * Creates a "rule" variable. - * - * @param rules the value of the "rules" variable. - * @param val the value of the "rule" variable. - * @return {@link Variable}. - */ - public static Variable newRuleVariable(Object rules, Object val) { - return new Variable(newRulesVariable(rules), RULE_NAME, val); - } - - @Override - public ResolvedValue resolveName(String name) { - if (this.name.equals(name)) { - return ResolvedValue.resolvedValue(val); - } else if (next != null) { - return next.resolveName(name); - } - return ResolvedValue.ABSENT; - } - - @Override - public Activation parent() { - return next; - } -} diff --git a/src/main/java/build/buf/validate/AnyRules.java b/src/main/java/build/buf/validate/AnyRules.java deleted file mode 100644 index 1de4a303..00000000 --- a/src/main/java/build/buf/validate/AnyRules.java +++ /dev/null @@ -1,1061 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
- * 
- * - * Protobuf type {@code buf.validate.AnyRules} - */ -public final class AnyRules extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.AnyRules) - AnyRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - AnyRules.class.getName()); - } - // Use AnyRules.newBuilder() to construct. - private AnyRules(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AnyRules() { - in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.AnyRules.class, build.buf.validate.AnyRules.Builder.class); - } - - public static final int IN_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return A list containing the in. - */ - public com.google.protobuf.ProtocolStringList - getInList() { - return in_; - } - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index of the element to return. - * @return The in at the given index. - */ - public java.lang.String getIn(int index) { - return in_.get(index); - } - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index of the value to return. - * @return The bytes of the in at the given index. - */ - public com.google.protobuf.ByteString - getInBytes(int index) { - return in_.getByteString(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return A list containing the notIn. - */ - public com.google.protobuf.ProtocolStringList - getNotInList() { - return notIn_; - } - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public java.lang.String getNotIn(int index) { - return notIn_.get(index); - } - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index of the value to return. - * @return The bytes of the notIn at the given index. - */ - public com.google.protobuf.ByteString - getNotInBytes(int index) { - return notIn_.getByteString(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 < in_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, in_.getRaw(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, notIn_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += computeStringSizeNoTag(in_.getRaw(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += computeStringSizeNoTag(notIn_.getRaw(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - 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.AnyRules)) { - return super.equals(obj); - } - build.buf.validate.AnyRules other = (build.buf.validate.AnyRules) obj; - - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) 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 (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.AnyRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.AnyRules 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.AnyRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.AnyRules 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.AnyRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.AnyRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.AnyRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.AnyRules 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.AnyRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.AnyRules 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.AnyRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.AnyRules 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.AnyRules 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; - } - /** - *
-   * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
-   * 
- * - * Protobuf type {@code buf.validate.AnyRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.AnyRules) - build.buf.validate.AnyRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.AnyRules.class, build.buf.validate.AnyRules.Builder.class); - } - - // Construct using build.buf.validate.AnyRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.AnyRules getDefaultInstanceForType() { - return build.buf.validate.AnyRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.AnyRules build() { - build.buf.validate.AnyRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.AnyRules buildPartial() { - build.buf.validate.AnyRules result = new build.buf.validate.AnyRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.AnyRules result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.AnyRules) { - return mergeFrom((build.buf.validate.AnyRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.AnyRules other) { - if (other == build.buf.validate.AnyRules.getDefaultInstance()) return this; - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - bitField0_ |= 0x00000001; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - bitField0_ |= 0x00000002; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - 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 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - ensureInIsMutable(); - in_.add(bs); - break; - } // case 18 - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - ensureNotInIsMutable(); - notIn_.add(bs); - break; - } // case 26 - 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.LazyStringArrayList in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = new com.google.protobuf.LazyStringArrayList(in_); - } - bitField0_ |= 0x00000001; - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return A list containing the in. - */ - public com.google.protobuf.ProtocolStringList - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index of the element to return. - * @return The in at the given index. - */ - public java.lang.String getIn(int index) { - return in_.get(index); - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index of the value to return. - * @return The bytes of the in at the given index. - */ - public com.google.protobuf.ByteString - getInBytes(int index) { - return in_.getByteString(index); - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field's `type_url` to be equal to one of the
-     * specified values. If it doesn't match any of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * //  The `value` field must have a `type_url` equal to one of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param value The bytes of the in to add. - * @return This builder for chaining. - */ - public Builder addInBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = new com.google.protobuf.LazyStringArrayList(notIn_); - } - bitField0_ |= 0x00000002; - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return A list containing the notIn. - */ - public com.google.protobuf.ProtocolStringList - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public java.lang.String getNotIn(int index) { - return notIn_.get(index); - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index of the value to return. - * @return The bytes of the notIn at the given index. - */ - public com.google.protobuf.ByteString - getNotInBytes(int index) { - return notIn_.getByteString(index); - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002);; - onChanged(); - return this; - } - /** - *
-     * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-     *
-     * ```proto
-     * message MyAny {
-     * // The field `value` must not have a `type_url` equal to any of the specified values.
-     * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param value The bytes of the notIn to add. - * @return This builder for chaining. - */ - public Builder addNotInBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.AnyRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.AnyRules) - private static final build.buf.validate.AnyRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.AnyRules(); - } - - public static build.buf.validate.AnyRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnyRules 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.AnyRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/AnyRulesOrBuilder.java b/src/main/java/build/buf/validate/AnyRulesOrBuilder.java deleted file mode 100644 index 616febb6..00000000 --- a/src/main/java/build/buf/validate/AnyRulesOrBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface AnyRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.AnyRules) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return A list containing the in. - */ - java.util.List - getInList(); - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index of the element to return. - * @return The in at the given index. - */ - java.lang.String getIn(int index); - /** - *
-   * `in` requires the field's `type_url` to be equal to one of the
-   * specified values. If it doesn't match any of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * //  The `value` field must have a `type_url` equal to one of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string in = 2 [json_name = "in"]; - * @param index The index of the value to return. - * @return The bytes of the in at the given index. - */ - com.google.protobuf.ByteString - getInBytes(int index); - - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return A list containing the notIn. - */ - java.util.List - getNotInList(); - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - java.lang.String getNotIn(int index); - /** - *
-   * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
-   *
-   * ```proto
-   * message MyAny {
-   * // The field `value` must not have a `type_url` equal to any of the specified values.
-   * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 3 [json_name = "notIn"]; - * @param index The index of the value to return. - * @return The bytes of the notIn at the given index. - */ - com.google.protobuf.ByteString - getNotInBytes(int index); -} diff --git a/src/main/java/build/buf/validate/BoolRules.java b/src/main/java/build/buf/validate/BoolRules.java deleted file mode 100644 index e10d1003..00000000 --- a/src/main/java/build/buf/validate/BoolRules.java +++ /dev/null @@ -1,875 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * BoolRules describes the constraints applied to `bool` values. These rules
- * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.BoolRules} - */ -public final class BoolRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - BoolRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.BoolRules) - BoolRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BoolRules.class.getName()); - } - // Use BoolRules.newBuilder() to construct. - private BoolRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private BoolRules() { - example_ = emptyBooleanList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.BoolRules.class, build.buf.validate.BoolRules.Builder.class); - } - - private int bitField0_; - public static final int CONST_FIELD_NUMBER = 1; - private boolean const_ = false; - /** - *
-   * `const` requires the field value to exactly match the specified boolean value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBool {
-   * // value must equal true
-   * bool value = 1 [(buf.validate.field).bool.const = true];
-   * }
-   * ```
-   * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified boolean value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBool {
-   * // value must equal true
-   * bool value = 1 [(buf.validate.field).bool.const = true];
-   * }
-   * ```
-   * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public boolean getConst() { - return const_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.BooleanList example_ = - emptyBooleanList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBool {
-   * bool value = 1 [
-   * (buf.validate.field).bool.example = 1,
-   * (buf.validate.field).bool.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBool {
-   * bool value = 1 [
-   * (buf.validate.field).bool.example = 1,
-   * (buf.validate.field).bool.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBool {
-   * bool value = 1 [
-   * (buf.validate.field).bool.example = 1,
-   * (buf.validate.field).bool.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public boolean getExample(int index) { - return example_.getBoolean(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBool(1, const_); - } - for (int i = 0; i < example_.size(); i++) { - output.writeBool(2, example_.getBoolean(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeBoolSize(1, const_); - } - { - int dataSize = 0; - dataSize = 1 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.BoolRules)) { - return super.equals(obj); - } - build.buf.validate.BoolRules other = (build.buf.validate.BoolRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getConst()); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.BoolRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.BoolRules 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.BoolRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.BoolRules 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.BoolRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.BoolRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.BoolRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.BoolRules 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.BoolRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.BoolRules 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.BoolRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.BoolRules 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.BoolRules 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; - } - /** - *
-   * BoolRules describes the constraints applied to `bool` values. These rules
-   * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.BoolRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.BoolRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.BoolRules) - build.buf.validate.BoolRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.BoolRules.class, build.buf.validate.BoolRules.Builder.class); - } - - // Construct using build.buf.validate.BoolRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = false; - example_ = emptyBooleanList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.BoolRules getDefaultInstanceForType() { - return build.buf.validate.BoolRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.BoolRules build() { - build.buf.validate.BoolRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.BoolRules buildPartial() { - build.buf.validate.BoolRules result = new build.buf.validate.BoolRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.BoolRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.BoolRules) { - return mergeFrom((build.buf.validate.BoolRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.BoolRules other) { - if (other == build.buf.validate.BoolRules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - boolean v = input.readBool(); - ensureExampleIsMutable(); - example_.addBoolean(v); - break; - } // case 16 - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 1); - while (input.getBytesUntilLimit() > 0) { - example_.addBoolean(input.readBool()); - } - input.popLimit(limit); - break; - } // case 18 - 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 boolean const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified boolean value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBool {
-     * // value must equal true
-     * bool value = 1 [(buf.validate.field).bool.const = true];
-     * }
-     * ```
-     * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified boolean value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBool {
-     * // value must equal true
-     * bool value = 1 [(buf.validate.field).bool.const = true];
-     * }
-     * ```
-     * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public boolean getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified boolean value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBool {
-     * // value must equal true
-     * bool value = 1 [(buf.validate.field).bool.const = true];
-     * }
-     * ```
-     * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(boolean value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified boolean value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBool {
-     * // value must equal true
-     * bool value = 1 [(buf.validate.field).bool.const = true];
-     * }
-     * ```
-     * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.BooleanList example_ = emptyBooleanList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000002; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000002; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public boolean getExample(int index) { - return example_.getBoolean(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, boolean value) { - - ensureExampleIsMutable(); - example_.setBoolean(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(boolean value) { - - ensureExampleIsMutable(); - example_.addBoolean(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBool {
-     * bool value = 1 [
-     * (buf.validate.field).bool.example = 1,
-     * (buf.validate.field).bool.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyBooleanList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.BoolRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.BoolRules) - private static final build.buf.validate.BoolRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.BoolRules(); - } - - public static build.buf.validate.BoolRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoolRules 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.BoolRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/BoolRulesOrBuilder.java b/src/main/java/build/buf/validate/BoolRulesOrBuilder.java deleted file mode 100644 index 592364bd..00000000 --- a/src/main/java/build/buf/validate/BoolRulesOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface BoolRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.BoolRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified boolean value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBool {
-   * // value must equal true
-   * bool value = 1 [(buf.validate.field).bool.const = true];
-   * }
-   * ```
-   * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified boolean value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBool {
-   * // value must equal true
-   * bool value = 1 [(buf.validate.field).bool.const = true];
-   * }
-   * ```
-   * 
- * - * optional bool const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - boolean getConst(); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBool {
-   * bool value = 1 [
-   * (buf.validate.field).bool.example = 1,
-   * (buf.validate.field).bool.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBool {
-   * bool value = 1 [
-   * (buf.validate.field).bool.example = 1,
-   * (buf.validate.field).bool.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBool {
-   * bool value = 1 [
-   * (buf.validate.field).bool.example = 1,
-   * (buf.validate.field).bool.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bool example = 2 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - boolean getExample(int index); -} diff --git a/src/main/java/build/buf/validate/BytesRules.java b/src/main/java/build/buf/validate/BytesRules.java deleted file mode 100644 index a831a356..00000000 --- a/src/main/java/build/buf/validate/BytesRules.java +++ /dev/null @@ -1,3291 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * BytesRules describe the constraints applied to `bytes` values. These rules
- * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.BytesRules} - */ -public final class BytesRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - BytesRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.BytesRules) - BytesRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - BytesRules.class.getName()); - } - // Use BytesRules.newBuilder() to construct. - private BytesRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private BytesRules() { - const_ = com.google.protobuf.ByteString.EMPTY; - pattern_ = ""; - prefix_ = com.google.protobuf.ByteString.EMPTY; - suffix_ = com.google.protobuf.ByteString.EMPTY; - contains_ = com.google.protobuf.ByteString.EMPTY; - in_ = emptyList(com.google.protobuf.ByteString.class); - notIn_ = emptyList(com.google.protobuf.ByteString.class); - example_ = emptyList(com.google.protobuf.ByteString.class); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BytesRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BytesRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.BytesRules.class, build.buf.validate.BytesRules.Builder.class); - } - - private int bitField0_; - private int wellKnownCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object wellKnown_; - public enum WellKnownCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - IP(10), - IPV4(11), - IPV6(12), - WELLKNOWN_NOT_SET(0); - private final int value; - private WellKnownCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static WellKnownCase valueOf(int value) { - return forNumber(value); - } - - public static WellKnownCase forNumber(int value) { - switch (value) { - case 10: return IP; - case 11: return IPV4; - case 12: return IPV6; - case 0: return WELLKNOWN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public WellKnownCase - getWellKnownCase() { - return WellKnownCase.forNumber( - wellKnownCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString const_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * `const` requires the field value to exactly match the specified bytes
-   * value. If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be "\x01\x02\x03\x04"
-   * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified bytes
-   * value. If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be "\x01\x02\x03\x04"
-   * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConst() { - return const_; - } - - public static final int LEN_FIELD_NUMBER = 13; - private long len_ = 0L; - /** - *
-   * `len` requires the field value to have the specified length in bytes.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be 4 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return Whether the len field is set. - */ - @java.lang.Override - public boolean hasLen() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `len` requires the field value to have the specified length in bytes.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be 4 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return The len. - */ - @java.lang.Override - public long getLen() { - return len_; - } - - public static final int MIN_LEN_FIELD_NUMBER = 2; - private long minLen_ = 0L; - /** - *
-   * `min_len` requires the field value to have at least the specified minimum
-   * length in bytes.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be at least 2 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return Whether the minLen field is set. - */ - @java.lang.Override - public boolean hasMinLen() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * `min_len` requires the field value to have at least the specified minimum
-   * length in bytes.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be at least 2 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return The minLen. - */ - @java.lang.Override - public long getMinLen() { - return minLen_; - } - - public static final int MAX_LEN_FIELD_NUMBER = 3; - private long maxLen_ = 0L; - /** - *
-   * `max_len` requires the field value to have at most the specified maximum
-   * length in bytes.
-   * If the field value exceeds the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be at most 6 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return Whether the maxLen field is set. - */ - @java.lang.Override - public boolean hasMaxLen() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-   * `max_len` requires the field value to have at most the specified maximum
-   * length in bytes.
-   * If the field value exceeds the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be at most 6 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return The maxLen. - */ - @java.lang.Override - public long getMaxLen() { - return maxLen_; - } - - public static final int PATTERN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object pattern_ = ""; - /** - *
-   * `pattern` requires the field value to match the specified regular
-   * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-   * The value of the field must be valid UTF-8 or validation will fail with a
-   * runtime error.
-   * If the field value doesn't match the pattern, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must match regex pattern "^[a-zA-Z0-9]+$".
-   * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return Whether the pattern field is set. - */ - @java.lang.Override - public boolean hasPattern() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-   * `pattern` requires the field value to match the specified regular
-   * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-   * The value of the field must be valid UTF-8 or validation will fail with a
-   * runtime error.
-   * If the field value doesn't match the pattern, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must match regex pattern "^[a-zA-Z0-9]+$".
-   * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The pattern. - */ - @java.lang.Override - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - pattern_ = s; - } - return s; - } - } - /** - *
-   * `pattern` requires the field value to match the specified regular
-   * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-   * The value of the field must be valid UTF-8 or validation will fail with a
-   * runtime error.
-   * If the field value doesn't match the pattern, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must match regex pattern "^[a-zA-Z0-9]+$".
-   * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The bytes for pattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PREFIX_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString prefix_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * `prefix` requires the field value to have the specified bytes at the
-   * beginning of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have prefix \x01\x02
-   * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-   * }
-   * ```
-   * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return Whether the prefix field is set. - */ - @java.lang.Override - public boolean hasPrefix() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-   * `prefix` requires the field value to have the specified bytes at the
-   * beginning of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have prefix \x01\x02
-   * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-   * }
-   * ```
-   * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The prefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrefix() { - return prefix_; - } - - public static final int SUFFIX_FIELD_NUMBER = 6; - private com.google.protobuf.ByteString suffix_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * `suffix` requires the field value to have the specified bytes at the end
-   * of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have suffix \x03\x04
-   * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return Whether the suffix field is set. - */ - @java.lang.Override - public boolean hasSuffix() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-   * `suffix` requires the field value to have the specified bytes at the end
-   * of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have suffix \x03\x04
-   * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The suffix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSuffix() { - return suffix_; - } - - public static final int CONTAINS_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString contains_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-   * `contains` requires the field value to have the specified bytes anywhere in
-   * the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value does not contain \x02\x03
-   * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-   * }
-   * ```
-   * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return Whether the contains field is set. - */ - @java.lang.Override - public boolean hasContains() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-   * `contains` requires the field value to have the specified bytes anywhere in
-   * the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value does not contain \x02\x03
-   * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-   * }
-   * ```
-   * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The contains. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContains() { - return contains_; - } - - public static final int IN_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.ProtobufList in_ = - emptyList(com.google.protobuf.ByteString.class); - /** - *
-   * `in` requires the field value to be equal to one of the specified
-   * values. If the field value doesn't match any of the specified values, an
-   * error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified
-   * values. If the field value doesn't match any of the specified values, an
-   * error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified
-   * values. If the field value doesn't match any of the specified values, an
-   * error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public com.google.protobuf.ByteString getIn(int index) { - return in_.get(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.ProtobufList notIn_ = - emptyList(com.google.protobuf.ByteString.class); - /** - *
-   * `not_in` requires the field value to be not equal to any of the specified
-   * values.
-   * If the field value matches any of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to be not equal to any of the specified
-   * values.
-   * If the field value matches any of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to be not equal to any of the specified
-   * values.
-   * If the field value matches any of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public com.google.protobuf.ByteString getNotIn(int index) { - return notIn_.get(index); - } - - public static final int IP_FIELD_NUMBER = 10; - /** - *
-   * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IP address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return Whether the ip field is set. - */ - @java.lang.Override - public boolean hasIp() { - return wellKnownCase_ == 10; - } - /** - *
-   * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IP address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return The ip. - */ - @java.lang.Override - public boolean getIp() { - if (wellKnownCase_ == 10) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV4_FIELD_NUMBER = 11; - /** - *
-   * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv4 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4 field is set. - */ - @java.lang.Override - public boolean hasIpv4() { - return wellKnownCase_ == 11; - } - /** - *
-   * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv4 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return The ipv4. - */ - @java.lang.Override - public boolean getIpv4() { - if (wellKnownCase_ == 11) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV6_FIELD_NUMBER = 12; - /** - *
-   * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv6 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6 field is set. - */ - @java.lang.Override - public boolean hasIpv6() { - return wellKnownCase_ == 12; - } - /** - *
-   * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv6 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return The ipv6. - */ - @java.lang.Override - public boolean getIpv6() { - if (wellKnownCase_ == 12) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int EXAMPLE_FIELD_NUMBER = 14; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.ProtobufList example_ = - emptyList(com.google.protobuf.ByteString.class); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBytes {
-   * bytes value = 1 [
-   * (buf.validate.field).bytes.example = "\x01\x02",
-   * (buf.validate.field).bytes.example = "\x02\x03"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBytes {
-   * bytes value = 1 [
-   * (buf.validate.field).bytes.example = "\x01\x02",
-   * (buf.validate.field).bytes.example = "\x02\x03"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBytes {
-   * bytes value = 1 [
-   * (buf.validate.field).bytes.example = "\x01\x02",
-   * (buf.validate.field).bytes.example = "\x02\x03"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public com.google.protobuf.ByteString getExample(int index) { - return example_.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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, const_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt64(2, minLen_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeUInt64(3, maxLen_); - } - if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, pattern_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeBytes(5, prefix_); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeBytes(6, suffix_); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeBytes(7, contains_); - } - for (int i = 0; i < in_.size(); i++) { - output.writeBytes(8, in_.get(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeBytes(9, notIn_.get(i)); - } - if (wellKnownCase_ == 10) { - output.writeBool( - 10, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 11) { - output.writeBool( - 11, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 12) { - output.writeBool( - 12, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt64(13, len_); - } - for (int i = 0; i < example_.size(); i++) { - output.writeBytes(14, example_.get(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeBytesSize(1, const_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, minLen_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, maxLen_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pattern_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, prefix_); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, suffix_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, contains_); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(in_.get(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(notIn_.get(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - if (wellKnownCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 10, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 11, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 12, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(13, len_); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(example_.get(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.BytesRules)) { - return super.equals(obj); - } - build.buf.validate.BytesRules other = (build.buf.validate.BytesRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (!getConst() - .equals(other.getConst())) return false; - } - if (hasLen() != other.hasLen()) return false; - if (hasLen()) { - if (getLen() - != other.getLen()) return false; - } - if (hasMinLen() != other.hasMinLen()) return false; - if (hasMinLen()) { - if (getMinLen() - != other.getMinLen()) return false; - } - if (hasMaxLen() != other.hasMaxLen()) return false; - if (hasMaxLen()) { - if (getMaxLen() - != other.getMaxLen()) return false; - } - if (hasPattern() != other.hasPattern()) return false; - if (hasPattern()) { - if (!getPattern() - .equals(other.getPattern())) return false; - } - if (hasPrefix() != other.hasPrefix()) return false; - if (hasPrefix()) { - if (!getPrefix() - .equals(other.getPrefix())) return false; - } - if (hasSuffix() != other.hasSuffix()) return false; - if (hasSuffix()) { - if (!getSuffix() - .equals(other.getSuffix())) return false; - } - if (hasContains() != other.hasContains()) return false; - if (hasContains()) { - if (!getContains() - .equals(other.getContains())) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getWellKnownCase().equals(other.getWellKnownCase())) return false; - switch (wellKnownCase_) { - case 10: - if (getIp() - != other.getIp()) return false; - break; - case 11: - if (getIpv4() - != other.getIpv4()) return false; - break; - case 12: - if (getIpv6() - != other.getIpv6()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst().hashCode(); - } - if (hasLen()) { - hash = (37 * hash) + LEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLen()); - } - if (hasMinLen()) { - hash = (37 * hash) + MIN_LEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinLen()); - } - if (hasMaxLen()) { - hash = (37 * hash) + MAX_LEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxLen()); - } - if (hasPattern()) { - hash = (37 * hash) + PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getPattern().hashCode(); - } - if (hasPrefix()) { - hash = (37 * hash) + PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getPrefix().hashCode(); - } - if (hasSuffix()) { - hash = (37 * hash) + SUFFIX_FIELD_NUMBER; - hash = (53 * hash) + getSuffix().hashCode(); - } - if (hasContains()) { - hash = (37 * hash) + CONTAINS_FIELD_NUMBER; - hash = (53 * hash) + getContains().hashCode(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (wellKnownCase_) { - case 10: - hash = (37 * hash) + IP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIp()); - break; - case 11: - hash = (37 * hash) + IPV4_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv4()); - break; - case 12: - hash = (37 * hash) + IPV6_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv6()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.BytesRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.BytesRules 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.BytesRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.BytesRules 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.BytesRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.BytesRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.BytesRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.BytesRules 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.BytesRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.BytesRules 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.BytesRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.BytesRules 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.BytesRules 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; - } - /** - *
-   * BytesRules describe the constraints applied to `bytes` values. These rules
-   * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.BytesRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.BytesRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.BytesRules) - build.buf.validate.BytesRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BytesRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BytesRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.BytesRules.class, build.buf.validate.BytesRules.Builder.class); - } - - // Construct using build.buf.validate.BytesRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = com.google.protobuf.ByteString.EMPTY; - len_ = 0L; - minLen_ = 0L; - maxLen_ = 0L; - pattern_ = ""; - prefix_ = com.google.protobuf.ByteString.EMPTY; - suffix_ = com.google.protobuf.ByteString.EMPTY; - contains_ = com.google.protobuf.ByteString.EMPTY; - in_ = emptyList(com.google.protobuf.ByteString.class); - notIn_ = emptyList(com.google.protobuf.ByteString.class); - example_ = emptyList(com.google.protobuf.ByteString.class); - wellKnownCase_ = 0; - wellKnown_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_BytesRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.BytesRules getDefaultInstanceForType() { - return build.buf.validate.BytesRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.BytesRules build() { - build.buf.validate.BytesRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.BytesRules buildPartial() { - build.buf.validate.BytesRules result = new build.buf.validate.BytesRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.BytesRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.len_ = len_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.minLen_ = minLen_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.maxLen_ = maxLen_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.pattern_ = pattern_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.prefix_ = prefix_; - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.suffix_ = suffix_; - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.contains_ = contains_; - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.BytesRules result) { - result.wellKnownCase_ = wellKnownCase_; - result.wellKnown_ = this.wellKnown_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.BytesRules) { - return mergeFrom((build.buf.validate.BytesRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.BytesRules other) { - if (other == build.buf.validate.BytesRules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (other.hasLen()) { - setLen(other.getLen()); - } - if (other.hasMinLen()) { - setMinLen(other.getMinLen()); - } - if (other.hasMaxLen()) { - setMaxLen(other.getMaxLen()); - } - if (other.hasPattern()) { - pattern_ = other.pattern_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasPrefix()) { - setPrefix(other.getPrefix()); - } - if (other.hasSuffix()) { - setSuffix(other.getSuffix()); - } - if (other.hasContains()) { - setContains(other.getContains()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000100; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000200; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00002000; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getWellKnownCase()) { - case IP: { - setIp(other.getIp()); - break; - } - case IPV4: { - setIpv4(other.getIpv4()); - break; - } - case IPV6: { - setIpv6(other.getIpv6()); - break; - } - case WELLKNOWN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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: { - const_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - minLen_ = input.readUInt64(); - bitField0_ |= 0x00000004; - break; - } // case 16 - case 24: { - maxLen_ = input.readUInt64(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 34: { - pattern_ = input.readBytes(); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: { - prefix_ = input.readBytes(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 50: { - suffix_ = input.readBytes(); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 58: { - contains_ = input.readBytes(); - bitField0_ |= 0x00000080; - break; - } // case 58 - case 66: { - com.google.protobuf.ByteString v = input.readBytes(); - ensureInIsMutable(); - in_.add(v); - break; - } // case 66 - case 74: { - com.google.protobuf.ByteString v = input.readBytes(); - ensureNotInIsMutable(); - notIn_.add(v); - break; - } // case 74 - case 80: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 10; - break; - } // case 80 - case 88: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 11; - break; - } // case 88 - case 96: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 12; - break; - } // case 96 - case 104: { - len_ = input.readUInt64(); - bitField0_ |= 0x00000002; - break; - } // case 104 - case 114: { - com.google.protobuf.ByteString v = input.readBytes(); - ensureExampleIsMutable(); - example_.add(v); - break; - } // case 114 - 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 wellKnownCase_ = 0; - private java.lang.Object wellKnown_; - public WellKnownCase - getWellKnownCase() { - return WellKnownCase.forNumber( - wellKnownCase_); - } - - public Builder clearWellKnown() { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.ByteString const_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * `const` requires the field value to exactly match the specified bytes
-     * value. If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be "\x01\x02\x03\x04"
-     * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified bytes
-     * value. If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be "\x01\x02\x03\x04"
-     * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified bytes
-     * value. If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be "\x01\x02\x03\x04"
-     * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified bytes
-     * value. If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be "\x01\x02\x03\x04"
-     * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = getDefaultInstance().getConst(); - onChanged(); - return this; - } - - private long len_ ; - /** - *
-     * `len` requires the field value to have the specified length in bytes.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be 4 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return Whether the len field is set. - */ - @java.lang.Override - public boolean hasLen() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `len` requires the field value to have the specified length in bytes.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be 4 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return The len. - */ - @java.lang.Override - public long getLen() { - return len_; - } - /** - *
-     * `len` requires the field value to have the specified length in bytes.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be 4 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @param value The len to set. - * @return This builder for chaining. - */ - public Builder setLen(long value) { - - len_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `len` requires the field value to have the specified length in bytes.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be 4 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLen() { - bitField0_ = (bitField0_ & ~0x00000002); - len_ = 0L; - onChanged(); - return this; - } - - private long minLen_ ; - /** - *
-     * `min_len` requires the field value to have at least the specified minimum
-     * length in bytes.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be at least 2 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return Whether the minLen field is set. - */ - @java.lang.Override - public boolean hasMinLen() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * `min_len` requires the field value to have at least the specified minimum
-     * length in bytes.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be at least 2 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return The minLen. - */ - @java.lang.Override - public long getMinLen() { - return minLen_; - } - /** - *
-     * `min_len` requires the field value to have at least the specified minimum
-     * length in bytes.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be at least 2 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @param value The minLen to set. - * @return This builder for chaining. - */ - public Builder setMinLen(long value) { - - minLen_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `min_len` requires the field value to have at least the specified minimum
-     * length in bytes.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value length must be at least 2 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMinLen() { - bitField0_ = (bitField0_ & ~0x00000004); - minLen_ = 0L; - onChanged(); - return this; - } - - private long maxLen_ ; - /** - *
-     * `max_len` requires the field value to have at most the specified maximum
-     * length in bytes.
-     * If the field value exceeds the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be at most 6 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return Whether the maxLen field is set. - */ - @java.lang.Override - public boolean hasMaxLen() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * `max_len` requires the field value to have at most the specified maximum
-     * length in bytes.
-     * If the field value exceeds the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be at most 6 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return The maxLen. - */ - @java.lang.Override - public long getMaxLen() { - return maxLen_; - } - /** - *
-     * `max_len` requires the field value to have at most the specified maximum
-     * length in bytes.
-     * If the field value exceeds the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be at most 6 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @param value The maxLen to set. - * @return This builder for chaining. - */ - public Builder setMaxLen(long value) { - - maxLen_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `max_len` requires the field value to have at most the specified maximum
-     * length in bytes.
-     * If the field value exceeds the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be at most 6 bytes.
-     * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMaxLen() { - bitField0_ = (bitField0_ & ~0x00000008); - maxLen_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object pattern_ = ""; - /** - *
-     * `pattern` requires the field value to match the specified regular
-     * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-     * The value of the field must be valid UTF-8 or validation will fail with a
-     * runtime error.
-     * If the field value doesn't match the pattern, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must match regex pattern "^[a-zA-Z0-9]+$".
-     * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return Whether the pattern field is set. - */ - public boolean hasPattern() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * `pattern` requires the field value to match the specified regular
-     * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-     * The value of the field must be valid UTF-8 or validation will fail with a
-     * runtime error.
-     * If the field value doesn't match the pattern, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must match regex pattern "^[a-zA-Z0-9]+$".
-     * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The pattern. - */ - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `pattern` requires the field value to match the specified regular
-     * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-     * The value of the field must be valid UTF-8 or validation will fail with a
-     * runtime error.
-     * If the field value doesn't match the pattern, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must match regex pattern "^[a-zA-Z0-9]+$".
-     * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The bytes for pattern. - */ - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `pattern` requires the field value to match the specified regular
-     * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-     * The value of the field must be valid UTF-8 or validation will fail with a
-     * runtime error.
-     * If the field value doesn't match the pattern, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must match regex pattern "^[a-zA-Z0-9]+$".
-     * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @param value The pattern to set. - * @return This builder for chaining. - */ - public Builder setPattern( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pattern_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * `pattern` requires the field value to match the specified regular
-     * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-     * The value of the field must be valid UTF-8 or validation will fail with a
-     * runtime error.
-     * If the field value doesn't match the pattern, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must match regex pattern "^[a-zA-Z0-9]+$".
-     * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearPattern() { - pattern_ = getDefaultInstance().getPattern(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-     * `pattern` requires the field value to match the specified regular
-     * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-     * The value of the field must be valid UTF-8 or validation will fail with a
-     * runtime error.
-     * If the field value doesn't match the pattern, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must match regex pattern "^[a-zA-Z0-9]+$".
-     * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @param value The bytes for pattern to set. - * @return This builder for chaining. - */ - public Builder setPatternBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - pattern_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString prefix_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * `prefix` requires the field value to have the specified bytes at the
-     * beginning of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have prefix \x01\x02
-     * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-     * }
-     * ```
-     * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return Whether the prefix field is set. - */ - @java.lang.Override - public boolean hasPrefix() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * `prefix` requires the field value to have the specified bytes at the
-     * beginning of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have prefix \x01\x02
-     * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-     * }
-     * ```
-     * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The prefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPrefix() { - return prefix_; - } - /** - *
-     * `prefix` requires the field value to have the specified bytes at the
-     * beginning of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have prefix \x01\x02
-     * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-     * }
-     * ```
-     * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @param value The prefix to set. - * @return This builder for chaining. - */ - public Builder setPrefix(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - prefix_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `prefix` requires the field value to have the specified bytes at the
-     * beginning of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have prefix \x01\x02
-     * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-     * }
-     * ```
-     * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearPrefix() { - bitField0_ = (bitField0_ & ~0x00000020); - prefix_ = getDefaultInstance().getPrefix(); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString suffix_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * `suffix` requires the field value to have the specified bytes at the end
-     * of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have suffix \x03\x04
-     * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return Whether the suffix field is set. - */ - @java.lang.Override - public boolean hasSuffix() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * `suffix` requires the field value to have the specified bytes at the end
-     * of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have suffix \x03\x04
-     * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The suffix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSuffix() { - return suffix_; - } - /** - *
-     * `suffix` requires the field value to have the specified bytes at the end
-     * of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have suffix \x03\x04
-     * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @param value The suffix to set. - * @return This builder for chaining. - */ - public Builder setSuffix(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - suffix_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `suffix` requires the field value to have the specified bytes at the end
-     * of the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value does not have suffix \x03\x04
-     * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-     * }
-     * ```
-     * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearSuffix() { - bitField0_ = (bitField0_ & ~0x00000040); - suffix_ = getDefaultInstance().getSuffix(); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString contains_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * `contains` requires the field value to have the specified bytes anywhere in
-     * the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value does not contain \x02\x03
-     * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-     * }
-     * ```
-     * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return Whether the contains field is set. - */ - @java.lang.Override - public boolean hasContains() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * `contains` requires the field value to have the specified bytes anywhere in
-     * the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value does not contain \x02\x03
-     * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-     * }
-     * ```
-     * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The contains. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContains() { - return contains_; - } - /** - *
-     * `contains` requires the field value to have the specified bytes anywhere in
-     * the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value does not contain \x02\x03
-     * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-     * }
-     * ```
-     * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @param value The contains to set. - * @return This builder for chaining. - */ - public Builder setContains(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - contains_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `contains` requires the field value to have the specified bytes anywhere in
-     * the string.
-     * If the field value doesn't meet the requirement, an error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value does not contain \x02\x03
-     * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-     * }
-     * ```
-     * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearContains() { - bitField0_ = (bitField0_ & ~0x00000080); - contains_ = getDefaultInstance().getContains(); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.ProtobufList in_ = emptyList(com.google.protobuf.ByteString.class); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000100; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public com.google.protobuf.ByteString getIn(int index) { - return in_.get(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.set(index, value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.add(value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified
-     * values. If the field value doesn't match any of the specified values, an
-     * error message is generated.
-     *
-     * ```protobuf
-     * message MyBytes {
-     * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyList(com.google.protobuf.ByteString.class); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.ProtobufList notIn_ = emptyList(com.google.protobuf.ByteString.class); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000200; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public com.google.protobuf.ByteString getNotIn(int index) { - return notIn_.get(index); - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.set(index, value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.add(value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the specified
-     * values.
-     * If the field value matches any of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-     * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-     * }
-     * ```
-     * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyList(com.google.protobuf.ByteString.class); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - - /** - *
-     * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IP address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return Whether the ip field is set. - */ - public boolean hasIp() { - return wellKnownCase_ == 10; - } - /** - *
-     * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IP address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return The ip. - */ - public boolean getIp() { - if (wellKnownCase_ == 10) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IP address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @param value The ip to set. - * @return This builder for chaining. - */ - public Builder setIp(boolean value) { - - wellKnownCase_ = 10; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IP address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIp() { - if (wellKnownCase_ == 10) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv4 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4 field is set. - */ - public boolean hasIpv4() { - return wellKnownCase_ == 11; - } - /** - *
-     * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv4 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return The ipv4. - */ - public boolean getIpv4() { - if (wellKnownCase_ == 11) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv4 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @param value The ipv4 to set. - * @return This builder for chaining. - */ - public Builder setIpv4(boolean value) { - - wellKnownCase_ = 11; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     *
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv4 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv4() { - if (wellKnownCase_ == 11) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv6 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6 field is set. - */ - public boolean hasIpv6() { - return wellKnownCase_ == 12; - } - /** - *
-     * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv6 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return The ipv6. - */ - public boolean getIpv6() { - if (wellKnownCase_ == 12) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv6 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @param value The ipv6 to set. - * @return This builder for chaining. - */ - public Builder setIpv6(boolean value) { - - wellKnownCase_ = 12; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-     * If the field value doesn't meet this constraint, an error message is generated.
-     * ```proto
-     * message MyBytes {
-     * // value must be a valid IPv6 address
-     * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv6() { - if (wellKnownCase_ == 12) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.ProtobufList example_ = emptyList(com.google.protobuf.ByteString.class); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00002000; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public com.google.protobuf.ByteString getExample(int index) { - return example_.get(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureExampleIsMutable(); - example_.set(index, value); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureExampleIsMutable(); - example_.add(value); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyBytes {
-     * bytes value = 1 [
-     * (buf.validate.field).bytes.example = "\x01\x02",
-     * (buf.validate.field).bytes.example = "\x02\x03"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyList(com.google.protobuf.ByteString.class); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.BytesRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.BytesRules) - private static final build.buf.validate.BytesRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.BytesRules(); - } - - public static build.buf.validate.BytesRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BytesRules 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.BytesRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/BytesRulesOrBuilder.java b/src/main/java/build/buf/validate/BytesRulesOrBuilder.java deleted file mode 100644 index c8357eab..00000000 --- a/src/main/java/build/buf/validate/BytesRulesOrBuilder.java +++ /dev/null @@ -1,611 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface BytesRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.BytesRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified bytes
-   * value. If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be "\x01\x02\x03\x04"
-   * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified bytes
-   * value. If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be "\x01\x02\x03\x04"
-   * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - com.google.protobuf.ByteString getConst(); - - /** - *
-   * `len` requires the field value to have the specified length in bytes.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be 4 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return Whether the len field is set. - */ - boolean hasLen(); - /** - *
-   * `len` requires the field value to have the specified length in bytes.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be 4 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 13 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return The len. - */ - long getLen(); - - /** - *
-   * `min_len` requires the field value to have at least the specified minimum
-   * length in bytes.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be at least 2 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return Whether the minLen field is set. - */ - boolean hasMinLen(); - /** - *
-   * `min_len` requires the field value to have at least the specified minimum
-   * length in bytes.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value length must be at least 2 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return The minLen. - */ - long getMinLen(); - - /** - *
-   * `max_len` requires the field value to have at most the specified maximum
-   * length in bytes.
-   * If the field value exceeds the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be at most 6 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return Whether the maxLen field is set. - */ - boolean hasMaxLen(); - /** - *
-   * `max_len` requires the field value to have at most the specified maximum
-   * length in bytes.
-   * If the field value exceeds the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be at most 6 bytes.
-   * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return The maxLen. - */ - long getMaxLen(); - - /** - *
-   * `pattern` requires the field value to match the specified regular
-   * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-   * The value of the field must be valid UTF-8 or validation will fail with a
-   * runtime error.
-   * If the field value doesn't match the pattern, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must match regex pattern "^[a-zA-Z0-9]+$".
-   * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return Whether the pattern field is set. - */ - boolean hasPattern(); - /** - *
-   * `pattern` requires the field value to match the specified regular
-   * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-   * The value of the field must be valid UTF-8 or validation will fail with a
-   * runtime error.
-   * If the field value doesn't match the pattern, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must match regex pattern "^[a-zA-Z0-9]+$".
-   * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The pattern. - */ - java.lang.String getPattern(); - /** - *
-   * `pattern` requires the field value to match the specified regular
-   * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
-   * The value of the field must be valid UTF-8 or validation will fail with a
-   * runtime error.
-   * If the field value doesn't match the pattern, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must match regex pattern "^[a-zA-Z0-9]+$".
-   * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 4 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The bytes for pattern. - */ - com.google.protobuf.ByteString - getPatternBytes(); - - /** - *
-   * `prefix` requires the field value to have the specified bytes at the
-   * beginning of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have prefix \x01\x02
-   * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-   * }
-   * ```
-   * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return Whether the prefix field is set. - */ - boolean hasPrefix(); - /** - *
-   * `prefix` requires the field value to have the specified bytes at the
-   * beginning of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have prefix \x01\x02
-   * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
-   * }
-   * ```
-   * 
- * - * optional bytes prefix = 5 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The prefix. - */ - com.google.protobuf.ByteString getPrefix(); - - /** - *
-   * `suffix` requires the field value to have the specified bytes at the end
-   * of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have suffix \x03\x04
-   * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return Whether the suffix field is set. - */ - boolean hasSuffix(); - /** - *
-   * `suffix` requires the field value to have the specified bytes at the end
-   * of the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value does not have suffix \x03\x04
-   * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
-   * }
-   * ```
-   * 
- * - * optional bytes suffix = 6 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The suffix. - */ - com.google.protobuf.ByteString getSuffix(); - - /** - *
-   * `contains` requires the field value to have the specified bytes anywhere in
-   * the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value does not contain \x02\x03
-   * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-   * }
-   * ```
-   * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return Whether the contains field is set. - */ - boolean hasContains(); - /** - *
-   * `contains` requires the field value to have the specified bytes anywhere in
-   * the string.
-   * If the field value doesn't meet the requirement, an error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value does not contain \x02\x03
-   * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
-   * }
-   * ```
-   * 
- * - * optional bytes contains = 7 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The contains. - */ - com.google.protobuf.ByteString getContains(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified
-   * values. If the field value doesn't match any of the specified values, an
-   * error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified
-   * values. If the field value doesn't match any of the specified values, an
-   * error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified
-   * values. If the field value doesn't match any of the specified values, an
-   * error message is generated.
-   *
-   * ```protobuf
-   * message MyBytes {
-   * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes in = 8 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - com.google.protobuf.ByteString getIn(int index); - - /** - *
-   * `not_in` requires the field value to be not equal to any of the specified
-   * values.
-   * If the field value matches any of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to be not equal to any of the specified
-   * values.
-   * If the field value matches any of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to be not equal to any of the specified
-   * values.
-   * If the field value matches any of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
-   * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
-   * }
-   * ```
-   * 
- * - * repeated bytes not_in = 9 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - com.google.protobuf.ByteString getNotIn(int index); - - /** - *
-   * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IP address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return Whether the ip field is set. - */ - boolean hasIp(); - /** - *
-   * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IP address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 10 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return The ip. - */ - boolean getIp(); - - /** - *
-   * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv4 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4 field is set. - */ - boolean hasIpv4(); - /** - *
-   * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   *
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv4 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 11 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return The ipv4. - */ - boolean getIpv4(); - - /** - *
-   * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv6 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6 field is set. - */ - boolean hasIpv6(); - /** - *
-   * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
-   * If the field value doesn't meet this constraint, an error message is generated.
-   * ```proto
-   * message MyBytes {
-   * // value must be a valid IPv6 address
-   * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 12 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return The ipv6. - */ - boolean getIpv6(); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBytes {
-   * bytes value = 1 [
-   * (buf.validate.field).bytes.example = "\x01\x02",
-   * (buf.validate.field).bytes.example = "\x02\x03"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBytes {
-   * bytes value = 1 [
-   * (buf.validate.field).bytes.example = "\x01\x02",
-   * (buf.validate.field).bytes.example = "\x02\x03"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyBytes {
-   * bytes value = 1 [
-   * (buf.validate.field).bytes.example = "\x01\x02",
-   * (buf.validate.field).bytes.example = "\x02\x03"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated bytes example = 14 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - com.google.protobuf.ByteString getExample(int index); - - build.buf.validate.BytesRules.WellKnownCase getWellKnownCase(); -} diff --git a/src/main/java/build/buf/validate/Constraint.java b/src/main/java/build/buf/validate/Constraint.java deleted file mode 100644 index 3799ecb6..00000000 --- a/src/main/java/build/buf/validate/Constraint.java +++ /dev/null @@ -1,1055 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * `Constraint` represents a validation rule written in the Common Expression
- * Language (CEL) syntax. Each Constraint includes a unique identifier, an
- * optional error message, and the CEL expression to evaluate. For more
- * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
- *
- * ```proto
- * message Foo {
- * option (buf.validate.message).cel = {
- * id: "foo.bar"
- * message: "bar must be greater than 0"
- * expression: "this.bar > 0"
- * };
- * int32 bar = 1;
- * }
- * ```
- * 
- * - * Protobuf type {@code buf.validate.Constraint} - */ -public final class Constraint extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.Constraint) - ConstraintOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Constraint.class.getName()); - } - // Use Constraint.newBuilder() to construct. - private Constraint(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Constraint() { - id_ = ""; - message_ = ""; - expression_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Constraint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Constraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Constraint.class, build.buf.validate.Constraint.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - *
-   * `id` is a string that serves as a machine-readable name for this Constraint.
-   * It should be unique within its scope, which could be either a message or a field.
-   * 
- * - * optional string id = 1 [json_name = "id"]; - * @return Whether the id field is set. - */ - @java.lang.Override - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `id` is a string that serves as a machine-readable name for this Constraint.
-   * It should be unique within its scope, which could be either a message or a field.
-   * 
- * - * optional string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - id_ = s; - } - return s; - } - } - /** - *
-   * `id` is a string that serves as a machine-readable name for this Constraint.
-   * It should be unique within its scope, which could be either a message or a field.
-   * 
- * - * optional string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MESSAGE_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object message_ = ""; - /** - *
-   * `message` is an optional field that provides a human-readable error message
-   * for this Constraint when the CEL expression evaluates to false. If a
-   * non-empty message is provided, any strings resulting from the CEL
-   * expression evaluation are ignored.
-   * 
- * - * optional string message = 2 [json_name = "message"]; - * @return Whether the message field is set. - */ - @java.lang.Override - public boolean hasMessage() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `message` is an optional field that provides a human-readable error message
-   * for this Constraint when the CEL expression evaluates to false. If a
-   * non-empty message is provided, any strings resulting from the CEL
-   * expression evaluation are ignored.
-   * 
- * - * optional string message = 2 [json_name = "message"]; - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - message_ = s; - } - return s; - } - } - /** - *
-   * `message` is an optional field that provides a human-readable error message
-   * for this Constraint when the CEL expression evaluates to false. If a
-   * non-empty message is provided, any strings resulting from the CEL
-   * expression evaluation are ignored.
-   * 
- * - * optional string message = 2 [json_name = "message"]; - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXPRESSION_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object expression_ = ""; - /** - *
-   * `expression` is the actual CEL expression that will be evaluated for
-   * validation. This string must resolve to either a boolean or a string
-   * value. If the expression evaluates to false or a non-empty string, the
-   * validation is considered failed, and the message is rejected.
-   * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return Whether the expression field is set. - */ - @java.lang.Override - public boolean hasExpression() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * `expression` is the actual CEL expression that will be evaluated for
-   * validation. This string must resolve to either a boolean or a string
-   * value. If the expression evaluates to false or a non-empty string, the
-   * validation is considered failed, and the message is rejected.
-   * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return The expression. - */ - @java.lang.Override - public java.lang.String getExpression() { - java.lang.Object ref = expression_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - expression_ = s; - } - return s; - } - } - /** - *
-   * `expression` is the actual CEL expression that will be evaluated for
-   * validation. This string must resolve to either a boolean or a string
-   * value. If the expression evaluates to false or a non-empty string, the
-   * validation is considered failed, and the message is rejected.
-   * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return The bytes for expression. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExpressionBytes() { - java.lang.Object ref = expression_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - expression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, expression_); - } - 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.GeneratedMessage.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, expression_); - } - 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.Constraint)) { - return super.equals(obj); - } - build.buf.validate.Constraint other = (build.buf.validate.Constraint) obj; - - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (!getId() - .equals(other.getId())) return false; - } - if (hasMessage() != other.hasMessage()) return false; - if (hasMessage()) { - if (!getMessage() - .equals(other.getMessage())) return false; - } - if (hasExpression() != other.hasExpression()) return false; - if (hasExpression()) { - if (!getExpression() - .equals(other.getExpression())) 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 (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - } - if (hasMessage()) { - hash = (37 * hash) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - } - if (hasExpression()) { - hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; - hash = (53 * hash) + getExpression().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Constraint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Constraint 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.Constraint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Constraint 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.Constraint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Constraint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Constraint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Constraint 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.Constraint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Constraint 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.Constraint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Constraint 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.Constraint 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; - } - /** - *
-   * `Constraint` represents a validation rule written in the Common Expression
-   * Language (CEL) syntax. Each Constraint includes a unique identifier, an
-   * optional error message, and the CEL expression to evaluate. For more
-   * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message Foo {
-   * option (buf.validate.message).cel = {
-   * id: "foo.bar"
-   * message: "bar must be greater than 0"
-   * expression: "this.bar > 0"
-   * };
-   * int32 bar = 1;
-   * }
-   * ```
-   * 
- * - * Protobuf type {@code buf.validate.Constraint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.Constraint) - build.buf.validate.ConstraintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Constraint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Constraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Constraint.class, build.buf.validate.Constraint.Builder.class); - } - - // Construct using build.buf.validate.Constraint.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - message_ = ""; - expression_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Constraint_descriptor; - } - - @java.lang.Override - public build.buf.validate.Constraint getDefaultInstanceForType() { - return build.buf.validate.Constraint.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Constraint build() { - build.buf.validate.Constraint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Constraint buildPartial() { - build.buf.validate.Constraint result = new build.buf.validate.Constraint(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.Constraint result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.message_ = message_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.expression_ = expression_; - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Constraint) { - return mergeFrom((build.buf.validate.Constraint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Constraint other) { - if (other == build.buf.validate.Constraint.getDefaultInstance()) return this; - if (other.hasId()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasMessage()) { - message_ = other.message_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasExpression()) { - expression_ = other.expression_; - bitField0_ |= 0x00000004; - onChanged(); - } - 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: { - id_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - message_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - expression_ = input.readBytes(); - bitField0_ |= 0x00000004; - break; - } // case 26 - 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.lang.Object id_ = ""; - /** - *
-     * `id` is a string that serves as a machine-readable name for this Constraint.
-     * It should be unique within its scope, which could be either a message or a field.
-     * 
- * - * optional string id = 1 [json_name = "id"]; - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `id` is a string that serves as a machine-readable name for this Constraint.
-     * It should be unique within its scope, which could be either a message or a field.
-     * 
- * - * optional string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - id_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `id` is a string that serves as a machine-readable name for this Constraint.
-     * It should be unique within its scope, which could be either a message or a field.
-     * 
- * - * optional string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `id` is a string that serves as a machine-readable name for this Constraint.
-     * It should be unique within its scope, which could be either a message or a field.
-     * 
- * - * optional string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `id` is a string that serves as a machine-readable name for this Constraint.
-     * It should be unique within its scope, which could be either a message or a field.
-     * 
- * - * optional string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `id` is a string that serves as a machine-readable name for this Constraint.
-     * It should be unique within its scope, which could be either a message or a field.
-     * 
- * - * optional string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object message_ = ""; - /** - *
-     * `message` is an optional field that provides a human-readable error message
-     * for this Constraint when the CEL expression evaluates to false. If a
-     * non-empty message is provided, any strings resulting from the CEL
-     * expression evaluation are ignored.
-     * 
- * - * optional string message = 2 [json_name = "message"]; - * @return Whether the message field is set. - */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `message` is an optional field that provides a human-readable error message
-     * for this Constraint when the CEL expression evaluates to false. If a
-     * non-empty message is provided, any strings resulting from the CEL
-     * expression evaluation are ignored.
-     * 
- * - * optional string message = 2 [json_name = "message"]; - * @return The message. - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - message_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `message` is an optional field that provides a human-readable error message
-     * for this Constraint when the CEL expression evaluates to false. If a
-     * non-empty message is provided, any strings resulting from the CEL
-     * expression evaluation are ignored.
-     * 
- * - * optional string message = 2 [json_name = "message"]; - * @return The bytes for message. - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `message` is an optional field that provides a human-readable error message
-     * for this Constraint when the CEL expression evaluates to false. If a
-     * non-empty message is provided, any strings resulting from the CEL
-     * expression evaluation are ignored.
-     * 
- * - * optional string message = 2 [json_name = "message"]; - * @param value The message to set. - * @return This builder for chaining. - */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - message_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `message` is an optional field that provides a human-readable error message
-     * for this Constraint when the CEL expression evaluates to false. If a
-     * non-empty message is provided, any strings resulting from the CEL
-     * expression evaluation are ignored.
-     * 
- * - * optional string message = 2 [json_name = "message"]; - * @return This builder for chaining. - */ - public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * `message` is an optional field that provides a human-readable error message
-     * for this Constraint when the CEL expression evaluates to false. If a
-     * non-empty message is provided, any strings resulting from the CEL
-     * expression evaluation are ignored.
-     * 
- * - * optional string message = 2 [json_name = "message"]; - * @param value The bytes for message to set. - * @return This builder for chaining. - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - message_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object expression_ = ""; - /** - *
-     * `expression` is the actual CEL expression that will be evaluated for
-     * validation. This string must resolve to either a boolean or a string
-     * value. If the expression evaluates to false or a non-empty string, the
-     * validation is considered failed, and the message is rejected.
-     * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return Whether the expression field is set. - */ - public boolean hasExpression() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * `expression` is the actual CEL expression that will be evaluated for
-     * validation. This string must resolve to either a boolean or a string
-     * value. If the expression evaluates to false or a non-empty string, the
-     * validation is considered failed, and the message is rejected.
-     * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return The expression. - */ - public java.lang.String getExpression() { - java.lang.Object ref = expression_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - expression_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `expression` is the actual CEL expression that will be evaluated for
-     * validation. This string must resolve to either a boolean or a string
-     * value. If the expression evaluates to false or a non-empty string, the
-     * validation is considered failed, and the message is rejected.
-     * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return The bytes for expression. - */ - public com.google.protobuf.ByteString - getExpressionBytes() { - java.lang.Object ref = expression_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - expression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `expression` is the actual CEL expression that will be evaluated for
-     * validation. This string must resolve to either a boolean or a string
-     * value. If the expression evaluates to false or a non-empty string, the
-     * validation is considered failed, and the message is rejected.
-     * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @param value The expression to set. - * @return This builder for chaining. - */ - public Builder setExpression( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - expression_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `expression` is the actual CEL expression that will be evaluated for
-     * validation. This string must resolve to either a boolean or a string
-     * value. If the expression evaluates to false or a non-empty string, the
-     * validation is considered failed, and the message is rejected.
-     * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return This builder for chaining. - */ - public Builder clearExpression() { - expression_ = getDefaultInstance().getExpression(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * `expression` is the actual CEL expression that will be evaluated for
-     * validation. This string must resolve to either a boolean or a string
-     * value. If the expression evaluates to false or a non-empty string, the
-     * validation is considered failed, and the message is rejected.
-     * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @param value The bytes for expression to set. - * @return This builder for chaining. - */ - public Builder setExpressionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - expression_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Constraint) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Constraint) - private static final build.buf.validate.Constraint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Constraint(); - } - - public static build.buf.validate.Constraint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Constraint 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.Constraint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/ConstraintOrBuilder.java b/src/main/java/build/buf/validate/ConstraintOrBuilder.java deleted file mode 100644 index 0b3feeb6..00000000 --- a/src/main/java/build/buf/validate/ConstraintOrBuilder.java +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface ConstraintOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Constraint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `id` is a string that serves as a machine-readable name for this Constraint.
-   * It should be unique within its scope, which could be either a message or a field.
-   * 
- * - * optional string id = 1 [json_name = "id"]; - * @return Whether the id field is set. - */ - boolean hasId(); - /** - *
-   * `id` is a string that serves as a machine-readable name for this Constraint.
-   * It should be unique within its scope, which could be either a message or a field.
-   * 
- * - * optional string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-   * `id` is a string that serves as a machine-readable name for this Constraint.
-   * It should be unique within its scope, which could be either a message or a field.
-   * 
- * - * optional string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-   * `message` is an optional field that provides a human-readable error message
-   * for this Constraint when the CEL expression evaluates to false. If a
-   * non-empty message is provided, any strings resulting from the CEL
-   * expression evaluation are ignored.
-   * 
- * - * optional string message = 2 [json_name = "message"]; - * @return Whether the message field is set. - */ - boolean hasMessage(); - /** - *
-   * `message` is an optional field that provides a human-readable error message
-   * for this Constraint when the CEL expression evaluates to false. If a
-   * non-empty message is provided, any strings resulting from the CEL
-   * expression evaluation are ignored.
-   * 
- * - * optional string message = 2 [json_name = "message"]; - * @return The message. - */ - java.lang.String getMessage(); - /** - *
-   * `message` is an optional field that provides a human-readable error message
-   * for this Constraint when the CEL expression evaluates to false. If a
-   * non-empty message is provided, any strings resulting from the CEL
-   * expression evaluation are ignored.
-   * 
- * - * optional string message = 2 [json_name = "message"]; - * @return The bytes for message. - */ - com.google.protobuf.ByteString - getMessageBytes(); - - /** - *
-   * `expression` is the actual CEL expression that will be evaluated for
-   * validation. This string must resolve to either a boolean or a string
-   * value. If the expression evaluates to false or a non-empty string, the
-   * validation is considered failed, and the message is rejected.
-   * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return Whether the expression field is set. - */ - boolean hasExpression(); - /** - *
-   * `expression` is the actual CEL expression that will be evaluated for
-   * validation. This string must resolve to either a boolean or a string
-   * value. If the expression evaluates to false or a non-empty string, the
-   * validation is considered failed, and the message is rejected.
-   * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return The expression. - */ - java.lang.String getExpression(); - /** - *
-   * `expression` is the actual CEL expression that will be evaluated for
-   * validation. This string must resolve to either a boolean or a string
-   * value. If the expression evaluates to false or a non-empty string, the
-   * validation is considered failed, and the message is rejected.
-   * 
- * - * optional string expression = 3 [json_name = "expression"]; - * @return The bytes for expression. - */ - com.google.protobuf.ByteString - getExpressionBytes(); -} diff --git a/src/main/java/build/buf/validate/DoubleRules.java b/src/main/java/build/buf/validate/DoubleRules.java deleted file mode 100644 index d15c0dd1..00000000 --- a/src/main/java/build/buf/validate/DoubleRules.java +++ /dev/null @@ -1,2517 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * DoubleRules describes the constraints applied to `double` values. These
- * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.DoubleRules} - */ -public final class DoubleRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - DoubleRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.DoubleRules) - DoubleRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DoubleRules.class.getName()); - } - // Use DoubleRules.newBuilder() to construct. - private DoubleRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private DoubleRules() { - in_ = emptyDoubleList(); - notIn_ = emptyDoubleList(); - example_ = emptyDoubleList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DoubleRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DoubleRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.DoubleRules.class, build.buf.validate.DoubleRules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private double const_ = 0D; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must equal 42.0
-   * double value = 1 [(buf.validate.field).double.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must equal 42.0
-   * double value = 1 [(buf.validate.field).double.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public double getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than 10.0
-   * double value = 1 [(buf.validate.field).double.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than 10.0
-   * double value = 1 [(buf.validate.field).double.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public double getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Double) lessThan_; - } - return 0D; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified value
-   * (field <= value). If the field value is greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than or equal to 10.0
-   * double value = 1 [(buf.validate.field).double.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified value
-   * (field <= value). If the field value is greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than or equal to 10.0
-   * double value = 1 [(buf.validate.field).double.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public double getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Double) lessThan_; - } - return 0D; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-   * the range is reversed, and the field value must be outside the specified
-   * range. If the field value doesn't meet the required conditions, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than 5.0 [double.gt]
-   * double value = 1 [(buf.validate.field).double.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-   * the range is reversed, and the field value must be outside the specified
-   * range. If the field value doesn't meet the required conditions, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than 5.0 [double.gt]
-   * double value = 1 [(buf.validate.field).double.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public double getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Double) greaterThan_; - } - return 0D; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than or equal to 5.0 [double.gte]
-   * double value = 1 [(buf.validate.field).double.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than or equal to 5.0 [double.gte]
-   * double value = 1 [(buf.validate.field).double.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public double getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Double) greaterThan_; - } - return 0D; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList in_ = - emptyDoubleList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public double getIn(int index) { - return in_.getDouble(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList notIn_ = - emptyDoubleList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public double getNotIn(int index) { - return notIn_.getDouble(index); - } - - public static final int FINITE_FIELD_NUMBER = 8; - private boolean finite_ = false; - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return Whether the finite field is set. - */ - @java.lang.Override - public boolean hasFinite() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return The finite. - */ - @java.lang.Override - public boolean getFinite() { - return finite_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList example_ = - emptyDoubleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDouble {
-   * double value = 1 [
-   * (buf.validate.field).double.example = 1.0,
-   * (buf.validate.field).double.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDouble {
-   * double value = 1 [
-   * (buf.validate.field).double.example = 1.0,
-   * (buf.validate.field).double.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDouble {
-   * double value = 1 [
-   * (buf.validate.field).double.example = 1.0,
-   * (buf.validate.field).double.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public double getExample(int index) { - return example_.getDouble(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeDouble(1, const_); - } - if (lessThanCase_ == 2) { - output.writeDouble( - 2, (double)((java.lang.Double) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeDouble( - 3, (double)((java.lang.Double) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeDouble( - 4, (double)((java.lang.Double) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeDouble( - 5, (double)((java.lang.Double) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeDouble(6, in_.getDouble(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeDouble(7, notIn_.getDouble(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBool(8, finite_); - } - for (int i = 0; i < example_.size(); i++) { - output.writeDouble(9, example_.getDouble(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeDoubleSize(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize( - 2, (double)((java.lang.Double) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize( - 3, (double)((java.lang.Double) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize( - 4, (double)((java.lang.Double) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize( - 5, (double)((java.lang.Double) greaterThan_)); - } - { - int dataSize = 0; - dataSize = 8 * getInList().size(); - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - dataSize = 8 * getNotInList().size(); - size += dataSize; - size += 1 * getNotInList().size(); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, finite_); - } - { - int dataSize = 0; - dataSize = 8 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.DoubleRules)) { - return super.equals(obj); - } - build.buf.validate.DoubleRules other = (build.buf.validate.DoubleRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (java.lang.Double.doubleToLongBits(getConst()) - != java.lang.Double.doubleToLongBits( - other.getConst())) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (hasFinite() != other.hasFinite()) return false; - if (hasFinite()) { - if (getFinite() - != other.getFinite()) return false; - } - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (java.lang.Double.doubleToLongBits(getLt()) - != java.lang.Double.doubleToLongBits( - other.getLt())) return false; - break; - case 3: - if (java.lang.Double.doubleToLongBits(getLte()) - != java.lang.Double.doubleToLongBits( - other.getLte())) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (java.lang.Double.doubleToLongBits(getGt()) - != java.lang.Double.doubleToLongBits( - other.getGt())) return false; - break; - case 5: - if (java.lang.Double.doubleToLongBits(getGte()) - != java.lang.Double.doubleToLongBits( - other.getGte())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getConst())); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (hasFinite()) { - hash = (37 * hash) + FINITE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFinite()); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLt())); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLte())); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getGt())); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getGte())); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.DoubleRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.DoubleRules 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.DoubleRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.DoubleRules 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.DoubleRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.DoubleRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.DoubleRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.DoubleRules 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.DoubleRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.DoubleRules 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.DoubleRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.DoubleRules 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.DoubleRules 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; - } - /** - *
-   * DoubleRules describes the constraints applied to `double` values. These
-   * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.DoubleRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.DoubleRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.DoubleRules) - build.buf.validate.DoubleRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DoubleRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DoubleRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.DoubleRules.class, build.buf.validate.DoubleRules.Builder.class); - } - - // Construct using build.buf.validate.DoubleRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0D; - in_ = emptyDoubleList(); - notIn_ = emptyDoubleList(); - finite_ = false; - example_ = emptyDoubleList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DoubleRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.DoubleRules getDefaultInstanceForType() { - return build.buf.validate.DoubleRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.DoubleRules build() { - build.buf.validate.DoubleRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.DoubleRules buildPartial() { - build.buf.validate.DoubleRules result = new build.buf.validate.DoubleRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.DoubleRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.finite_ = finite_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.DoubleRules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.DoubleRules) { - return mergeFrom((build.buf.validate.DoubleRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.DoubleRules other) { - if (other == build.buf.validate.DoubleRules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (other.hasFinite()) { - setFinite(other.getFinite()); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000100; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 9: { - const_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - case 17: { - lessThan_ = input.readDouble(); - lessThanCase_ = 2; - break; - } // case 17 - case 25: { - lessThan_ = input.readDouble(); - lessThanCase_ = 3; - break; - } // case 25 - case 33: { - greaterThan_ = input.readDouble(); - greaterThanCase_ = 4; - break; - } // case 33 - case 41: { - greaterThan_ = input.readDouble(); - greaterThanCase_ = 5; - break; - } // case 41 - case 49: { - double v = input.readDouble(); - ensureInIsMutable(); - in_.addDouble(v); - break; - } // case 49 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureInIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - in_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } // case 50 - case 57: { - double v = input.readDouble(); - ensureNotInIsMutable(); - notIn_.addDouble(v); - break; - } // case 57 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureNotInIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - notIn_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - finite_ = input.readBool(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 73: { - double v = input.readDouble(); - ensureExampleIsMutable(); - example_.addDouble(v); - break; - } // case 73 - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - example_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } // case 74 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private double const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must equal 42.0
-     * double value = 1 [(buf.validate.field).double.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must equal 42.0
-     * double value = 1 [(buf.validate.field).double.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public double getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must equal 42.0
-     * double value = 1 [(buf.validate.field).double.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(double value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must equal 42.0
-     * double value = 1 [(buf.validate.field).double.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0D; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than 10.0
-     * double value = 1 [(buf.validate.field).double.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than 10.0
-     * double value = 1 [(buf.validate.field).double.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public double getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Double) lessThan_; - } - return 0D; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than 10.0
-     * double value = 1 [(buf.validate.field).double.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(double value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than 10.0
-     * double value = 1 [(buf.validate.field).double.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified value
-     * (field <= value). If the field value is greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than or equal to 10.0
-     * double value = 1 [(buf.validate.field).double.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified value
-     * (field <= value). If the field value is greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than or equal to 10.0
-     * double value = 1 [(buf.validate.field).double.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public double getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Double) lessThan_; - } - return 0D; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified value
-     * (field <= value). If the field value is greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than or equal to 10.0
-     * double value = 1 [(buf.validate.field).double.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(double value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified value
-     * (field <= value). If the field value is greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be less than or equal to 10.0
-     * double value = 1 [(buf.validate.field).double.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-     * the range is reversed, and the field value must be outside the specified
-     * range. If the field value doesn't meet the required conditions, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than 5.0 [double.gt]
-     * double value = 1 [(buf.validate.field).double.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-     * the range is reversed, and the field value must be outside the specified
-     * range. If the field value doesn't meet the required conditions, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than 5.0 [double.gt]
-     * double value = 1 [(buf.validate.field).double.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public double getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Double) greaterThan_; - } - return 0D; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-     * the range is reversed, and the field value must be outside the specified
-     * range. If the field value doesn't meet the required conditions, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than 5.0 [double.gt]
-     * double value = 1 [(buf.validate.field).double.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(double value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-     * the range is reversed, and the field value must be outside the specified
-     * range. If the field value doesn't meet the required conditions, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than 5.0 [double.gt]
-     * double value = 1 [(buf.validate.field).double.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than or equal to 5.0 [double.gte]
-     * double value = 1 [(buf.validate.field).double.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than or equal to 5.0 [double.gte]
-     * double value = 1 [(buf.validate.field).double.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public double getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Double) greaterThan_; - } - return 0D; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than or equal to 5.0 [double.gte]
-     * double value = 1 [(buf.validate.field).double.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(double value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be greater than or equal to 5.0 [double.gte]
-     * double value = 1 [(buf.validate.field).double.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-     * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-     * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.DoubleList in_ = emptyDoubleList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - private void ensureInIsMutable(int capacity) { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_, capacity); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public double getIn(int index) { - return in_.getDouble(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, double value) { - - ensureInIsMutable(); - in_.setDouble(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(double value) { - - ensureInIsMutable(); - in_.addDouble(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.DoubleList notIn_ = emptyDoubleList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - private void ensureNotInIsMutable(int capacity) { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_, capacity); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public double getNotIn(int index) { - return notIn_.getDouble(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, double value) { - - ensureNotInIsMutable(); - notIn_.setDouble(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(double value) { - - ensureNotInIsMutable(); - notIn_.addDouble(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyDouble {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private boolean finite_ ; - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return Whether the finite field is set. - */ - @java.lang.Override - public boolean hasFinite() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return The finite. - */ - @java.lang.Override - public boolean getFinite() { - return finite_; - } - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @param value The finite to set. - * @return This builder for chaining. - */ - public Builder setFinite(boolean value) { - - finite_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearFinite() { - bitField0_ = (bitField0_ & ~0x00000080); - finite_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.DoubleList example_ = emptyDoubleList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000100; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000100; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public double getExample(int index) { - return example_.getDouble(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, double value) { - - ensureExampleIsMutable(); - example_.setDouble(index, value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(double value) { - - ensureExampleIsMutable(); - example_.addDouble(value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDouble {
-     * double value = 1 [
-     * (buf.validate.field).double.example = 1.0,
-     * (buf.validate.field).double.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.DoubleRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.DoubleRules) - private static final build.buf.validate.DoubleRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.DoubleRules(); - } - - public static build.buf.validate.DoubleRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleRules 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.DoubleRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java b/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java deleted file mode 100644 index 9ba65899..00000000 --- a/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java +++ /dev/null @@ -1,426 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface DoubleRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.DoubleRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must equal 42.0
-   * double value = 1 [(buf.validate.field).double.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must equal 42.0
-   * double value = 1 [(buf.validate.field).double.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional double const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - double getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than 10.0
-   * double value = 1 [(buf.validate.field).double.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than 10.0
-   * double value = 1 [(buf.validate.field).double.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * double lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - double getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified value
-   * (field <= value). If the field value is greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than or equal to 10.0
-   * double value = 1 [(buf.validate.field).double.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified value
-   * (field <= value). If the field value is greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be less than or equal to 10.0
-   * double value = 1 [(buf.validate.field).double.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * double lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - double getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-   * the range is reversed, and the field value must be outside the specified
-   * range. If the field value doesn't meet the required conditions, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than 5.0 [double.gt]
-   * double value = 1 [(buf.validate.field).double.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
-   * the range is reversed, and the field value must be outside the specified
-   * range. If the field value doesn't meet the required conditions, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than 5.0 [double.gt]
-   * double value = 1 [(buf.validate.field).double.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [double.gt_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - double getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than or equal to 5.0 [double.gte]
-   * double value = 1 [(buf.validate.field).double.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be greater than or equal to 5.0 [double.gte]
-   * double value = 1 [(buf.validate.field).double.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
-   * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
-   * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * double gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - double getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - double getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyDouble {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated double not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - double getNotIn(int index); - - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return Whether the finite field is set. - */ - boolean hasFinite(); - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return The finite. - */ - boolean getFinite(); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDouble {
-   * double value = 1 [
-   * (buf.validate.field).double.example = 1.0,
-   * (buf.validate.field).double.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDouble {
-   * double value = 1 [
-   * (buf.validate.field).double.example = 1.0,
-   * (buf.validate.field).double.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDouble {
-   * double value = 1 [
-   * (buf.validate.field).double.example = 1.0,
-   * (buf.validate.field).double.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated double example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - double getExample(int index); - - build.buf.validate.DoubleRules.LessThanCase getLessThanCase(); - - build.buf.validate.DoubleRules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/DurationRules.java b/src/main/java/build/buf/validate/DurationRules.java deleted file mode 100644 index e4fe56c9..00000000 --- a/src/main/java/build/buf/validate/DurationRules.java +++ /dev/null @@ -1,4557 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
- * 
- * - * Protobuf type {@code buf.validate.DurationRules} - */ -public final class DurationRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - DurationRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.DurationRules) - DurationRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - DurationRules.class.getName()); - } - // Use DurationRules.newBuilder() to construct. - private DurationRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private DurationRules() { - in_ = java.util.Collections.emptyList(); - notIn_ = java.util.Collections.emptyList(); - example_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.DurationRules.class, build.buf.validate.DurationRules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(3), - LTE(4), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 3: return LT; - case 4: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(5), - GTE(6), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 5: return GT; - case 6: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 2; - private com.google.protobuf.Duration const_; - /** - *
-   * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-   * If the field's value deviates from the specified value, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must equal 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-   * If the field's value deviates from the specified value, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must equal 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public com.google.protobuf.Duration getConst() { - return const_ == null ? com.google.protobuf.Duration.getDefaultInstance() : const_; - } - /** - *
-   * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-   * If the field's value deviates from the specified value, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must equal 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getConstOrBuilder() { - return const_ == null ? com.google.protobuf.Duration.getDefaultInstance() : const_; - } - - public static final int LT_FIELD_NUMBER = 3; - /** - *
-   * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-   * exclusive. If the field's value is greater than or equal to the specified
-   * value, an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 3; - } - /** - *
-   * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-   * exclusive. If the field's value is greater than or equal to the specified
-   * value, an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public com.google.protobuf.Duration getLt() { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - /** - *
-   * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-   * exclusive. If the field's value is greater than or equal to the specified
-   * value, an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getLtOrBuilder() { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public static final int LTE_FIELD_NUMBER = 4; - /** - *
-   * `lte` indicates that the field must be less than or equal to the specified
-   * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than or equal to 10s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 4; - } - /** - *
-   * `lte` indicates that the field must be less than or equal to the specified
-   * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than or equal to 10s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public com.google.protobuf.Duration getLte() { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - /** - *
-   * `lte` indicates that the field must be less than or equal to the specified
-   * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than or equal to 10s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getLteOrBuilder() { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public static final int GT_FIELD_NUMBER = 5; - /** - *
-   * `gt` requires the duration field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than 5s [duration.gt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-   *
-   * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gt` requires the duration field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than 5s [duration.gt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-   *
-   * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public com.google.protobuf.Duration getGt() { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - /** - *
-   * `gt` requires the duration field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than 5s [duration.gt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-   *
-   * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getGtOrBuilder() { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public static final int GTE_FIELD_NUMBER = 6; - /** - *
-   * `gte` requires the duration field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value must
-   * be outside the specified range. If the field value doesn't meet the
-   * required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than or equal to 5s [duration.gte]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-   *
-   * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 6; - } - /** - *
-   * `gte` requires the duration field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value must
-   * be outside the specified range. If the field value doesn't meet the
-   * required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than or equal to 5s [duration.gte]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-   *
-   * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public com.google.protobuf.Duration getGte() { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - /** - *
-   * `gte` requires the duration field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value must
-   * be outside the specified range. If the field value doesn't meet the
-   * required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than or equal to 5s [duration.gte]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-   *
-   * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getGteOrBuilder() { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public static final int IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private java.util.List in_; - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List getInList() { - return in_; - } - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List - getInOrBuilderList() { - return in_; - } - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Duration getIn(int index) { - return in_.get(index); - } - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getInOrBuilder( - int index) { - return in_.get(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private java.util.List notIn_; - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List - getNotInOrBuilderList() { - return notIn_; - } - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Duration getNotIn(int index) { - return notIn_.get(index); - } - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getNotInOrBuilder( - int index) { - return notIn_.get(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private java.util.List example_; - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List - getExampleOrBuilderList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Duration getExample(int index) { - return example_.get(index); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getExampleOrBuilder( - int index) { - return example_.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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getConst()); - } - if (lessThanCase_ == 3) { - output.writeMessage(3, (com.google.protobuf.Duration) lessThan_); - } - if (lessThanCase_ == 4) { - output.writeMessage(4, (com.google.protobuf.Duration) lessThan_); - } - if (greaterThanCase_ == 5) { - output.writeMessage(5, (com.google.protobuf.Duration) greaterThan_); - } - if (greaterThanCase_ == 6) { - output.writeMessage(6, (com.google.protobuf.Duration) greaterThan_); - } - for (int i = 0; i < in_.size(); i++) { - output.writeMessage(7, in_.get(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeMessage(8, notIn_.get(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeMessage(9, example_.get(i)); - } - extensionWriter.writeUntil(536870912, output); - 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(2, getConst()); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.protobuf.Duration) lessThan_); - } - if (lessThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.protobuf.Duration) lessThan_); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.protobuf.Duration) greaterThan_); - } - if (greaterThanCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.protobuf.Duration) greaterThan_); - } - for (int i = 0; i < in_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, in_.get(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, notIn_.get(i)); - } - for (int i = 0; i < example_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, example_.get(i)); - } - size += extensionsSerializedSize(); - 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.DurationRules)) { - return super.equals(obj); - } - build.buf.validate.DurationRules other = (build.buf.validate.DurationRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (!getConst() - .equals(other.getConst())) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 3: - if (!getLt() - .equals(other.getLt())) return false; - break; - case 4: - if (!getLte() - .equals(other.getLte())) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 5: - if (!getGt() - .equals(other.getGt())) return false; - break; - case 6: - if (!getGte() - .equals(other.getGte())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst().hashCode(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 3: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt().hashCode(); - break; - case 4: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte().hashCode(); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 5: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt().hashCode(); - break; - case 6: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte().hashCode(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.DurationRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.DurationRules 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.DurationRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.DurationRules 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.DurationRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.DurationRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.DurationRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.DurationRules 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.DurationRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.DurationRules 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.DurationRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.DurationRules 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.DurationRules 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; - } - /** - *
-   * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
-   * 
- * - * Protobuf type {@code buf.validate.DurationRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.DurationRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.DurationRules) - build.buf.validate.DurationRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.DurationRules.class, build.buf.validate.DurationRules.Builder.class); - } - - // Construct using build.buf.validate.DurationRules.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getConstFieldBuilder(); - getInFieldBuilder(); - getNotInFieldBuilder(); - getExampleFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = null; - if (constBuilder_ != null) { - constBuilder_.dispose(); - constBuilder_ = null; - } - if (ltBuilder_ != null) { - ltBuilder_.clear(); - } - if (lteBuilder_ != null) { - lteBuilder_.clear(); - } - if (gtBuilder_ != null) { - gtBuilder_.clear(); - } - if (gteBuilder_ != null) { - gteBuilder_.clear(); - } - if (inBuilder_ == null) { - in_ = java.util.Collections.emptyList(); - } else { - in_ = null; - inBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - if (notInBuilder_ == null) { - notIn_ = java.util.Collections.emptyList(); - } else { - notIn_ = null; - notInBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (exampleBuilder_ == null) { - example_ = java.util.Collections.emptyList(); - } else { - example_ = null; - exampleBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.DurationRules getDefaultInstanceForType() { - return build.buf.validate.DurationRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.DurationRules build() { - build.buf.validate.DurationRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.DurationRules buildPartial() { - build.buf.validate.DurationRules result = new build.buf.validate.DurationRules(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.DurationRules result) { - if (inBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - in_ = java.util.Collections.unmodifiableList(in_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.in_ = in_; - } else { - result.in_ = inBuilder_.build(); - } - if (notInBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - notIn_ = java.util.Collections.unmodifiableList(notIn_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.notIn_ = notIn_; - } else { - result.notIn_ = notInBuilder_.build(); - } - if (exampleBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - example_ = java.util.Collections.unmodifiableList(example_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.example_ = example_; - } else { - result.example_ = exampleBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.DurationRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = constBuilder_ == null - ? const_ - : constBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.DurationRules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - if (lessThanCase_ == 3 && - ltBuilder_ != null) { - result.lessThan_ = ltBuilder_.build(); - } - if (lessThanCase_ == 4 && - lteBuilder_ != null) { - result.lessThan_ = lteBuilder_.build(); - } - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - if (greaterThanCase_ == 5 && - gtBuilder_ != null) { - result.greaterThan_ = gtBuilder_.build(); - } - if (greaterThanCase_ == 6 && - gteBuilder_ != null) { - result.greaterThan_ = gteBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.DurationRules) { - return mergeFrom((build.buf.validate.DurationRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.DurationRules other) { - if (other == build.buf.validate.DurationRules.getDefaultInstance()) return this; - if (other.hasConst()) { - mergeConst(other.getConst()); - } - if (inBuilder_ == null) { - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - } else { - if (!other.in_.isEmpty()) { - if (inBuilder_.isEmpty()) { - inBuilder_.dispose(); - inBuilder_ = null; - in_ = other.in_; - bitField0_ = (bitField0_ & ~0x00000020); - inBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getInFieldBuilder() : null; - } else { - inBuilder_.addAllMessages(other.in_); - } - } - } - if (notInBuilder_ == null) { - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - } else { - if (!other.notIn_.isEmpty()) { - if (notInBuilder_.isEmpty()) { - notInBuilder_.dispose(); - notInBuilder_ = null; - notIn_ = other.notIn_; - bitField0_ = (bitField0_ & ~0x00000040); - notInBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getNotInFieldBuilder() : null; - } else { - notInBuilder_.addAllMessages(other.notIn_); - } - } - } - if (exampleBuilder_ == null) { - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - } else { - if (!other.example_.isEmpty()) { - if (exampleBuilder_.isEmpty()) { - exampleBuilder_.dispose(); - exampleBuilder_ = null; - example_ = other.example_; - bitField0_ = (bitField0_ & ~0x00000080); - exampleBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getExampleFieldBuilder() : null; - } else { - exampleBuilder_.addAllMessages(other.example_); - } - } - } - switch (other.getLessThanCase()) { - case LT: { - mergeLt(other.getLt()); - break; - } - case LTE: { - mergeLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - mergeGt(other.getGt()); - break; - } - case GTE: { - mergeGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 18: { - input.readMessage( - getConstFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 18 - case 26: { - input.readMessage( - getLtFieldBuilder().getBuilder(), - extensionRegistry); - lessThanCase_ = 3; - break; - } // case 26 - case 34: { - input.readMessage( - getLteFieldBuilder().getBuilder(), - extensionRegistry); - lessThanCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getGtFieldBuilder().getBuilder(), - extensionRegistry); - greaterThanCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getGteFieldBuilder().getBuilder(), - extensionRegistry); - greaterThanCase_ = 6; - break; - } // case 50 - case 58: { - com.google.protobuf.Duration m = - input.readMessage( - com.google.protobuf.Duration.parser(), - extensionRegistry); - if (inBuilder_ == null) { - ensureInIsMutable(); - in_.add(m); - } else { - inBuilder_.addMessage(m); - } - break; - } // case 58 - case 66: { - com.google.protobuf.Duration m = - input.readMessage( - com.google.protobuf.Duration.parser(), - extensionRegistry); - if (notInBuilder_ == null) { - ensureNotInIsMutable(); - notIn_.add(m); - } else { - notInBuilder_.addMessage(m); - } - break; - } // case 66 - case 74: { - com.google.protobuf.Duration m = - input.readMessage( - com.google.protobuf.Duration.parser(), - extensionRegistry); - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.add(m); - } else { - exampleBuilder_.addMessage(m); - } - break; - } // case 74 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.Duration const_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> constBuilder_; - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - public com.google.protobuf.Duration getConst() { - if (constBuilder_ == null) { - return const_ == null ? com.google.protobuf.Duration.getDefaultInstance() : const_; - } else { - return constBuilder_.getMessage(); - } - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder setConst(com.google.protobuf.Duration value) { - if (constBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - const_ = value; - } else { - constBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder setConst( - com.google.protobuf.Duration.Builder builderForValue) { - if (constBuilder_ == null) { - const_ = builderForValue.build(); - } else { - constBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder mergeConst(com.google.protobuf.Duration value) { - if (constBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - const_ != null && - const_ != com.google.protobuf.Duration.getDefaultInstance()) { - getConstBuilder().mergeFrom(value); - } else { - const_ = value; - } - } else { - constBuilder_.mergeFrom(value); - } - if (const_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = null; - if (constBuilder_ != null) { - constBuilder_.dispose(); - constBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getConstBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConstFieldBuilder().getBuilder(); - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getConstOrBuilder() { - if (constBuilder_ != null) { - return constBuilder_.getMessageOrBuilder(); - } else { - return const_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : const_; - } - } - /** - *
-     * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-     * If the field's value deviates from the specified value, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must equal 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getConstFieldBuilder() { - if (constBuilder_ == null) { - constBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getConst(), - getParentForChildren(), - isClean()); - const_ = null; - } - return constBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ltBuilder_; - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 3; - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public com.google.protobuf.Duration getLt() { - if (ltBuilder_ == null) { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (lessThanCase_ == 3) { - return ltBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder setLt(com.google.protobuf.Duration value) { - if (ltBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lessThan_ = value; - onChanged(); - } else { - ltBuilder_.setMessage(value); - } - lessThanCase_ = 3; - return this; - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder setLt( - com.google.protobuf.Duration.Builder builderForValue) { - if (ltBuilder_ == null) { - lessThan_ = builderForValue.build(); - onChanged(); - } else { - ltBuilder_.setMessage(builderForValue.build()); - } - lessThanCase_ = 3; - return this; - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder mergeLt(com.google.protobuf.Duration value) { - if (ltBuilder_ == null) { - if (lessThanCase_ == 3 && - lessThan_ != com.google.protobuf.Duration.getDefaultInstance()) { - lessThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) lessThan_) - .mergeFrom(value).buildPartial(); - } else { - lessThan_ = value; - } - onChanged(); - } else { - if (lessThanCase_ == 3) { - ltBuilder_.mergeFrom(value); - } else { - ltBuilder_.setMessage(value); - } - } - lessThanCase_ = 3; - return this; - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder clearLt() { - if (ltBuilder_ == null) { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - } else { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - } - ltBuilder_.clear(); - } - return this; - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getLtBuilder() { - return getLtFieldBuilder().getBuilder(); - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getLtOrBuilder() { - if ((lessThanCase_ == 3) && (ltBuilder_ != null)) { - return ltBuilder_.getMessageOrBuilder(); - } else { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-     * exclusive. If the field's value is greater than or equal to the specified
-     * value, an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than 5s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getLtFieldBuilder() { - if (ltBuilder_ == null) { - if (!(lessThanCase_ == 3)) { - lessThan_ = com.google.protobuf.Duration.getDefaultInstance(); - } - ltBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) lessThan_, - getParentForChildren(), - isClean()); - lessThan_ = null; - } - lessThanCase_ = 3; - onChanged(); - return ltBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> lteBuilder_; - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 4; - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public com.google.protobuf.Duration getLte() { - if (lteBuilder_ == null) { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (lessThanCase_ == 4) { - return lteBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder setLte(com.google.protobuf.Duration value) { - if (lteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lessThan_ = value; - onChanged(); - } else { - lteBuilder_.setMessage(value); - } - lessThanCase_ = 4; - return this; - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder setLte( - com.google.protobuf.Duration.Builder builderForValue) { - if (lteBuilder_ == null) { - lessThan_ = builderForValue.build(); - onChanged(); - } else { - lteBuilder_.setMessage(builderForValue.build()); - } - lessThanCase_ = 4; - return this; - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder mergeLte(com.google.protobuf.Duration value) { - if (lteBuilder_ == null) { - if (lessThanCase_ == 4 && - lessThan_ != com.google.protobuf.Duration.getDefaultInstance()) { - lessThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) lessThan_) - .mergeFrom(value).buildPartial(); - } else { - lessThan_ = value; - } - onChanged(); - } else { - if (lessThanCase_ == 4) { - lteBuilder_.mergeFrom(value); - } else { - lteBuilder_.setMessage(value); - } - } - lessThanCase_ = 4; - return this; - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder clearLte() { - if (lteBuilder_ == null) { - if (lessThanCase_ == 4) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - } else { - if (lessThanCase_ == 4) { - lessThanCase_ = 0; - lessThan_ = null; - } - lteBuilder_.clear(); - } - return this; - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getLteBuilder() { - return getLteFieldBuilder().getBuilder(); - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getLteOrBuilder() { - if ((lessThanCase_ == 4) && (lteBuilder_ != null)) { - return lteBuilder_.getMessageOrBuilder(); - } else { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Duration) lessThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `lte` indicates that the field must be less than or equal to the specified
-     * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be less than or equal to 10s
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getLteFieldBuilder() { - if (lteBuilder_ == null) { - if (!(lessThanCase_ == 4)) { - lessThan_ = com.google.protobuf.Duration.getDefaultInstance(); - } - lteBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) lessThan_, - getParentForChildren(), - isClean()); - lessThan_ = null; - } - lessThanCase_ = 4; - onChanged(); - return lteBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> gtBuilder_; - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public com.google.protobuf.Duration getGt() { - if (gtBuilder_ == null) { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (greaterThanCase_ == 5) { - return gtBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder setGt(com.google.protobuf.Duration value) { - if (gtBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - greaterThan_ = value; - onChanged(); - } else { - gtBuilder_.setMessage(value); - } - greaterThanCase_ = 5; - return this; - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder setGt( - com.google.protobuf.Duration.Builder builderForValue) { - if (gtBuilder_ == null) { - greaterThan_ = builderForValue.build(); - onChanged(); - } else { - gtBuilder_.setMessage(builderForValue.build()); - } - greaterThanCase_ = 5; - return this; - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder mergeGt(com.google.protobuf.Duration value) { - if (gtBuilder_ == null) { - if (greaterThanCase_ == 5 && - greaterThan_ != com.google.protobuf.Duration.getDefaultInstance()) { - greaterThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) greaterThan_) - .mergeFrom(value).buildPartial(); - } else { - greaterThan_ = value; - } - onChanged(); - } else { - if (greaterThanCase_ == 5) { - gtBuilder_.mergeFrom(value); - } else { - gtBuilder_.setMessage(value); - } - } - greaterThanCase_ = 5; - return this; - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder clearGt() { - if (gtBuilder_ == null) { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - } else { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - } - gtBuilder_.clear(); - } - return this; - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getGtBuilder() { - return getGtFieldBuilder().getBuilder(); - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getGtOrBuilder() { - if ((greaterThanCase_ == 5) && (gtBuilder_ != null)) { - return gtBuilder_.getMessageOrBuilder(); - } else { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `gt` requires the duration field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than 5s [duration.gt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-     *
-     * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getGtFieldBuilder() { - if (gtBuilder_ == null) { - if (!(greaterThanCase_ == 5)) { - greaterThan_ = com.google.protobuf.Duration.getDefaultInstance(); - } - gtBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) greaterThan_, - getParentForChildren(), - isClean()); - greaterThan_ = null; - } - greaterThanCase_ = 5; - onChanged(); - return gtBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> gteBuilder_; - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 6; - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public com.google.protobuf.Duration getGte() { - if (gteBuilder_ == null) { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (greaterThanCase_ == 6) { - return gteBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder setGte(com.google.protobuf.Duration value) { - if (gteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - greaterThan_ = value; - onChanged(); - } else { - gteBuilder_.setMessage(value); - } - greaterThanCase_ = 6; - return this; - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder setGte( - com.google.protobuf.Duration.Builder builderForValue) { - if (gteBuilder_ == null) { - greaterThan_ = builderForValue.build(); - onChanged(); - } else { - gteBuilder_.setMessage(builderForValue.build()); - } - greaterThanCase_ = 6; - return this; - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder mergeGte(com.google.protobuf.Duration value) { - if (gteBuilder_ == null) { - if (greaterThanCase_ == 6 && - greaterThan_ != com.google.protobuf.Duration.getDefaultInstance()) { - greaterThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) greaterThan_) - .mergeFrom(value).buildPartial(); - } else { - greaterThan_ = value; - } - onChanged(); - } else { - if (greaterThanCase_ == 6) { - gteBuilder_.mergeFrom(value); - } else { - gteBuilder_.setMessage(value); - } - } - greaterThanCase_ = 6; - return this; - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder clearGte() { - if (gteBuilder_ == null) { - if (greaterThanCase_ == 6) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - } else { - if (greaterThanCase_ == 6) { - greaterThanCase_ = 0; - greaterThan_ = null; - } - gteBuilder_.clear(); - } - return this; - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getGteBuilder() { - return getGteFieldBuilder().getBuilder(); - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getGteOrBuilder() { - if ((greaterThanCase_ == 6) && (gteBuilder_ != null)) { - return gteBuilder_.getMessageOrBuilder(); - } else { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Duration) greaterThan_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * `gte` requires the duration field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value must
-     * be outside the specified range. If the field value doesn't meet the
-     * required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be greater than or equal to 5s [duration.gte]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-     *
-     * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-     * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-     *
-     * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-     * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getGteFieldBuilder() { - if (gteBuilder_ == null) { - if (!(greaterThanCase_ == 6)) { - greaterThan_ = com.google.protobuf.Duration.getDefaultInstance(); - } - gteBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) greaterThan_, - getParentForChildren(), - isClean()); - greaterThan_ = null; - } - greaterThanCase_ = 6; - onChanged(); - return gteBuilder_; - } - - private java.util.List in_ = - java.util.Collections.emptyList(); - private void ensureInIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - in_ = new java.util.ArrayList(in_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> inBuilder_; - - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public java.util.List getInList() { - if (inBuilder_ == null) { - return java.util.Collections.unmodifiableList(in_); - } else { - return inBuilder_.getMessageList(); - } - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public int getInCount() { - if (inBuilder_ == null) { - return in_.size(); - } else { - return inBuilder_.getCount(); - } - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration getIn(int index) { - if (inBuilder_ == null) { - return in_.get(index); - } else { - return inBuilder_.getMessage(index); - } - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder setIn( - int index, com.google.protobuf.Duration value) { - if (inBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInIsMutable(); - in_.set(index, value); - onChanged(); - } else { - inBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder setIn( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (inBuilder_ == null) { - ensureInIsMutable(); - in_.set(index, builderForValue.build()); - onChanged(); - } else { - inBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder addIn(com.google.protobuf.Duration value) { - if (inBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInIsMutable(); - in_.add(value); - onChanged(); - } else { - inBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder addIn( - int index, com.google.protobuf.Duration value) { - if (inBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInIsMutable(); - in_.add(index, value); - onChanged(); - } else { - inBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder addIn( - com.google.protobuf.Duration.Builder builderForValue) { - if (inBuilder_ == null) { - ensureInIsMutable(); - in_.add(builderForValue.build()); - onChanged(); - } else { - inBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder addIn( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (inBuilder_ == null) { - ensureInIsMutable(); - in_.add(index, builderForValue.build()); - onChanged(); - } else { - inBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder addAllIn( - java.lang.Iterable values) { - if (inBuilder_ == null) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - onChanged(); - } else { - inBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder clearIn() { - if (inBuilder_ == null) { - in_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - inBuilder_.clear(); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public Builder removeIn(int index) { - if (inBuilder_ == null) { - ensureInIsMutable(); - in_.remove(index); - onChanged(); - } else { - inBuilder_.remove(index); - } - return this; - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getInBuilder( - int index) { - return getInFieldBuilder().getBuilder(index); - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getInOrBuilder( - int index) { - if (inBuilder_ == null) { - return in_.get(index); } else { - return inBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getInOrBuilderList() { - if (inBuilder_ != null) { - return inBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(in_); - } - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder addInBuilder() { - return getInFieldBuilder().addBuilder( - com.google.protobuf.Duration.getDefaultInstance()); - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder addInBuilder( - int index) { - return getInFieldBuilder().addBuilder( - index, com.google.protobuf.Duration.getDefaultInstance()); - } - /** - *
-     * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value doesn't correspond to any of the specified values,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getInBuilderList() { - return getInFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getInFieldBuilder() { - if (inBuilder_ == null) { - inBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - in_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - in_ = null; - } - return inBuilder_; - } - - private java.util.List notIn_ = - java.util.Collections.emptyList(); - private void ensureNotInIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - notIn_ = new java.util.ArrayList(notIn_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> notInBuilder_; - - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public java.util.List getNotInList() { - if (notInBuilder_ == null) { - return java.util.Collections.unmodifiableList(notIn_); - } else { - return notInBuilder_.getMessageList(); - } - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public int getNotInCount() { - if (notInBuilder_ == null) { - return notIn_.size(); - } else { - return notInBuilder_.getCount(); - } - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration getNotIn(int index) { - if (notInBuilder_ == null) { - return notIn_.get(index); - } else { - return notInBuilder_.getMessage(index); - } - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder setNotIn( - int index, com.google.protobuf.Duration value) { - if (notInBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotInIsMutable(); - notIn_.set(index, value); - onChanged(); - } else { - notInBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder setNotIn( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (notInBuilder_ == null) { - ensureNotInIsMutable(); - notIn_.set(index, builderForValue.build()); - onChanged(); - } else { - notInBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder addNotIn(com.google.protobuf.Duration value) { - if (notInBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotInIsMutable(); - notIn_.add(value); - onChanged(); - } else { - notInBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder addNotIn( - int index, com.google.protobuf.Duration value) { - if (notInBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotInIsMutable(); - notIn_.add(index, value); - onChanged(); - } else { - notInBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder addNotIn( - com.google.protobuf.Duration.Builder builderForValue) { - if (notInBuilder_ == null) { - ensureNotInIsMutable(); - notIn_.add(builderForValue.build()); - onChanged(); - } else { - notInBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder addNotIn( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (notInBuilder_ == null) { - ensureNotInIsMutable(); - notIn_.add(index, builderForValue.build()); - onChanged(); - } else { - notInBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - if (notInBuilder_ == null) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - onChanged(); - } else { - notInBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder clearNotIn() { - if (notInBuilder_ == null) { - notIn_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - notInBuilder_.clear(); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public Builder removeNotIn(int index) { - if (notInBuilder_ == null) { - ensureNotInIsMutable(); - notIn_.remove(index); - onChanged(); - } else { - notInBuilder_.remove(index); - } - return this; - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getNotInBuilder( - int index) { - return getNotInFieldBuilder().getBuilder(index); - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getNotInOrBuilder( - int index) { - if (notInBuilder_ == null) { - return notIn_.get(index); } else { - return notInBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getNotInOrBuilderList() { - if (notInBuilder_ != null) { - return notInBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notIn_); - } - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder addNotInBuilder() { - return getNotInFieldBuilder().addBuilder( - com.google.protobuf.Duration.getDefaultInstance()); - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder addNotInBuilder( - int index) { - return getNotInFieldBuilder().addBuilder( - index, com.google.protobuf.Duration.getDefaultInstance()); - } - /** - *
-     * `not_in` denotes that the field must not be equal to
-     * any of the specified values of the `google.protobuf.Duration` type.
-     * If the field's value matches any of these values, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // value must not be in list [1s, 2s, 3s]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getNotInBuilderList() { - return getNotInFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getNotInFieldBuilder() { - if (notInBuilder_ == null) { - notInBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - notIn_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - notIn_ = null; - } - return notInBuilder_; - } - - private java.util.List example_ = - java.util.Collections.emptyList(); - private void ensureExampleIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - example_ = new java.util.ArrayList(example_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> exampleBuilder_; - - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public java.util.List getExampleList() { - if (exampleBuilder_ == null) { - return java.util.Collections.unmodifiableList(example_); - } else { - return exampleBuilder_.getMessageList(); - } - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public int getExampleCount() { - if (exampleBuilder_ == null) { - return example_.size(); - } else { - return exampleBuilder_.getCount(); - } - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration getExample(int index) { - if (exampleBuilder_ == null) { - return example_.get(index); - } else { - return exampleBuilder_.getMessage(index); - } - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder setExample( - int index, com.google.protobuf.Duration value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExampleIsMutable(); - example_.set(index, value); - onChanged(); - } else { - exampleBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder setExample( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.set(index, builderForValue.build()); - onChanged(); - } else { - exampleBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample(com.google.protobuf.Duration value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExampleIsMutable(); - example_.add(value); - onChanged(); - } else { - exampleBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample( - int index, com.google.protobuf.Duration value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExampleIsMutable(); - example_.add(index, value); - onChanged(); - } else { - exampleBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample( - com.google.protobuf.Duration.Builder builderForValue) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.add(builderForValue.build()); - onChanged(); - } else { - exampleBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample( - int index, com.google.protobuf.Duration.Builder builderForValue) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.add(index, builderForValue.build()); - onChanged(); - } else { - exampleBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addAllExample( - java.lang.Iterable values) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - onChanged(); - } else { - exampleBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder clearExample() { - if (exampleBuilder_ == null) { - example_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - exampleBuilder_.clear(); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder removeExample(int index) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.remove(index); - onChanged(); - } else { - exampleBuilder_.remove(index); - } - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getExampleBuilder( - int index) { - return getExampleFieldBuilder().getBuilder(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getExampleOrBuilder( - int index) { - if (exampleBuilder_ == null) { - return example_.get(index); } else { - return exampleBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getExampleOrBuilderList() { - if (exampleBuilder_ != null) { - return exampleBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(example_); - } - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder addExampleBuilder() { - return getExampleFieldBuilder().addBuilder( - com.google.protobuf.Duration.getDefaultInstance()); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder addExampleBuilder( - int index) { - return getExampleFieldBuilder().addBuilder( - index, com.google.protobuf.Duration.getDefaultInstance()); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyDuration {
-     * google.protobuf.Duration value = 1 [
-     * (buf.validate.field).duration.example = { seconds: 1 },
-     * (buf.validate.field).duration.example = { seconds: 2 },
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getExampleBuilderList() { - return getExampleFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getExampleFieldBuilder() { - if (exampleBuilder_ == null) { - exampleBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - example_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - example_ = null; - } - return exampleBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.DurationRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.DurationRules) - private static final build.buf.validate.DurationRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.DurationRules(); - } - - public static build.buf.validate.DurationRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DurationRules 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.DurationRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/DurationRulesOrBuilder.java b/src/main/java/build/buf/validate/DurationRulesOrBuilder.java deleted file mode 100644 index aba0a750..00000000 --- a/src/main/java/build/buf/validate/DurationRulesOrBuilder.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface DurationRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.DurationRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-   * If the field's value deviates from the specified value, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must equal 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-   * If the field's value deviates from the specified value, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must equal 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - com.google.protobuf.Duration getConst(); - /** - *
-   * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
-   * If the field's value deviates from the specified value, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must equal 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getConstOrBuilder(); - - /** - *
-   * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-   * exclusive. If the field's value is greater than or equal to the specified
-   * value, an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-   * exclusive. If the field's value is greater than or equal to the specified
-   * value, an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - com.google.protobuf.Duration getLt(); - /** - *
-   * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
-   * exclusive. If the field's value is greater than or equal to the specified
-   * value, an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than 5s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getLtOrBuilder(); - - /** - *
-   * `lte` indicates that the field must be less than or equal to the specified
-   * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than or equal to 10s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` indicates that the field must be less than or equal to the specified
-   * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than or equal to 10s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - com.google.protobuf.Duration getLte(); - /** - *
-   * `lte` indicates that the field must be less than or equal to the specified
-   * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be less than or equal to 10s
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getLteOrBuilder(); - - /** - *
-   * `gt` requires the duration field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than 5s [duration.gt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-   *
-   * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the duration field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than 5s [duration.gt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-   *
-   * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - com.google.protobuf.Duration getGt(); - /** - *
-   * `gt` requires the duration field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than 5s [duration.gt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
-   *
-   * // duration must be greater than 5s and less than 10s [duration.gt_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getGtOrBuilder(); - - /** - *
-   * `gte` requires the duration field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value must
-   * be outside the specified range. If the field value doesn't meet the
-   * required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than or equal to 5s [duration.gte]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-   *
-   * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the duration field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value must
-   * be outside the specified range. If the field value doesn't meet the
-   * required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than or equal to 5s [duration.gte]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-   *
-   * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - com.google.protobuf.Duration getGte(); - /** - *
-   * `gte` requires the duration field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value must
-   * be outside the specified range. If the field value doesn't meet the
-   * required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be greater than or equal to 5s [duration.gte]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
-   *
-   * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
-   * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
-   *
-   * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
-   * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getGteOrBuilder(); - - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - java.util.List - getInList(); - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.Duration getIn(int index); - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - int getInCount(); - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - java.util.List - getInOrBuilderList(); - /** - *
-   * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value doesn't correspond to any of the specified values,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getInOrBuilder( - int index); - - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - java.util.List - getNotInList(); - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.Duration getNotIn(int index); - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - int getNotInCount(); - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - java.util.List - getNotInOrBuilderList(); - /** - *
-   * `not_in` denotes that the field must not be equal to
-   * any of the specified values of the `google.protobuf.Duration` type.
-   * If the field's value matches any of these values, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // value must not be in list [1s, 2s, 3s]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getNotInOrBuilder( - int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - java.util.List - getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.Duration getExample(int index); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - java.util.List - getExampleOrBuilderList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyDuration {
-   * google.protobuf.Duration value = 1 [
-   * (buf.validate.field).duration.example = { seconds: 1 },
-   * (buf.validate.field).duration.example = { seconds: 2 },
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getExampleOrBuilder( - int index); - - build.buf.validate.DurationRules.LessThanCase getLessThanCase(); - - build.buf.validate.DurationRules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/EnumRules.java b/src/main/java/build/buf/validate/EnumRules.java deleted file mode 100644 index 5e8fb860..00000000 --- a/src/main/java/build/buf/validate/EnumRules.java +++ /dev/null @@ -1,1849 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * EnumRules describe the constraints applied to `enum` values.
- * 
- * - * Protobuf type {@code buf.validate.EnumRules} - */ -public final class EnumRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - EnumRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.EnumRules) - EnumRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - EnumRules.class.getName()); - } - // Use EnumRules.newBuilder() to construct. - private EnumRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private EnumRules() { - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_EnumRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_EnumRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.EnumRules.class, build.buf.validate.EnumRules.Builder.class); - } - - private int bitField0_; - public static final int CONST_FIELD_NUMBER = 1; - private int const_ = 0; - /** - *
-   * `const` requires the field value to exactly match the specified enum value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be exactly MY_ENUM_VALUE1.
-   * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified enum value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be exactly MY_ENUM_VALUE1.
-   * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - - public static final int DEFINED_ONLY_FIELD_NUMBER = 2; - private boolean definedOnly_ = false; - /** - *
-   * `defined_only` requires the field value to be one of the defined values for
-   * this enum, failing on any undefined value.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be a defined value of MyEnum.
-   * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-   * }
-   * ```
-   * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return Whether the definedOnly field is set. - */ - @java.lang.Override - public boolean hasDefinedOnly() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `defined_only` requires the field value to be one of the defined values for
-   * this enum, failing on any undefined value.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be a defined value of MyEnum.
-   * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-   * }
-   * ```
-   * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return The definedOnly. - */ - @java.lang.Override - public boolean getDefinedOnly() { - return definedOnly_; - } - - public static final int IN_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList in_ = - emptyIntList(); - /** - *
-   * `in` requires the field value to be equal to one of the
-   * specified enum values. If the field value doesn't match any of the
-   * specified values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be equal to one of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the
-   * specified enum values. If the field value doesn't match any of the
-   * specified values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be equal to one of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the
-   * specified enum values. If the field value doesn't match any of the
-   * specified values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be equal to one of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList notIn_ = - emptyIntList(); - /** - *
-   * `not_in` requires the field value to be not equal to any of the
-   * specified enum values. If the field value matches one of the specified
-   * values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must not be equal to any of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to be not equal to any of the
-   * specified enum values. If the field value matches one of the specified
-   * values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must not be equal to any of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to be not equal to any of the
-   * specified enum values. If the field value matches one of the specified
-   * values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must not be equal to any of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList example_ = - emptyIntList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * (buf.validate.field).enum.example = 1,
-   * (buf.validate.field).enum.example = 2
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * (buf.validate.field).enum.example = 1,
-   * (buf.validate.field).enum.example = 2
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * (buf.validate.field).enum.example = 1,
-   * (buf.validate.field).enum.example = 2
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, const_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBool(2, definedOnly_); - } - for (int i = 0; i < in_.size(); i++) { - output.writeInt32(3, in_.getInt(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeInt32(4, notIn_.getInt(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeInt32(5, example_.getInt(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeInt32Size(1, const_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, definedOnly_); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(in_.getInt(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(notIn_.getInt(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(example_.getInt(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.EnumRules)) { - return super.equals(obj); - } - build.buf.validate.EnumRules other = (build.buf.validate.EnumRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (hasDefinedOnly() != other.hasDefinedOnly()) return false; - if (hasDefinedOnly()) { - if (getDefinedOnly() - != other.getDefinedOnly()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst(); - } - if (hasDefinedOnly()) { - hash = (37 * hash) + DEFINED_ONLY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDefinedOnly()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.EnumRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.EnumRules 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.EnumRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.EnumRules 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.EnumRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.EnumRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.EnumRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.EnumRules 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.EnumRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.EnumRules 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.EnumRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.EnumRules 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.EnumRules 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; - } - /** - *
-   * EnumRules describe the constraints applied to `enum` values.
-   * 
- * - * Protobuf type {@code buf.validate.EnumRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.EnumRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.EnumRules) - build.buf.validate.EnumRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_EnumRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_EnumRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.EnumRules.class, build.buf.validate.EnumRules.Builder.class); - } - - // Construct using build.buf.validate.EnumRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0; - definedOnly_ = false; - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_EnumRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.EnumRules getDefaultInstanceForType() { - return build.buf.validate.EnumRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.EnumRules build() { - build.buf.validate.EnumRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.EnumRules buildPartial() { - build.buf.validate.EnumRules result = new build.buf.validate.EnumRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.EnumRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.definedOnly_ = definedOnly_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.EnumRules) { - return mergeFrom((build.buf.validate.EnumRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.EnumRules other) { - if (other == build.buf.validate.EnumRules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (other.hasDefinedOnly()) { - setDefinedOnly(other.getDefinedOnly()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000004; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000008; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000010; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - definedOnly_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - int v = input.readInt32(); - ensureInIsMutable(); - in_.addInt(v); - break; - } // case 24 - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 26 - case 32: { - int v = input.readInt32(); - ensureNotInIsMutable(); - notIn_.addInt(v); - break; - } // case 32 - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 34 - case 40: { - int v = input.readInt32(); - ensureExampleIsMutable(); - example_.addInt(v); - break; - } // case 40 - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 42 - 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 int const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified enum value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be exactly MY_ENUM_VALUE1.
-     * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified enum value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be exactly MY_ENUM_VALUE1.
-     * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified enum value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be exactly MY_ENUM_VALUE1.
-     * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(int value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified enum value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be exactly MY_ENUM_VALUE1.
-     * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0; - onChanged(); - return this; - } - - private boolean definedOnly_ ; - /** - *
-     * `defined_only` requires the field value to be one of the defined values for
-     * this enum, failing on any undefined value.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be a defined value of MyEnum.
-     * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-     * }
-     * ```
-     * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return Whether the definedOnly field is set. - */ - @java.lang.Override - public boolean hasDefinedOnly() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `defined_only` requires the field value to be one of the defined values for
-     * this enum, failing on any undefined value.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be a defined value of MyEnum.
-     * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-     * }
-     * ```
-     * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return The definedOnly. - */ - @java.lang.Override - public boolean getDefinedOnly() { - return definedOnly_; - } - /** - *
-     * `defined_only` requires the field value to be one of the defined values for
-     * this enum, failing on any undefined value.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be a defined value of MyEnum.
-     * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-     * }
-     * ```
-     * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @param value The definedOnly to set. - * @return This builder for chaining. - */ - public Builder setDefinedOnly(boolean value) { - - definedOnly_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `defined_only` requires the field value to be one of the defined values for
-     * this enum, failing on any undefined value.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be a defined value of MyEnum.
-     * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-     * }
-     * ```
-     * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return This builder for chaining. - */ - public Builder clearDefinedOnly() { - bitField0_ = (bitField0_ & ~0x00000002); - definedOnly_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList in_ = emptyIntList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000004; - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, int value) { - - ensureInIsMutable(); - in_.setInt(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(int value) { - - ensureInIsMutable(); - in_.addInt(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the
-     * specified enum values. If the field value doesn't match any of the
-     * specified values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must be equal to one of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList notIn_ = emptyIntList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000008; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, int value) { - - ensureNotInIsMutable(); - notIn_.setInt(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(int value) { - - ensureNotInIsMutable(); - notIn_.addInt(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to be not equal to any of the
-     * specified enum values. If the field value matches one of the specified
-     * values, an error message is generated.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * // The field `value` must not be equal to any of the specified values.
-     * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList example_ = emptyIntList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000010; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, int value) { - - ensureExampleIsMutable(); - example_.setInt(index, value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(int value) { - - ensureExampleIsMutable(); - example_.addInt(value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * enum MyEnum {
-     * MY_ENUM_UNSPECIFIED = 0;
-     * MY_ENUM_VALUE1 = 1;
-     * MY_ENUM_VALUE2 = 2;
-     * }
-     *
-     * message MyMessage {
-     * (buf.validate.field).enum.example = 1,
-     * (buf.validate.field).enum.example = 2
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.EnumRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.EnumRules) - private static final build.buf.validate.EnumRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.EnumRules(); - } - - public static build.buf.validate.EnumRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnumRules 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.EnumRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/EnumRulesOrBuilder.java b/src/main/java/build/buf/validate/EnumRulesOrBuilder.java deleted file mode 100644 index 66918979..00000000 --- a/src/main/java/build/buf/validate/EnumRulesOrBuilder.java +++ /dev/null @@ -1,328 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface EnumRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.EnumRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified enum value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be exactly MY_ENUM_VALUE1.
-   * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified enum value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be exactly MY_ENUM_VALUE1.
-   * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - int getConst(); - - /** - *
-   * `defined_only` requires the field value to be one of the defined values for
-   * this enum, failing on any undefined value.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be a defined value of MyEnum.
-   * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-   * }
-   * ```
-   * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return Whether the definedOnly field is set. - */ - boolean hasDefinedOnly(); - /** - *
-   * `defined_only` requires the field value to be one of the defined values for
-   * this enum, failing on any undefined value.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be a defined value of MyEnum.
-   * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
-   * }
-   * ```
-   * 
- * - * optional bool defined_only = 2 [json_name = "definedOnly"]; - * @return The definedOnly. - */ - boolean getDefinedOnly(); - - /** - *
-   * `in` requires the field value to be equal to one of the
-   * specified enum values. If the field value doesn't match any of the
-   * specified values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be equal to one of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the
-   * specified enum values. If the field value doesn't match any of the
-   * specified values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be equal to one of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the
-   * specified enum values. If the field value doesn't match any of the
-   * specified values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must be equal to one of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 3 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - int getIn(int index); - - /** - *
-   * `not_in` requires the field value to be not equal to any of the
-   * specified enum values. If the field value matches one of the specified
-   * values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must not be equal to any of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to be not equal to any of the
-   * specified enum values. If the field value matches one of the specified
-   * values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must not be equal to any of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to be not equal to any of the
-   * specified enum values. If the field value matches one of the specified
-   * values, an error message is generated.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * // The field `value` must not be equal to any of the specified values.
-   * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - int getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * (buf.validate.field).enum.example = 1,
-   * (buf.validate.field).enum.example = 2
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * (buf.validate.field).enum.example = 1,
-   * (buf.validate.field).enum.example = 2
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * enum MyEnum {
-   * MY_ENUM_UNSPECIFIED = 0;
-   * MY_ENUM_VALUE1 = 1;
-   * MY_ENUM_VALUE2 = 2;
-   * }
-   *
-   * message MyMessage {
-   * (buf.validate.field).enum.example = 1,
-   * (buf.validate.field).enum.example = 2
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 5 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - int getExample(int index); -} diff --git a/src/main/java/build/buf/validate/FieldConstraints.java b/src/main/java/build/buf/validate/FieldConstraints.java deleted file mode 100644 index 85833a02..00000000 --- a/src/main/java/build/buf/validate/FieldConstraints.java +++ /dev/null @@ -1,6581 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * FieldConstraints encapsulates the rules for each type of field. Depending on
- * the field, the correct set should be used to ensure proper validations.
- * 
- * - * Protobuf type {@code buf.validate.FieldConstraints} - */ -public final class FieldConstraints extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.FieldConstraints) - FieldConstraintsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FieldConstraints.class.getName()); - } - // Use FieldConstraints.newBuilder() to construct. - private FieldConstraints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FieldConstraints() { - cel_ = java.util.Collections.emptyList(); - ignore_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FieldConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FieldConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.FieldConstraints.class, build.buf.validate.FieldConstraints.Builder.class); - } - - private int bitField0_; - private int typeCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - FLOAT(1), - DOUBLE(2), - INT32(3), - INT64(4), - UINT32(5), - UINT64(6), - SINT32(7), - SINT64(8), - FIXED32(9), - FIXED64(10), - SFIXED32(11), - SFIXED64(12), - BOOL(13), - STRING(14), - BYTES(15), - ENUM(16), - REPEATED(18), - MAP(19), - ANY(20), - DURATION(21), - TIMESTAMP(22), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return FLOAT; - case 2: return DOUBLE; - case 3: return INT32; - case 4: return INT64; - case 5: return UINT32; - case 6: return UINT64; - case 7: return SINT32; - case 8: return SINT64; - case 9: return FIXED32; - case 10: return FIXED64; - case 11: return SFIXED32; - case 12: return SFIXED64; - case 13: return BOOL; - case 14: return STRING; - case 15: return BYTES; - case 16: return ENUM; - case 18: return REPEATED; - case 19: return MAP; - case 20: return ANY; - case 21: return DURATION; - case 22: return TIMESTAMP; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int CEL_FIELD_NUMBER = 23; - @SuppressWarnings("serial") - private java.util.List cel_; - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - @java.lang.Override - public java.util.List getCelList() { - return cel_; - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - @java.lang.Override - public java.util.List - getCelOrBuilderList() { - return cel_; - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - @java.lang.Override - public int getCelCount() { - return cel_.size(); - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - @java.lang.Override - public build.buf.validate.Constraint getCel(int index) { - return cel_.get(index); - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - @java.lang.Override - public build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index) { - return cel_.get(index); - } - - public static final int REQUIRED_FIELD_NUMBER = 25; - private boolean required_ = false; - /** - *
-   * If `required` is true, the field must be populated. A populated field can be
-   * described as "serialized in the wire format," which includes:
-   *
-   * - the following "nullable" fields must be explicitly set to be considered populated:
-   * - singular message fields (whose fields may be unpopulated/default values)
-   * - member fields of a oneof (may be their default value)
-   * - proto3 optional fields (may be their default value)
-   * - proto2 scalar fields (both optional and required)
-   * - proto3 scalar fields must be non-zero to be considered populated
-   * - repeated and map fields must be non-empty to be considered populated
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be set to a non-null value.
-   * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-   * }
-   * ```
-   * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return Whether the required field is set. - */ - @java.lang.Override - public boolean hasRequired() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * If `required` is true, the field must be populated. A populated field can be
-   * described as "serialized in the wire format," which includes:
-   *
-   * - the following "nullable" fields must be explicitly set to be considered populated:
-   * - singular message fields (whose fields may be unpopulated/default values)
-   * - member fields of a oneof (may be their default value)
-   * - proto3 optional fields (may be their default value)
-   * - proto2 scalar fields (both optional and required)
-   * - proto3 scalar fields must be non-zero to be considered populated
-   * - repeated and map fields must be non-empty to be considered populated
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be set to a non-null value.
-   * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-   * }
-   * ```
-   * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return The required. - */ - @java.lang.Override - public boolean getRequired() { - return required_; - } - - public static final int IGNORE_FIELD_NUMBER = 27; - private int ignore_ = 0; - /** - *
-   * Skip validation on the field if its value matches the specified criteria.
-   * See Ignore enum for details.
-   *
-   * ```proto
-   * message UpdateRequest {
-   * // The uri rule only applies if the field is populated and not an empty
-   * // string.
-   * optional string url = 1 [
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-   * (buf.validate.field).string.uri = true,
-   * ];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return Whether the ignore field is set. - */ - @java.lang.Override public boolean hasIgnore() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Skip validation on the field if its value matches the specified criteria.
-   * See Ignore enum for details.
-   *
-   * ```proto
-   * message UpdateRequest {
-   * // The uri rule only applies if the field is populated and not an empty
-   * // string.
-   * optional string url = 1 [
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-   * (buf.validate.field).string.uri = true,
-   * ];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return The ignore. - */ - @java.lang.Override public build.buf.validate.Ignore getIgnore() { - build.buf.validate.Ignore result = build.buf.validate.Ignore.forNumber(ignore_); - return result == null ? build.buf.validate.Ignore.IGNORE_UNSPECIFIED : result; - } - - public static final int FLOAT_FIELD_NUMBER = 1; - /** - *
-   * Scalar Field Types
-   * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - * @return Whether the float field is set. - */ - @java.lang.Override - public boolean hasFloat() { - return typeCase_ == 1; - } - /** - *
-   * Scalar Field Types
-   * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - * @return The float. - */ - @java.lang.Override - public build.buf.validate.FloatRules getFloat() { - if (typeCase_ == 1) { - return (build.buf.validate.FloatRules) type_; - } - return build.buf.validate.FloatRules.getDefaultInstance(); - } - /** - *
-   * Scalar Field Types
-   * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - @java.lang.Override - public build.buf.validate.FloatRulesOrBuilder getFloatOrBuilder() { - if (typeCase_ == 1) { - return (build.buf.validate.FloatRules) type_; - } - return build.buf.validate.FloatRules.getDefaultInstance(); - } - - public static final int DOUBLE_FIELD_NUMBER = 2; - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - * @return Whether the double field is set. - */ - @java.lang.Override - public boolean hasDouble() { - return typeCase_ == 2; - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - * @return The double. - */ - @java.lang.Override - public build.buf.validate.DoubleRules getDouble() { - if (typeCase_ == 2) { - return (build.buf.validate.DoubleRules) type_; - } - return build.buf.validate.DoubleRules.getDefaultInstance(); - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - @java.lang.Override - public build.buf.validate.DoubleRulesOrBuilder getDoubleOrBuilder() { - if (typeCase_ == 2) { - return (build.buf.validate.DoubleRules) type_; - } - return build.buf.validate.DoubleRules.getDefaultInstance(); - } - - public static final int INT32_FIELD_NUMBER = 3; - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - * @return Whether the int32 field is set. - */ - @java.lang.Override - public boolean hasInt32() { - return typeCase_ == 3; - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - * @return The int32. - */ - @java.lang.Override - public build.buf.validate.Int32Rules getInt32() { - if (typeCase_ == 3) { - return (build.buf.validate.Int32Rules) type_; - } - return build.buf.validate.Int32Rules.getDefaultInstance(); - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - @java.lang.Override - public build.buf.validate.Int32RulesOrBuilder getInt32OrBuilder() { - if (typeCase_ == 3) { - return (build.buf.validate.Int32Rules) type_; - } - return build.buf.validate.Int32Rules.getDefaultInstance(); - } - - public static final int INT64_FIELD_NUMBER = 4; - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - * @return Whether the int64 field is set. - */ - @java.lang.Override - public boolean hasInt64() { - return typeCase_ == 4; - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - * @return The int64. - */ - @java.lang.Override - public build.buf.validate.Int64Rules getInt64() { - if (typeCase_ == 4) { - return (build.buf.validate.Int64Rules) type_; - } - return build.buf.validate.Int64Rules.getDefaultInstance(); - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - @java.lang.Override - public build.buf.validate.Int64RulesOrBuilder getInt64OrBuilder() { - if (typeCase_ == 4) { - return (build.buf.validate.Int64Rules) type_; - } - return build.buf.validate.Int64Rules.getDefaultInstance(); - } - - public static final int UINT32_FIELD_NUMBER = 5; - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - * @return Whether the uint32 field is set. - */ - @java.lang.Override - public boolean hasUint32() { - return typeCase_ == 5; - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - * @return The uint32. - */ - @java.lang.Override - public build.buf.validate.UInt32Rules getUint32() { - if (typeCase_ == 5) { - return (build.buf.validate.UInt32Rules) type_; - } - return build.buf.validate.UInt32Rules.getDefaultInstance(); - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - @java.lang.Override - public build.buf.validate.UInt32RulesOrBuilder getUint32OrBuilder() { - if (typeCase_ == 5) { - return (build.buf.validate.UInt32Rules) type_; - } - return build.buf.validate.UInt32Rules.getDefaultInstance(); - } - - public static final int UINT64_FIELD_NUMBER = 6; - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - * @return Whether the uint64 field is set. - */ - @java.lang.Override - public boolean hasUint64() { - return typeCase_ == 6; - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - * @return The uint64. - */ - @java.lang.Override - public build.buf.validate.UInt64Rules getUint64() { - if (typeCase_ == 6) { - return (build.buf.validate.UInt64Rules) type_; - } - return build.buf.validate.UInt64Rules.getDefaultInstance(); - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - @java.lang.Override - public build.buf.validate.UInt64RulesOrBuilder getUint64OrBuilder() { - if (typeCase_ == 6) { - return (build.buf.validate.UInt64Rules) type_; - } - return build.buf.validate.UInt64Rules.getDefaultInstance(); - } - - public static final int SINT32_FIELD_NUMBER = 7; - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - * @return Whether the sint32 field is set. - */ - @java.lang.Override - public boolean hasSint32() { - return typeCase_ == 7; - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - * @return The sint32. - */ - @java.lang.Override - public build.buf.validate.SInt32Rules getSint32() { - if (typeCase_ == 7) { - return (build.buf.validate.SInt32Rules) type_; - } - return build.buf.validate.SInt32Rules.getDefaultInstance(); - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - @java.lang.Override - public build.buf.validate.SInt32RulesOrBuilder getSint32OrBuilder() { - if (typeCase_ == 7) { - return (build.buf.validate.SInt32Rules) type_; - } - return build.buf.validate.SInt32Rules.getDefaultInstance(); - } - - public static final int SINT64_FIELD_NUMBER = 8; - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - * @return Whether the sint64 field is set. - */ - @java.lang.Override - public boolean hasSint64() { - return typeCase_ == 8; - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - * @return The sint64. - */ - @java.lang.Override - public build.buf.validate.SInt64Rules getSint64() { - if (typeCase_ == 8) { - return (build.buf.validate.SInt64Rules) type_; - } - return build.buf.validate.SInt64Rules.getDefaultInstance(); - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - @java.lang.Override - public build.buf.validate.SInt64RulesOrBuilder getSint64OrBuilder() { - if (typeCase_ == 8) { - return (build.buf.validate.SInt64Rules) type_; - } - return build.buf.validate.SInt64Rules.getDefaultInstance(); - } - - public static final int FIXED32_FIELD_NUMBER = 9; - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - * @return Whether the fixed32 field is set. - */ - @java.lang.Override - public boolean hasFixed32() { - return typeCase_ == 9; - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - * @return The fixed32. - */ - @java.lang.Override - public build.buf.validate.Fixed32Rules getFixed32() { - if (typeCase_ == 9) { - return (build.buf.validate.Fixed32Rules) type_; - } - return build.buf.validate.Fixed32Rules.getDefaultInstance(); - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - @java.lang.Override - public build.buf.validate.Fixed32RulesOrBuilder getFixed32OrBuilder() { - if (typeCase_ == 9) { - return (build.buf.validate.Fixed32Rules) type_; - } - return build.buf.validate.Fixed32Rules.getDefaultInstance(); - } - - public static final int FIXED64_FIELD_NUMBER = 10; - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - * @return Whether the fixed64 field is set. - */ - @java.lang.Override - public boolean hasFixed64() { - return typeCase_ == 10; - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - * @return The fixed64. - */ - @java.lang.Override - public build.buf.validate.Fixed64Rules getFixed64() { - if (typeCase_ == 10) { - return (build.buf.validate.Fixed64Rules) type_; - } - return build.buf.validate.Fixed64Rules.getDefaultInstance(); - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - @java.lang.Override - public build.buf.validate.Fixed64RulesOrBuilder getFixed64OrBuilder() { - if (typeCase_ == 10) { - return (build.buf.validate.Fixed64Rules) type_; - } - return build.buf.validate.Fixed64Rules.getDefaultInstance(); - } - - public static final int SFIXED32_FIELD_NUMBER = 11; - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - * @return Whether the sfixed32 field is set. - */ - @java.lang.Override - public boolean hasSfixed32() { - return typeCase_ == 11; - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - * @return The sfixed32. - */ - @java.lang.Override - public build.buf.validate.SFixed32Rules getSfixed32() { - if (typeCase_ == 11) { - return (build.buf.validate.SFixed32Rules) type_; - } - return build.buf.validate.SFixed32Rules.getDefaultInstance(); - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - @java.lang.Override - public build.buf.validate.SFixed32RulesOrBuilder getSfixed32OrBuilder() { - if (typeCase_ == 11) { - return (build.buf.validate.SFixed32Rules) type_; - } - return build.buf.validate.SFixed32Rules.getDefaultInstance(); - } - - public static final int SFIXED64_FIELD_NUMBER = 12; - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - * @return Whether the sfixed64 field is set. - */ - @java.lang.Override - public boolean hasSfixed64() { - return typeCase_ == 12; - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - * @return The sfixed64. - */ - @java.lang.Override - public build.buf.validate.SFixed64Rules getSfixed64() { - if (typeCase_ == 12) { - return (build.buf.validate.SFixed64Rules) type_; - } - return build.buf.validate.SFixed64Rules.getDefaultInstance(); - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - @java.lang.Override - public build.buf.validate.SFixed64RulesOrBuilder getSfixed64OrBuilder() { - if (typeCase_ == 12) { - return (build.buf.validate.SFixed64Rules) type_; - } - return build.buf.validate.SFixed64Rules.getDefaultInstance(); - } - - public static final int BOOL_FIELD_NUMBER = 13; - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - * @return Whether the bool field is set. - */ - @java.lang.Override - public boolean hasBool() { - return typeCase_ == 13; - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - * @return The bool. - */ - @java.lang.Override - public build.buf.validate.BoolRules getBool() { - if (typeCase_ == 13) { - return (build.buf.validate.BoolRules) type_; - } - return build.buf.validate.BoolRules.getDefaultInstance(); - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - @java.lang.Override - public build.buf.validate.BoolRulesOrBuilder getBoolOrBuilder() { - if (typeCase_ == 13) { - return (build.buf.validate.BoolRules) type_; - } - return build.buf.validate.BoolRules.getDefaultInstance(); - } - - public static final int STRING_FIELD_NUMBER = 14; - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - * @return Whether the string field is set. - */ - @java.lang.Override - public boolean hasString() { - return typeCase_ == 14; - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - * @return The string. - */ - @java.lang.Override - public build.buf.validate.StringRules getString() { - if (typeCase_ == 14) { - return (build.buf.validate.StringRules) type_; - } - return build.buf.validate.StringRules.getDefaultInstance(); - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - @java.lang.Override - public build.buf.validate.StringRulesOrBuilder getStringOrBuilder() { - if (typeCase_ == 14) { - return (build.buf.validate.StringRules) type_; - } - return build.buf.validate.StringRules.getDefaultInstance(); - } - - public static final int BYTES_FIELD_NUMBER = 15; - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - * @return Whether the bytes field is set. - */ - @java.lang.Override - public boolean hasBytes() { - return typeCase_ == 15; - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - * @return The bytes. - */ - @java.lang.Override - public build.buf.validate.BytesRules getBytes() { - if (typeCase_ == 15) { - return (build.buf.validate.BytesRules) type_; - } - return build.buf.validate.BytesRules.getDefaultInstance(); - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - @java.lang.Override - public build.buf.validate.BytesRulesOrBuilder getBytesOrBuilder() { - if (typeCase_ == 15) { - return (build.buf.validate.BytesRules) type_; - } - return build.buf.validate.BytesRules.getDefaultInstance(); - } - - public static final int ENUM_FIELD_NUMBER = 16; - /** - *
-   * Complex Field Types
-   * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - * @return Whether the enum field is set. - */ - @java.lang.Override - public boolean hasEnum() { - return typeCase_ == 16; - } - /** - *
-   * Complex Field Types
-   * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - * @return The enum. - */ - @java.lang.Override - public build.buf.validate.EnumRules getEnum() { - if (typeCase_ == 16) { - return (build.buf.validate.EnumRules) type_; - } - return build.buf.validate.EnumRules.getDefaultInstance(); - } - /** - *
-   * Complex Field Types
-   * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - @java.lang.Override - public build.buf.validate.EnumRulesOrBuilder getEnumOrBuilder() { - if (typeCase_ == 16) { - return (build.buf.validate.EnumRules) type_; - } - return build.buf.validate.EnumRules.getDefaultInstance(); - } - - public static final int REPEATED_FIELD_NUMBER = 18; - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - * @return Whether the repeated field is set. - */ - @java.lang.Override - public boolean hasRepeated() { - return typeCase_ == 18; - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - * @return The repeated. - */ - @java.lang.Override - public build.buf.validate.RepeatedRules getRepeated() { - if (typeCase_ == 18) { - return (build.buf.validate.RepeatedRules) type_; - } - return build.buf.validate.RepeatedRules.getDefaultInstance(); - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - @java.lang.Override - public build.buf.validate.RepeatedRulesOrBuilder getRepeatedOrBuilder() { - if (typeCase_ == 18) { - return (build.buf.validate.RepeatedRules) type_; - } - return build.buf.validate.RepeatedRules.getDefaultInstance(); - } - - public static final int MAP_FIELD_NUMBER = 19; - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - * @return Whether the map field is set. - */ - @java.lang.Override - public boolean hasMap() { - return typeCase_ == 19; - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - * @return The map. - */ - @java.lang.Override - public build.buf.validate.MapRules getMap() { - if (typeCase_ == 19) { - return (build.buf.validate.MapRules) type_; - } - return build.buf.validate.MapRules.getDefaultInstance(); - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - @java.lang.Override - public build.buf.validate.MapRulesOrBuilder getMapOrBuilder() { - if (typeCase_ == 19) { - return (build.buf.validate.MapRules) type_; - } - return build.buf.validate.MapRules.getDefaultInstance(); - } - - public static final int ANY_FIELD_NUMBER = 20; - /** - *
-   * Well-Known Field Types
-   * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - * @return Whether the any field is set. - */ - @java.lang.Override - public boolean hasAny() { - return typeCase_ == 20; - } - /** - *
-   * Well-Known Field Types
-   * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - * @return The any. - */ - @java.lang.Override - public build.buf.validate.AnyRules getAny() { - if (typeCase_ == 20) { - return (build.buf.validate.AnyRules) type_; - } - return build.buf.validate.AnyRules.getDefaultInstance(); - } - /** - *
-   * Well-Known Field Types
-   * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - @java.lang.Override - public build.buf.validate.AnyRulesOrBuilder getAnyOrBuilder() { - if (typeCase_ == 20) { - return (build.buf.validate.AnyRules) type_; - } - return build.buf.validate.AnyRules.getDefaultInstance(); - } - - public static final int DURATION_FIELD_NUMBER = 21; - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - * @return Whether the duration field is set. - */ - @java.lang.Override - public boolean hasDuration() { - return typeCase_ == 21; - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - * @return The duration. - */ - @java.lang.Override - public build.buf.validate.DurationRules getDuration() { - if (typeCase_ == 21) { - return (build.buf.validate.DurationRules) type_; - } - return build.buf.validate.DurationRules.getDefaultInstance(); - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - @java.lang.Override - public build.buf.validate.DurationRulesOrBuilder getDurationOrBuilder() { - if (typeCase_ == 21) { - return (build.buf.validate.DurationRules) type_; - } - return build.buf.validate.DurationRules.getDefaultInstance(); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 22; - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return typeCase_ == 22; - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - * @return The timestamp. - */ - @java.lang.Override - public build.buf.validate.TimestampRules getTimestamp() { - if (typeCase_ == 22) { - return (build.buf.validate.TimestampRules) type_; - } - return build.buf.validate.TimestampRules.getDefaultInstance(); - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - @java.lang.Override - public build.buf.validate.TimestampRulesOrBuilder getTimestampOrBuilder() { - if (typeCase_ == 22) { - return (build.buf.validate.TimestampRules) type_; - } - return build.buf.validate.TimestampRules.getDefaultInstance(); - } - - public static final int SKIPPED_FIELD_NUMBER = 24; - private boolean skipped_ = false; - /** - *
-   * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return Whether the skipped field is set. - */ - @java.lang.Override - @java.lang.Deprecated public boolean hasSkipped() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return The skipped. - */ - @java.lang.Override - @java.lang.Deprecated public boolean getSkipped() { - return skipped_; - } - - public static final int IGNORE_EMPTY_FIELD_NUMBER = 26; - private boolean ignoreEmpty_ = false; - /** - *
-   * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return Whether the ignoreEmpty field is set. - */ - @java.lang.Override - @java.lang.Deprecated public boolean hasIgnoreEmpty() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-   * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return The ignoreEmpty. - */ - @java.lang.Override - @java.lang.Deprecated public boolean getIgnoreEmpty() { - return ignoreEmpty_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasFloat()) { - if (!getFloat().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasDouble()) { - if (!getDouble().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasInt32()) { - if (!getInt32().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasInt64()) { - if (!getInt64().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasUint32()) { - if (!getUint32().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasUint64()) { - if (!getUint64().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSint32()) { - if (!getSint32().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSint64()) { - if (!getSint64().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasFixed32()) { - if (!getFixed32().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasFixed64()) { - if (!getFixed64().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSfixed32()) { - if (!getSfixed32().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSfixed64()) { - if (!getSfixed64().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasBool()) { - if (!getBool().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasString()) { - if (!getString().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasBytes()) { - if (!getBytes().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasEnum()) { - if (!getEnum().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasRepeated()) { - if (!getRepeated().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasMap()) { - if (!getMap().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasDuration()) { - if (!getDuration().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasTimestamp()) { - if (!getTimestamp().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (build.buf.validate.FloatRules) type_); - } - if (typeCase_ == 2) { - output.writeMessage(2, (build.buf.validate.DoubleRules) type_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (build.buf.validate.Int32Rules) type_); - } - if (typeCase_ == 4) { - output.writeMessage(4, (build.buf.validate.Int64Rules) type_); - } - if (typeCase_ == 5) { - output.writeMessage(5, (build.buf.validate.UInt32Rules) type_); - } - if (typeCase_ == 6) { - output.writeMessage(6, (build.buf.validate.UInt64Rules) type_); - } - if (typeCase_ == 7) { - output.writeMessage(7, (build.buf.validate.SInt32Rules) type_); - } - if (typeCase_ == 8) { - output.writeMessage(8, (build.buf.validate.SInt64Rules) type_); - } - if (typeCase_ == 9) { - output.writeMessage(9, (build.buf.validate.Fixed32Rules) type_); - } - if (typeCase_ == 10) { - output.writeMessage(10, (build.buf.validate.Fixed64Rules) type_); - } - if (typeCase_ == 11) { - output.writeMessage(11, (build.buf.validate.SFixed32Rules) type_); - } - if (typeCase_ == 12) { - output.writeMessage(12, (build.buf.validate.SFixed64Rules) type_); - } - if (typeCase_ == 13) { - output.writeMessage(13, (build.buf.validate.BoolRules) type_); - } - if (typeCase_ == 14) { - output.writeMessage(14, (build.buf.validate.StringRules) type_); - } - if (typeCase_ == 15) { - output.writeMessage(15, (build.buf.validate.BytesRules) type_); - } - if (typeCase_ == 16) { - output.writeMessage(16, (build.buf.validate.EnumRules) type_); - } - if (typeCase_ == 18) { - output.writeMessage(18, (build.buf.validate.RepeatedRules) type_); - } - if (typeCase_ == 19) { - output.writeMessage(19, (build.buf.validate.MapRules) type_); - } - if (typeCase_ == 20) { - output.writeMessage(20, (build.buf.validate.AnyRules) type_); - } - if (typeCase_ == 21) { - output.writeMessage(21, (build.buf.validate.DurationRules) type_); - } - if (typeCase_ == 22) { - output.writeMessage(22, (build.buf.validate.TimestampRules) type_); - } - for (int i = 0; i < cel_.size(); i++) { - output.writeMessage(23, cel_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeBool(24, skipped_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBool(25, required_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBool(26, ignoreEmpty_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeEnum(27, ignore_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (build.buf.validate.FloatRules) type_); - } - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (build.buf.validate.DoubleRules) type_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (build.buf.validate.Int32Rules) type_); - } - if (typeCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (build.buf.validate.Int64Rules) type_); - } - if (typeCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (build.buf.validate.UInt32Rules) type_); - } - if (typeCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (build.buf.validate.UInt64Rules) type_); - } - if (typeCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (build.buf.validate.SInt32Rules) type_); - } - if (typeCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (build.buf.validate.SInt64Rules) type_); - } - if (typeCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (build.buf.validate.Fixed32Rules) type_); - } - if (typeCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (build.buf.validate.Fixed64Rules) type_); - } - if (typeCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, (build.buf.validate.SFixed32Rules) type_); - } - if (typeCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, (build.buf.validate.SFixed64Rules) type_); - } - if (typeCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, (build.buf.validate.BoolRules) type_); - } - if (typeCase_ == 14) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, (build.buf.validate.StringRules) type_); - } - if (typeCase_ == 15) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, (build.buf.validate.BytesRules) type_); - } - if (typeCase_ == 16) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, (build.buf.validate.EnumRules) type_); - } - if (typeCase_ == 18) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, (build.buf.validate.RepeatedRules) type_); - } - if (typeCase_ == 19) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(19, (build.buf.validate.MapRules) type_); - } - if (typeCase_ == 20) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, (build.buf.validate.AnyRules) type_); - } - if (typeCase_ == 21) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, (build.buf.validate.DurationRules) type_); - } - if (typeCase_ == 22) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(22, (build.buf.validate.TimestampRules) type_); - } - for (int i = 0; i < cel_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(23, cel_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(24, skipped_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(25, required_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(26, ignoreEmpty_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(27, ignore_); - } - 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.FieldConstraints)) { - return super.equals(obj); - } - build.buf.validate.FieldConstraints other = (build.buf.validate.FieldConstraints) obj; - - if (!getCelList() - .equals(other.getCelList())) return false; - if (hasRequired() != other.hasRequired()) return false; - if (hasRequired()) { - if (getRequired() - != other.getRequired()) return false; - } - if (hasIgnore() != other.hasIgnore()) return false; - if (hasIgnore()) { - if (ignore_ != other.ignore_) return false; - } - if (hasSkipped() != other.hasSkipped()) return false; - if (hasSkipped()) { - if (getSkipped() - != other.getSkipped()) return false; - } - if (hasIgnoreEmpty() != other.hasIgnoreEmpty()) return false; - if (hasIgnoreEmpty()) { - if (getIgnoreEmpty() - != other.getIgnoreEmpty()) return false; - } - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getFloat() - .equals(other.getFloat())) return false; - break; - case 2: - if (!getDouble() - .equals(other.getDouble())) return false; - break; - case 3: - if (!getInt32() - .equals(other.getInt32())) return false; - break; - case 4: - if (!getInt64() - .equals(other.getInt64())) return false; - break; - case 5: - if (!getUint32() - .equals(other.getUint32())) return false; - break; - case 6: - if (!getUint64() - .equals(other.getUint64())) return false; - break; - case 7: - if (!getSint32() - .equals(other.getSint32())) return false; - break; - case 8: - if (!getSint64() - .equals(other.getSint64())) return false; - break; - case 9: - if (!getFixed32() - .equals(other.getFixed32())) return false; - break; - case 10: - if (!getFixed64() - .equals(other.getFixed64())) return false; - break; - case 11: - if (!getSfixed32() - .equals(other.getSfixed32())) return false; - break; - case 12: - if (!getSfixed64() - .equals(other.getSfixed64())) return false; - break; - case 13: - if (!getBool() - .equals(other.getBool())) return false; - break; - case 14: - if (!getString() - .equals(other.getString())) return false; - break; - case 15: - if (!getBytes() - .equals(other.getBytes())) return false; - break; - case 16: - if (!getEnum() - .equals(other.getEnum())) return false; - break; - case 18: - if (!getRepeated() - .equals(other.getRepeated())) return false; - break; - case 19: - if (!getMap() - .equals(other.getMap())) return false; - break; - case 20: - if (!getAny() - .equals(other.getAny())) return false; - break; - case 21: - if (!getDuration() - .equals(other.getDuration())) return false; - break; - case 22: - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - break; - case 0: - default: - } - 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 (getCelCount() > 0) { - hash = (37 * hash) + CEL_FIELD_NUMBER; - hash = (53 * hash) + getCelList().hashCode(); - } - if (hasRequired()) { - hash = (37 * hash) + REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getRequired()); - } - if (hasIgnore()) { - hash = (37 * hash) + IGNORE_FIELD_NUMBER; - hash = (53 * hash) + ignore_; - } - if (hasSkipped()) { - hash = (37 * hash) + SKIPPED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getSkipped()); - } - if (hasIgnoreEmpty()) { - hash = (37 * hash) + IGNORE_EMPTY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIgnoreEmpty()); - } - switch (typeCase_) { - case 1: - hash = (37 * hash) + FLOAT_FIELD_NUMBER; - hash = (53 * hash) + getFloat().hashCode(); - break; - case 2: - hash = (37 * hash) + DOUBLE_FIELD_NUMBER; - hash = (53 * hash) + getDouble().hashCode(); - break; - case 3: - hash = (37 * hash) + INT32_FIELD_NUMBER; - hash = (53 * hash) + getInt32().hashCode(); - break; - case 4: - hash = (37 * hash) + INT64_FIELD_NUMBER; - hash = (53 * hash) + getInt64().hashCode(); - break; - case 5: - hash = (37 * hash) + UINT32_FIELD_NUMBER; - hash = (53 * hash) + getUint32().hashCode(); - break; - case 6: - hash = (37 * hash) + UINT64_FIELD_NUMBER; - hash = (53 * hash) + getUint64().hashCode(); - break; - case 7: - hash = (37 * hash) + SINT32_FIELD_NUMBER; - hash = (53 * hash) + getSint32().hashCode(); - break; - case 8: - hash = (37 * hash) + SINT64_FIELD_NUMBER; - hash = (53 * hash) + getSint64().hashCode(); - break; - case 9: - hash = (37 * hash) + FIXED32_FIELD_NUMBER; - hash = (53 * hash) + getFixed32().hashCode(); - break; - case 10: - hash = (37 * hash) + FIXED64_FIELD_NUMBER; - hash = (53 * hash) + getFixed64().hashCode(); - break; - case 11: - hash = (37 * hash) + SFIXED32_FIELD_NUMBER; - hash = (53 * hash) + getSfixed32().hashCode(); - break; - case 12: - hash = (37 * hash) + SFIXED64_FIELD_NUMBER; - hash = (53 * hash) + getSfixed64().hashCode(); - break; - case 13: - hash = (37 * hash) + BOOL_FIELD_NUMBER; - hash = (53 * hash) + getBool().hashCode(); - break; - case 14: - hash = (37 * hash) + STRING_FIELD_NUMBER; - hash = (53 * hash) + getString().hashCode(); - break; - case 15: - hash = (37 * hash) + BYTES_FIELD_NUMBER; - hash = (53 * hash) + getBytes().hashCode(); - break; - case 16: - hash = (37 * hash) + ENUM_FIELD_NUMBER; - hash = (53 * hash) + getEnum().hashCode(); - break; - case 18: - hash = (37 * hash) + REPEATED_FIELD_NUMBER; - hash = (53 * hash) + getRepeated().hashCode(); - break; - case 19: - hash = (37 * hash) + MAP_FIELD_NUMBER; - hash = (53 * hash) + getMap().hashCode(); - break; - case 20: - hash = (37 * hash) + ANY_FIELD_NUMBER; - hash = (53 * hash) + getAny().hashCode(); - break; - case 21: - hash = (37 * hash) + DURATION_FIELD_NUMBER; - hash = (53 * hash) + getDuration().hashCode(); - break; - case 22: - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.FieldConstraints parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.FieldConstraints 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.FieldConstraints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.FieldConstraints 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.FieldConstraints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.FieldConstraints parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.FieldConstraints parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.FieldConstraints 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.FieldConstraints parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.FieldConstraints 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.FieldConstraints parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.FieldConstraints 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.FieldConstraints 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; - } - /** - *
-   * FieldConstraints encapsulates the rules for each type of field. Depending on
-   * the field, the correct set should be used to ensure proper validations.
-   * 
- * - * Protobuf type {@code buf.validate.FieldConstraints} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.FieldConstraints) - build.buf.validate.FieldConstraintsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FieldConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FieldConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.FieldConstraints.class, build.buf.validate.FieldConstraints.Builder.class); - } - - // Construct using build.buf.validate.FieldConstraints.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (celBuilder_ == null) { - cel_ = java.util.Collections.emptyList(); - } else { - cel_ = null; - celBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - required_ = false; - ignore_ = 0; - if (floatBuilder_ != null) { - floatBuilder_.clear(); - } - if (doubleBuilder_ != null) { - doubleBuilder_.clear(); - } - if (int32Builder_ != null) { - int32Builder_.clear(); - } - if (int64Builder_ != null) { - int64Builder_.clear(); - } - if (uint32Builder_ != null) { - uint32Builder_.clear(); - } - if (uint64Builder_ != null) { - uint64Builder_.clear(); - } - if (sint32Builder_ != null) { - sint32Builder_.clear(); - } - if (sint64Builder_ != null) { - sint64Builder_.clear(); - } - if (fixed32Builder_ != null) { - fixed32Builder_.clear(); - } - if (fixed64Builder_ != null) { - fixed64Builder_.clear(); - } - if (sfixed32Builder_ != null) { - sfixed32Builder_.clear(); - } - if (sfixed64Builder_ != null) { - sfixed64Builder_.clear(); - } - if (boolBuilder_ != null) { - boolBuilder_.clear(); - } - if (stringBuilder_ != null) { - stringBuilder_.clear(); - } - if (bytesBuilder_ != null) { - bytesBuilder_.clear(); - } - if (enumBuilder_ != null) { - enumBuilder_.clear(); - } - if (repeatedBuilder_ != null) { - repeatedBuilder_.clear(); - } - if (mapBuilder_ != null) { - mapBuilder_.clear(); - } - if (anyBuilder_ != null) { - anyBuilder_.clear(); - } - if (durationBuilder_ != null) { - durationBuilder_.clear(); - } - if (timestampBuilder_ != null) { - timestampBuilder_.clear(); - } - skipped_ = false; - ignoreEmpty_ = false; - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FieldConstraints_descriptor; - } - - @java.lang.Override - public build.buf.validate.FieldConstraints getDefaultInstanceForType() { - return build.buf.validate.FieldConstraints.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.FieldConstraints build() { - build.buf.validate.FieldConstraints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.FieldConstraints buildPartial() { - build.buf.validate.FieldConstraints result = new build.buf.validate.FieldConstraints(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.FieldConstraints result) { - if (celBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cel_ = java.util.Collections.unmodifiableList(cel_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cel_ = cel_; - } else { - result.cel_ = celBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.FieldConstraints result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.required_ = required_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.ignore_ = ignore_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x01000000) != 0)) { - result.skipped_ = skipped_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x02000000) != 0)) { - result.ignoreEmpty_ = ignoreEmpty_; - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.FieldConstraints result) { - result.typeCase_ = typeCase_; - result.type_ = this.type_; - if (typeCase_ == 1 && - floatBuilder_ != null) { - result.type_ = floatBuilder_.build(); - } - if (typeCase_ == 2 && - doubleBuilder_ != null) { - result.type_ = doubleBuilder_.build(); - } - if (typeCase_ == 3 && - int32Builder_ != null) { - result.type_ = int32Builder_.build(); - } - if (typeCase_ == 4 && - int64Builder_ != null) { - result.type_ = int64Builder_.build(); - } - if (typeCase_ == 5 && - uint32Builder_ != null) { - result.type_ = uint32Builder_.build(); - } - if (typeCase_ == 6 && - uint64Builder_ != null) { - result.type_ = uint64Builder_.build(); - } - if (typeCase_ == 7 && - sint32Builder_ != null) { - result.type_ = sint32Builder_.build(); - } - if (typeCase_ == 8 && - sint64Builder_ != null) { - result.type_ = sint64Builder_.build(); - } - if (typeCase_ == 9 && - fixed32Builder_ != null) { - result.type_ = fixed32Builder_.build(); - } - if (typeCase_ == 10 && - fixed64Builder_ != null) { - result.type_ = fixed64Builder_.build(); - } - if (typeCase_ == 11 && - sfixed32Builder_ != null) { - result.type_ = sfixed32Builder_.build(); - } - if (typeCase_ == 12 && - sfixed64Builder_ != null) { - result.type_ = sfixed64Builder_.build(); - } - if (typeCase_ == 13 && - boolBuilder_ != null) { - result.type_ = boolBuilder_.build(); - } - if (typeCase_ == 14 && - stringBuilder_ != null) { - result.type_ = stringBuilder_.build(); - } - if (typeCase_ == 15 && - bytesBuilder_ != null) { - result.type_ = bytesBuilder_.build(); - } - if (typeCase_ == 16 && - enumBuilder_ != null) { - result.type_ = enumBuilder_.build(); - } - if (typeCase_ == 18 && - repeatedBuilder_ != null) { - result.type_ = repeatedBuilder_.build(); - } - if (typeCase_ == 19 && - mapBuilder_ != null) { - result.type_ = mapBuilder_.build(); - } - if (typeCase_ == 20 && - anyBuilder_ != null) { - result.type_ = anyBuilder_.build(); - } - if (typeCase_ == 21 && - durationBuilder_ != null) { - result.type_ = durationBuilder_.build(); - } - if (typeCase_ == 22 && - timestampBuilder_ != null) { - result.type_ = timestampBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.FieldConstraints) { - return mergeFrom((build.buf.validate.FieldConstraints)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.FieldConstraints other) { - if (other == build.buf.validate.FieldConstraints.getDefaultInstance()) return this; - if (celBuilder_ == null) { - if (!other.cel_.isEmpty()) { - if (cel_.isEmpty()) { - cel_ = other.cel_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCelIsMutable(); - cel_.addAll(other.cel_); - } - onChanged(); - } - } else { - if (!other.cel_.isEmpty()) { - if (celBuilder_.isEmpty()) { - celBuilder_.dispose(); - celBuilder_ = null; - cel_ = other.cel_; - bitField0_ = (bitField0_ & ~0x00000001); - celBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCelFieldBuilder() : null; - } else { - celBuilder_.addAllMessages(other.cel_); - } - } - } - if (other.hasRequired()) { - setRequired(other.getRequired()); - } - if (other.hasIgnore()) { - setIgnore(other.getIgnore()); - } - if (other.hasSkipped()) { - setSkipped(other.getSkipped()); - } - if (other.hasIgnoreEmpty()) { - setIgnoreEmpty(other.getIgnoreEmpty()); - } - switch (other.getTypeCase()) { - case FLOAT: { - mergeFloat(other.getFloat()); - break; - } - case DOUBLE: { - mergeDouble(other.getDouble()); - break; - } - case INT32: { - mergeInt32(other.getInt32()); - break; - } - case INT64: { - mergeInt64(other.getInt64()); - break; - } - case UINT32: { - mergeUint32(other.getUint32()); - break; - } - case UINT64: { - mergeUint64(other.getUint64()); - break; - } - case SINT32: { - mergeSint32(other.getSint32()); - break; - } - case SINT64: { - mergeSint64(other.getSint64()); - break; - } - case FIXED32: { - mergeFixed32(other.getFixed32()); - break; - } - case FIXED64: { - mergeFixed64(other.getFixed64()); - break; - } - case SFIXED32: { - mergeSfixed32(other.getSfixed32()); - break; - } - case SFIXED64: { - mergeSfixed64(other.getSfixed64()); - break; - } - case BOOL: { - mergeBool(other.getBool()); - break; - } - case STRING: { - mergeString(other.getString()); - break; - } - case BYTES: { - mergeBytes(other.getBytes()); - break; - } - case ENUM: { - mergeEnum(other.getEnum()); - break; - } - case REPEATED: { - mergeRepeated(other.getRepeated()); - break; - } - case MAP: { - mergeMap(other.getMap()); - break; - } - case ANY: { - mergeAny(other.getAny()); - break; - } - case DURATION: { - mergeDuration(other.getDuration()); - break; - } - case TIMESTAMP: { - mergeTimestamp(other.getTimestamp()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (hasFloat()) { - if (!getFloat().isInitialized()) { - return false; - } - } - if (hasDouble()) { - if (!getDouble().isInitialized()) { - return false; - } - } - if (hasInt32()) { - if (!getInt32().isInitialized()) { - return false; - } - } - if (hasInt64()) { - if (!getInt64().isInitialized()) { - return false; - } - } - if (hasUint32()) { - if (!getUint32().isInitialized()) { - return false; - } - } - if (hasUint64()) { - if (!getUint64().isInitialized()) { - return false; - } - } - if (hasSint32()) { - if (!getSint32().isInitialized()) { - return false; - } - } - if (hasSint64()) { - if (!getSint64().isInitialized()) { - return false; - } - } - if (hasFixed32()) { - if (!getFixed32().isInitialized()) { - return false; - } - } - if (hasFixed64()) { - if (!getFixed64().isInitialized()) { - return false; - } - } - if (hasSfixed32()) { - if (!getSfixed32().isInitialized()) { - return false; - } - } - if (hasSfixed64()) { - if (!getSfixed64().isInitialized()) { - return false; - } - } - if (hasBool()) { - if (!getBool().isInitialized()) { - return false; - } - } - if (hasString()) { - if (!getString().isInitialized()) { - return false; - } - } - if (hasBytes()) { - if (!getBytes().isInitialized()) { - return false; - } - } - if (hasEnum()) { - if (!getEnum().isInitialized()) { - return false; - } - } - if (hasRepeated()) { - if (!getRepeated().isInitialized()) { - return false; - } - } - if (hasMap()) { - if (!getMap().isInitialized()) { - return false; - } - } - if (hasDuration()) { - if (!getDuration().isInitialized()) { - return false; - } - } - if (hasTimestamp()) { - if (!getTimestamp().isInitialized()) { - return false; - } - } - 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( - getFloatFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 1; - break; - } // case 10 - case 18: { - input.readMessage( - getDoubleFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 2; - break; - } // case 18 - case 26: { - input.readMessage( - getInt32FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 3; - break; - } // case 26 - case 34: { - input.readMessage( - getInt64FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getUint32FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getUint64FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 6; - break; - } // case 50 - case 58: { - input.readMessage( - getSint32FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 7; - break; - } // case 58 - case 66: { - input.readMessage( - getSint64FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 8; - break; - } // case 66 - case 74: { - input.readMessage( - getFixed32FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 9; - break; - } // case 74 - case 82: { - input.readMessage( - getFixed64FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 10; - break; - } // case 82 - case 90: { - input.readMessage( - getSfixed32FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 11; - break; - } // case 90 - case 98: { - input.readMessage( - getSfixed64FieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 12; - break; - } // case 98 - case 106: { - input.readMessage( - getBoolFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 13; - break; - } // case 106 - case 114: { - input.readMessage( - getStringFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 14; - break; - } // case 114 - case 122: { - input.readMessage( - getBytesFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 15; - break; - } // case 122 - case 130: { - input.readMessage( - getEnumFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 16; - break; - } // case 130 - case 146: { - input.readMessage( - getRepeatedFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 18; - break; - } // case 146 - case 154: { - input.readMessage( - getMapFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 19; - break; - } // case 154 - case 162: { - input.readMessage( - getAnyFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 20; - break; - } // case 162 - case 170: { - input.readMessage( - getDurationFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 21; - break; - } // case 170 - case 178: { - input.readMessage( - getTimestampFieldBuilder().getBuilder(), - extensionRegistry); - typeCase_ = 22; - break; - } // case 178 - case 186: { - build.buf.validate.Constraint m = - input.readMessage( - build.buf.validate.Constraint.parser(), - extensionRegistry); - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(m); - } else { - celBuilder_.addMessage(m); - } - break; - } // case 186 - case 192: { - skipped_ = input.readBool(); - bitField0_ |= 0x01000000; - break; - } // case 192 - case 200: { - required_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 200 - case 208: { - ignoreEmpty_ = input.readBool(); - bitField0_ |= 0x02000000; - break; - } // case 208 - case 216: { - int tmpRaw = input.readEnum(); - build.buf.validate.Ignore tmpValue = - build.buf.validate.Ignore.forNumber(tmpRaw); - if (tmpValue == null) { - mergeUnknownVarintField(27, tmpRaw); - } else { - ignore_ = tmpRaw; - bitField0_ |= 0x00000004; - } - break; - } // case 216 - 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 typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.util.List cel_ = - java.util.Collections.emptyList(); - private void ensureCelIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cel_ = new java.util.ArrayList(cel_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder> celBuilder_; - - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public java.util.List getCelList() { - if (celBuilder_ == null) { - return java.util.Collections.unmodifiableList(cel_); - } else { - return celBuilder_.getMessageList(); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public int getCelCount() { - if (celBuilder_ == null) { - return cel_.size(); - } else { - return celBuilder_.getCount(); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public build.buf.validate.Constraint getCel(int index) { - if (celBuilder_ == null) { - return cel_.get(index); - } else { - return celBuilder_.getMessage(index); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder setCel( - int index, build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.set(index, value); - onChanged(); - } else { - celBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder setCel( - int index, build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.set(index, builderForValue.build()); - onChanged(); - } else { - celBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder addCel(build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.add(value); - onChanged(); - } else { - celBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder addCel( - int index, build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.add(index, value); - onChanged(); - } else { - celBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder addCel( - build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(builderForValue.build()); - onChanged(); - } else { - celBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder addCel( - int index, build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(index, builderForValue.build()); - onChanged(); - } else { - celBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder addAllCel( - java.lang.Iterable values) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cel_); - onChanged(); - } else { - celBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder clearCel() { - if (celBuilder_ == null) { - cel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - celBuilder_.clear(); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public Builder removeCel(int index) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.remove(index); - onChanged(); - } else { - celBuilder_.remove(index); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder getCelBuilder( - int index) { - return getCelFieldBuilder().getBuilder(index); - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index) { - if (celBuilder_ == null) { - return cel_.get(index); } else { - return celBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public java.util.List - getCelOrBuilderList() { - if (celBuilder_ != null) { - return celBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cel_); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder addCelBuilder() { - return getCelFieldBuilder().addBuilder( - build.buf.validate.Constraint.getDefaultInstance()); - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder addCelBuilder( - int index) { - return getCelFieldBuilder().addBuilder( - index, build.buf.validate.Constraint.getDefaultInstance()); - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.field).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - public java.util.List - getCelBuilderList() { - return getCelFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder> - getCelFieldBuilder() { - if (celBuilder_ == null) { - celBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder>( - cel_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cel_ = null; - } - return celBuilder_; - } - - private boolean required_ ; - /** - *
-     * If `required` is true, the field must be populated. A populated field can be
-     * described as "serialized in the wire format," which includes:
-     *
-     * - the following "nullable" fields must be explicitly set to be considered populated:
-     * - singular message fields (whose fields may be unpopulated/default values)
-     * - member fields of a oneof (may be their default value)
-     * - proto3 optional fields (may be their default value)
-     * - proto2 scalar fields (both optional and required)
-     * - proto3 scalar fields must be non-zero to be considered populated
-     * - repeated and map fields must be non-empty to be considered populated
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be set to a non-null value.
-     * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-     * }
-     * ```
-     * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return Whether the required field is set. - */ - @java.lang.Override - public boolean hasRequired() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * If `required` is true, the field must be populated. A populated field can be
-     * described as "serialized in the wire format," which includes:
-     *
-     * - the following "nullable" fields must be explicitly set to be considered populated:
-     * - singular message fields (whose fields may be unpopulated/default values)
-     * - member fields of a oneof (may be their default value)
-     * - proto3 optional fields (may be their default value)
-     * - proto2 scalar fields (both optional and required)
-     * - proto3 scalar fields must be non-zero to be considered populated
-     * - repeated and map fields must be non-empty to be considered populated
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be set to a non-null value.
-     * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-     * }
-     * ```
-     * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return The required. - */ - @java.lang.Override - public boolean getRequired() { - return required_; - } - /** - *
-     * If `required` is true, the field must be populated. A populated field can be
-     * described as "serialized in the wire format," which includes:
-     *
-     * - the following "nullable" fields must be explicitly set to be considered populated:
-     * - singular message fields (whose fields may be unpopulated/default values)
-     * - member fields of a oneof (may be their default value)
-     * - proto3 optional fields (may be their default value)
-     * - proto2 scalar fields (both optional and required)
-     * - proto3 scalar fields must be non-zero to be considered populated
-     * - repeated and map fields must be non-empty to be considered populated
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be set to a non-null value.
-     * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-     * }
-     * ```
-     * 
- * - * optional bool required = 25 [json_name = "required"]; - * @param value The required to set. - * @return This builder for chaining. - */ - public Builder setRequired(boolean value) { - - required_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * If `required` is true, the field must be populated. A populated field can be
-     * described as "serialized in the wire format," which includes:
-     *
-     * - the following "nullable" fields must be explicitly set to be considered populated:
-     * - singular message fields (whose fields may be unpopulated/default values)
-     * - member fields of a oneof (may be their default value)
-     * - proto3 optional fields (may be their default value)
-     * - proto2 scalar fields (both optional and required)
-     * - proto3 scalar fields must be non-zero to be considered populated
-     * - repeated and map fields must be non-empty to be considered populated
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be set to a non-null value.
-     * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-     * }
-     * ```
-     * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return This builder for chaining. - */ - public Builder clearRequired() { - bitField0_ = (bitField0_ & ~0x00000002); - required_ = false; - onChanged(); - return this; - } - - private int ignore_ = 0; - /** - *
-     * Skip validation on the field if its value matches the specified criteria.
-     * See Ignore enum for details.
-     *
-     * ```proto
-     * message UpdateRequest {
-     * // The uri rule only applies if the field is populated and not an empty
-     * // string.
-     * optional string url = 1 [
-     * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-     * (buf.validate.field).string.uri = true,
-     * ];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return Whether the ignore field is set. - */ - @java.lang.Override public boolean hasIgnore() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Skip validation on the field if its value matches the specified criteria.
-     * See Ignore enum for details.
-     *
-     * ```proto
-     * message UpdateRequest {
-     * // The uri rule only applies if the field is populated and not an empty
-     * // string.
-     * optional string url = 1 [
-     * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-     * (buf.validate.field).string.uri = true,
-     * ];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return The ignore. - */ - @java.lang.Override - public build.buf.validate.Ignore getIgnore() { - build.buf.validate.Ignore result = build.buf.validate.Ignore.forNumber(ignore_); - return result == null ? build.buf.validate.Ignore.IGNORE_UNSPECIFIED : result; - } - /** - *
-     * Skip validation on the field if its value matches the specified criteria.
-     * See Ignore enum for details.
-     *
-     * ```proto
-     * message UpdateRequest {
-     * // The uri rule only applies if the field is populated and not an empty
-     * // string.
-     * optional string url = 1 [
-     * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-     * (buf.validate.field).string.uri = true,
-     * ];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @param value The ignore to set. - * @return This builder for chaining. - */ - public Builder setIgnore(build.buf.validate.Ignore value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - ignore_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Skip validation on the field if its value matches the specified criteria.
-     * See Ignore enum for details.
-     *
-     * ```proto
-     * message UpdateRequest {
-     * // The uri rule only applies if the field is populated and not an empty
-     * // string.
-     * optional string url = 1 [
-     * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-     * (buf.validate.field).string.uri = true,
-     * ];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return This builder for chaining. - */ - public Builder clearIgnore() { - bitField0_ = (bitField0_ & ~0x00000004); - ignore_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FloatRules, build.buf.validate.FloatRules.Builder, build.buf.validate.FloatRulesOrBuilder> floatBuilder_; - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - * @return Whether the float field is set. - */ - @java.lang.Override - public boolean hasFloat() { - return typeCase_ == 1; - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - * @return The float. - */ - @java.lang.Override - public build.buf.validate.FloatRules getFloat() { - if (floatBuilder_ == null) { - if (typeCase_ == 1) { - return (build.buf.validate.FloatRules) type_; - } - return build.buf.validate.FloatRules.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return floatBuilder_.getMessage(); - } - return build.buf.validate.FloatRules.getDefaultInstance(); - } - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - public Builder setFloat(build.buf.validate.FloatRules value) { - if (floatBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - floatBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - public Builder setFloat( - build.buf.validate.FloatRules.Builder builderForValue) { - if (floatBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - floatBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - public Builder mergeFloat(build.buf.validate.FloatRules value) { - if (floatBuilder_ == null) { - if (typeCase_ == 1 && - type_ != build.buf.validate.FloatRules.getDefaultInstance()) { - type_ = build.buf.validate.FloatRules.newBuilder((build.buf.validate.FloatRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - floatBuilder_.mergeFrom(value); - } else { - floatBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - public Builder clearFloat() { - if (floatBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - floatBuilder_.clear(); - } - return this; - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - public build.buf.validate.FloatRules.Builder getFloatBuilder() { - return getFloatFieldBuilder().getBuilder(); - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - @java.lang.Override - public build.buf.validate.FloatRulesOrBuilder getFloatOrBuilder() { - if ((typeCase_ == 1) && (floatBuilder_ != null)) { - return floatBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (build.buf.validate.FloatRules) type_; - } - return build.buf.validate.FloatRules.getDefaultInstance(); - } - } - /** - *
-     * Scalar Field Types
-     * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FloatRules, build.buf.validate.FloatRules.Builder, build.buf.validate.FloatRulesOrBuilder> - getFloatFieldBuilder() { - if (floatBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = build.buf.validate.FloatRules.getDefaultInstance(); - } - floatBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FloatRules, build.buf.validate.FloatRules.Builder, build.buf.validate.FloatRulesOrBuilder>( - (build.buf.validate.FloatRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged(); - return floatBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.DoubleRules, build.buf.validate.DoubleRules.Builder, build.buf.validate.DoubleRulesOrBuilder> doubleBuilder_; - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - * @return Whether the double field is set. - */ - @java.lang.Override - public boolean hasDouble() { - return typeCase_ == 2; - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - * @return The double. - */ - @java.lang.Override - public build.buf.validate.DoubleRules getDouble() { - if (doubleBuilder_ == null) { - if (typeCase_ == 2) { - return (build.buf.validate.DoubleRules) type_; - } - return build.buf.validate.DoubleRules.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return doubleBuilder_.getMessage(); - } - return build.buf.validate.DoubleRules.getDefaultInstance(); - } - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - public Builder setDouble(build.buf.validate.DoubleRules value) { - if (doubleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - doubleBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - public Builder setDouble( - build.buf.validate.DoubleRules.Builder builderForValue) { - if (doubleBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - doubleBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - public Builder mergeDouble(build.buf.validate.DoubleRules value) { - if (doubleBuilder_ == null) { - if (typeCase_ == 2 && - type_ != build.buf.validate.DoubleRules.getDefaultInstance()) { - type_ = build.buf.validate.DoubleRules.newBuilder((build.buf.validate.DoubleRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - doubleBuilder_.mergeFrom(value); - } else { - doubleBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - public Builder clearDouble() { - if (doubleBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - doubleBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - public build.buf.validate.DoubleRules.Builder getDoubleBuilder() { - return getDoubleFieldBuilder().getBuilder(); - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - @java.lang.Override - public build.buf.validate.DoubleRulesOrBuilder getDoubleOrBuilder() { - if ((typeCase_ == 2) && (doubleBuilder_ != null)) { - return doubleBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (build.buf.validate.DoubleRules) type_; - } - return build.buf.validate.DoubleRules.getDefaultInstance(); - } - } - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.DoubleRules, build.buf.validate.DoubleRules.Builder, build.buf.validate.DoubleRulesOrBuilder> - getDoubleFieldBuilder() { - if (doubleBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = build.buf.validate.DoubleRules.getDefaultInstance(); - } - doubleBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.DoubleRules, build.buf.validate.DoubleRules.Builder, build.buf.validate.DoubleRulesOrBuilder>( - (build.buf.validate.DoubleRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged(); - return doubleBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Int32Rules, build.buf.validate.Int32Rules.Builder, build.buf.validate.Int32RulesOrBuilder> int32Builder_; - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - * @return Whether the int32 field is set. - */ - @java.lang.Override - public boolean hasInt32() { - return typeCase_ == 3; - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - * @return The int32. - */ - @java.lang.Override - public build.buf.validate.Int32Rules getInt32() { - if (int32Builder_ == null) { - if (typeCase_ == 3) { - return (build.buf.validate.Int32Rules) type_; - } - return build.buf.validate.Int32Rules.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return int32Builder_.getMessage(); - } - return build.buf.validate.Int32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - public Builder setInt32(build.buf.validate.Int32Rules value) { - if (int32Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - int32Builder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - public Builder setInt32( - build.buf.validate.Int32Rules.Builder builderForValue) { - if (int32Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - int32Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - public Builder mergeInt32(build.buf.validate.Int32Rules value) { - if (int32Builder_ == null) { - if (typeCase_ == 3 && - type_ != build.buf.validate.Int32Rules.getDefaultInstance()) { - type_ = build.buf.validate.Int32Rules.newBuilder((build.buf.validate.Int32Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - int32Builder_.mergeFrom(value); - } else { - int32Builder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - public Builder clearInt32() { - if (int32Builder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - int32Builder_.clear(); - } - return this; - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - public build.buf.validate.Int32Rules.Builder getInt32Builder() { - return getInt32FieldBuilder().getBuilder(); - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - @java.lang.Override - public build.buf.validate.Int32RulesOrBuilder getInt32OrBuilder() { - if ((typeCase_ == 3) && (int32Builder_ != null)) { - return int32Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (build.buf.validate.Int32Rules) type_; - } - return build.buf.validate.Int32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Int32Rules, build.buf.validate.Int32Rules.Builder, build.buf.validate.Int32RulesOrBuilder> - getInt32FieldBuilder() { - if (int32Builder_ == null) { - if (!(typeCase_ == 3)) { - type_ = build.buf.validate.Int32Rules.getDefaultInstance(); - } - int32Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Int32Rules, build.buf.validate.Int32Rules.Builder, build.buf.validate.Int32RulesOrBuilder>( - (build.buf.validate.Int32Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged(); - return int32Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Int64Rules, build.buf.validate.Int64Rules.Builder, build.buf.validate.Int64RulesOrBuilder> int64Builder_; - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - * @return Whether the int64 field is set. - */ - @java.lang.Override - public boolean hasInt64() { - return typeCase_ == 4; - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - * @return The int64. - */ - @java.lang.Override - public build.buf.validate.Int64Rules getInt64() { - if (int64Builder_ == null) { - if (typeCase_ == 4) { - return (build.buf.validate.Int64Rules) type_; - } - return build.buf.validate.Int64Rules.getDefaultInstance(); - } else { - if (typeCase_ == 4) { - return int64Builder_.getMessage(); - } - return build.buf.validate.Int64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - public Builder setInt64(build.buf.validate.Int64Rules value) { - if (int64Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - int64Builder_.setMessage(value); - } - typeCase_ = 4; - return this; - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - public Builder setInt64( - build.buf.validate.Int64Rules.Builder builderForValue) { - if (int64Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - int64Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 4; - return this; - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - public Builder mergeInt64(build.buf.validate.Int64Rules value) { - if (int64Builder_ == null) { - if (typeCase_ == 4 && - type_ != build.buf.validate.Int64Rules.getDefaultInstance()) { - type_ = build.buf.validate.Int64Rules.newBuilder((build.buf.validate.Int64Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 4) { - int64Builder_.mergeFrom(value); - } else { - int64Builder_.setMessage(value); - } - } - typeCase_ = 4; - return this; - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - public Builder clearInt64() { - if (int64Builder_ == null) { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - } - int64Builder_.clear(); - } - return this; - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - public build.buf.validate.Int64Rules.Builder getInt64Builder() { - return getInt64FieldBuilder().getBuilder(); - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - @java.lang.Override - public build.buf.validate.Int64RulesOrBuilder getInt64OrBuilder() { - if ((typeCase_ == 4) && (int64Builder_ != null)) { - return int64Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 4) { - return (build.buf.validate.Int64Rules) type_; - } - return build.buf.validate.Int64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Int64Rules, build.buf.validate.Int64Rules.Builder, build.buf.validate.Int64RulesOrBuilder> - getInt64FieldBuilder() { - if (int64Builder_ == null) { - if (!(typeCase_ == 4)) { - type_ = build.buf.validate.Int64Rules.getDefaultInstance(); - } - int64Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Int64Rules, build.buf.validate.Int64Rules.Builder, build.buf.validate.Int64RulesOrBuilder>( - (build.buf.validate.Int64Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 4; - onChanged(); - return int64Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.UInt32Rules, build.buf.validate.UInt32Rules.Builder, build.buf.validate.UInt32RulesOrBuilder> uint32Builder_; - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - * @return Whether the uint32 field is set. - */ - @java.lang.Override - public boolean hasUint32() { - return typeCase_ == 5; - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - * @return The uint32. - */ - @java.lang.Override - public build.buf.validate.UInt32Rules getUint32() { - if (uint32Builder_ == null) { - if (typeCase_ == 5) { - return (build.buf.validate.UInt32Rules) type_; - } - return build.buf.validate.UInt32Rules.getDefaultInstance(); - } else { - if (typeCase_ == 5) { - return uint32Builder_.getMessage(); - } - return build.buf.validate.UInt32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - public Builder setUint32(build.buf.validate.UInt32Rules value) { - if (uint32Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - uint32Builder_.setMessage(value); - } - typeCase_ = 5; - return this; - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - public Builder setUint32( - build.buf.validate.UInt32Rules.Builder builderForValue) { - if (uint32Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - uint32Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 5; - return this; - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - public Builder mergeUint32(build.buf.validate.UInt32Rules value) { - if (uint32Builder_ == null) { - if (typeCase_ == 5 && - type_ != build.buf.validate.UInt32Rules.getDefaultInstance()) { - type_ = build.buf.validate.UInt32Rules.newBuilder((build.buf.validate.UInt32Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 5) { - uint32Builder_.mergeFrom(value); - } else { - uint32Builder_.setMessage(value); - } - } - typeCase_ = 5; - return this; - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - public Builder clearUint32() { - if (uint32Builder_ == null) { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - } - uint32Builder_.clear(); - } - return this; - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - public build.buf.validate.UInt32Rules.Builder getUint32Builder() { - return getUint32FieldBuilder().getBuilder(); - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - @java.lang.Override - public build.buf.validate.UInt32RulesOrBuilder getUint32OrBuilder() { - if ((typeCase_ == 5) && (uint32Builder_ != null)) { - return uint32Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 5) { - return (build.buf.validate.UInt32Rules) type_; - } - return build.buf.validate.UInt32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.UInt32Rules, build.buf.validate.UInt32Rules.Builder, build.buf.validate.UInt32RulesOrBuilder> - getUint32FieldBuilder() { - if (uint32Builder_ == null) { - if (!(typeCase_ == 5)) { - type_ = build.buf.validate.UInt32Rules.getDefaultInstance(); - } - uint32Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.UInt32Rules, build.buf.validate.UInt32Rules.Builder, build.buf.validate.UInt32RulesOrBuilder>( - (build.buf.validate.UInt32Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 5; - onChanged(); - return uint32Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.UInt64Rules, build.buf.validate.UInt64Rules.Builder, build.buf.validate.UInt64RulesOrBuilder> uint64Builder_; - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - * @return Whether the uint64 field is set. - */ - @java.lang.Override - public boolean hasUint64() { - return typeCase_ == 6; - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - * @return The uint64. - */ - @java.lang.Override - public build.buf.validate.UInt64Rules getUint64() { - if (uint64Builder_ == null) { - if (typeCase_ == 6) { - return (build.buf.validate.UInt64Rules) type_; - } - return build.buf.validate.UInt64Rules.getDefaultInstance(); - } else { - if (typeCase_ == 6) { - return uint64Builder_.getMessage(); - } - return build.buf.validate.UInt64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - public Builder setUint64(build.buf.validate.UInt64Rules value) { - if (uint64Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - uint64Builder_.setMessage(value); - } - typeCase_ = 6; - return this; - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - public Builder setUint64( - build.buf.validate.UInt64Rules.Builder builderForValue) { - if (uint64Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - uint64Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 6; - return this; - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - public Builder mergeUint64(build.buf.validate.UInt64Rules value) { - if (uint64Builder_ == null) { - if (typeCase_ == 6 && - type_ != build.buf.validate.UInt64Rules.getDefaultInstance()) { - type_ = build.buf.validate.UInt64Rules.newBuilder((build.buf.validate.UInt64Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 6) { - uint64Builder_.mergeFrom(value); - } else { - uint64Builder_.setMessage(value); - } - } - typeCase_ = 6; - return this; - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - public Builder clearUint64() { - if (uint64Builder_ == null) { - if (typeCase_ == 6) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 6) { - typeCase_ = 0; - type_ = null; - } - uint64Builder_.clear(); - } - return this; - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - public build.buf.validate.UInt64Rules.Builder getUint64Builder() { - return getUint64FieldBuilder().getBuilder(); - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - @java.lang.Override - public build.buf.validate.UInt64RulesOrBuilder getUint64OrBuilder() { - if ((typeCase_ == 6) && (uint64Builder_ != null)) { - return uint64Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 6) { - return (build.buf.validate.UInt64Rules) type_; - } - return build.buf.validate.UInt64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.UInt64Rules, build.buf.validate.UInt64Rules.Builder, build.buf.validate.UInt64RulesOrBuilder> - getUint64FieldBuilder() { - if (uint64Builder_ == null) { - if (!(typeCase_ == 6)) { - type_ = build.buf.validate.UInt64Rules.getDefaultInstance(); - } - uint64Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.UInt64Rules, build.buf.validate.UInt64Rules.Builder, build.buf.validate.UInt64RulesOrBuilder>( - (build.buf.validate.UInt64Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 6; - onChanged(); - return uint64Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SInt32Rules, build.buf.validate.SInt32Rules.Builder, build.buf.validate.SInt32RulesOrBuilder> sint32Builder_; - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - * @return Whether the sint32 field is set. - */ - @java.lang.Override - public boolean hasSint32() { - return typeCase_ == 7; - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - * @return The sint32. - */ - @java.lang.Override - public build.buf.validate.SInt32Rules getSint32() { - if (sint32Builder_ == null) { - if (typeCase_ == 7) { - return (build.buf.validate.SInt32Rules) type_; - } - return build.buf.validate.SInt32Rules.getDefaultInstance(); - } else { - if (typeCase_ == 7) { - return sint32Builder_.getMessage(); - } - return build.buf.validate.SInt32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - public Builder setSint32(build.buf.validate.SInt32Rules value) { - if (sint32Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - sint32Builder_.setMessage(value); - } - typeCase_ = 7; - return this; - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - public Builder setSint32( - build.buf.validate.SInt32Rules.Builder builderForValue) { - if (sint32Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - sint32Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 7; - return this; - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - public Builder mergeSint32(build.buf.validate.SInt32Rules value) { - if (sint32Builder_ == null) { - if (typeCase_ == 7 && - type_ != build.buf.validate.SInt32Rules.getDefaultInstance()) { - type_ = build.buf.validate.SInt32Rules.newBuilder((build.buf.validate.SInt32Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 7) { - sint32Builder_.mergeFrom(value); - } else { - sint32Builder_.setMessage(value); - } - } - typeCase_ = 7; - return this; - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - public Builder clearSint32() { - if (sint32Builder_ == null) { - if (typeCase_ == 7) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 7) { - typeCase_ = 0; - type_ = null; - } - sint32Builder_.clear(); - } - return this; - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - public build.buf.validate.SInt32Rules.Builder getSint32Builder() { - return getSint32FieldBuilder().getBuilder(); - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - @java.lang.Override - public build.buf.validate.SInt32RulesOrBuilder getSint32OrBuilder() { - if ((typeCase_ == 7) && (sint32Builder_ != null)) { - return sint32Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 7) { - return (build.buf.validate.SInt32Rules) type_; - } - return build.buf.validate.SInt32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SInt32Rules, build.buf.validate.SInt32Rules.Builder, build.buf.validate.SInt32RulesOrBuilder> - getSint32FieldBuilder() { - if (sint32Builder_ == null) { - if (!(typeCase_ == 7)) { - type_ = build.buf.validate.SInt32Rules.getDefaultInstance(); - } - sint32Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SInt32Rules, build.buf.validate.SInt32Rules.Builder, build.buf.validate.SInt32RulesOrBuilder>( - (build.buf.validate.SInt32Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 7; - onChanged(); - return sint32Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SInt64Rules, build.buf.validate.SInt64Rules.Builder, build.buf.validate.SInt64RulesOrBuilder> sint64Builder_; - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - * @return Whether the sint64 field is set. - */ - @java.lang.Override - public boolean hasSint64() { - return typeCase_ == 8; - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - * @return The sint64. - */ - @java.lang.Override - public build.buf.validate.SInt64Rules getSint64() { - if (sint64Builder_ == null) { - if (typeCase_ == 8) { - return (build.buf.validate.SInt64Rules) type_; - } - return build.buf.validate.SInt64Rules.getDefaultInstance(); - } else { - if (typeCase_ == 8) { - return sint64Builder_.getMessage(); - } - return build.buf.validate.SInt64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - public Builder setSint64(build.buf.validate.SInt64Rules value) { - if (sint64Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - sint64Builder_.setMessage(value); - } - typeCase_ = 8; - return this; - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - public Builder setSint64( - build.buf.validate.SInt64Rules.Builder builderForValue) { - if (sint64Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - sint64Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 8; - return this; - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - public Builder mergeSint64(build.buf.validate.SInt64Rules value) { - if (sint64Builder_ == null) { - if (typeCase_ == 8 && - type_ != build.buf.validate.SInt64Rules.getDefaultInstance()) { - type_ = build.buf.validate.SInt64Rules.newBuilder((build.buf.validate.SInt64Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 8) { - sint64Builder_.mergeFrom(value); - } else { - sint64Builder_.setMessage(value); - } - } - typeCase_ = 8; - return this; - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - public Builder clearSint64() { - if (sint64Builder_ == null) { - if (typeCase_ == 8) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 8) { - typeCase_ = 0; - type_ = null; - } - sint64Builder_.clear(); - } - return this; - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - public build.buf.validate.SInt64Rules.Builder getSint64Builder() { - return getSint64FieldBuilder().getBuilder(); - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - @java.lang.Override - public build.buf.validate.SInt64RulesOrBuilder getSint64OrBuilder() { - if ((typeCase_ == 8) && (sint64Builder_ != null)) { - return sint64Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 8) { - return (build.buf.validate.SInt64Rules) type_; - } - return build.buf.validate.SInt64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SInt64Rules, build.buf.validate.SInt64Rules.Builder, build.buf.validate.SInt64RulesOrBuilder> - getSint64FieldBuilder() { - if (sint64Builder_ == null) { - if (!(typeCase_ == 8)) { - type_ = build.buf.validate.SInt64Rules.getDefaultInstance(); - } - sint64Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SInt64Rules, build.buf.validate.SInt64Rules.Builder, build.buf.validate.SInt64RulesOrBuilder>( - (build.buf.validate.SInt64Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 8; - onChanged(); - return sint64Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Fixed32Rules, build.buf.validate.Fixed32Rules.Builder, build.buf.validate.Fixed32RulesOrBuilder> fixed32Builder_; - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - * @return Whether the fixed32 field is set. - */ - @java.lang.Override - public boolean hasFixed32() { - return typeCase_ == 9; - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - * @return The fixed32. - */ - @java.lang.Override - public build.buf.validate.Fixed32Rules getFixed32() { - if (fixed32Builder_ == null) { - if (typeCase_ == 9) { - return (build.buf.validate.Fixed32Rules) type_; - } - return build.buf.validate.Fixed32Rules.getDefaultInstance(); - } else { - if (typeCase_ == 9) { - return fixed32Builder_.getMessage(); - } - return build.buf.validate.Fixed32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - public Builder setFixed32(build.buf.validate.Fixed32Rules value) { - if (fixed32Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - fixed32Builder_.setMessage(value); - } - typeCase_ = 9; - return this; - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - public Builder setFixed32( - build.buf.validate.Fixed32Rules.Builder builderForValue) { - if (fixed32Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - fixed32Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 9; - return this; - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - public Builder mergeFixed32(build.buf.validate.Fixed32Rules value) { - if (fixed32Builder_ == null) { - if (typeCase_ == 9 && - type_ != build.buf.validate.Fixed32Rules.getDefaultInstance()) { - type_ = build.buf.validate.Fixed32Rules.newBuilder((build.buf.validate.Fixed32Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 9) { - fixed32Builder_.mergeFrom(value); - } else { - fixed32Builder_.setMessage(value); - } - } - typeCase_ = 9; - return this; - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - public Builder clearFixed32() { - if (fixed32Builder_ == null) { - if (typeCase_ == 9) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 9) { - typeCase_ = 0; - type_ = null; - } - fixed32Builder_.clear(); - } - return this; - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - public build.buf.validate.Fixed32Rules.Builder getFixed32Builder() { - return getFixed32FieldBuilder().getBuilder(); - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - @java.lang.Override - public build.buf.validate.Fixed32RulesOrBuilder getFixed32OrBuilder() { - if ((typeCase_ == 9) && (fixed32Builder_ != null)) { - return fixed32Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 9) { - return (build.buf.validate.Fixed32Rules) type_; - } - return build.buf.validate.Fixed32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Fixed32Rules, build.buf.validate.Fixed32Rules.Builder, build.buf.validate.Fixed32RulesOrBuilder> - getFixed32FieldBuilder() { - if (fixed32Builder_ == null) { - if (!(typeCase_ == 9)) { - type_ = build.buf.validate.Fixed32Rules.getDefaultInstance(); - } - fixed32Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Fixed32Rules, build.buf.validate.Fixed32Rules.Builder, build.buf.validate.Fixed32RulesOrBuilder>( - (build.buf.validate.Fixed32Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 9; - onChanged(); - return fixed32Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Fixed64Rules, build.buf.validate.Fixed64Rules.Builder, build.buf.validate.Fixed64RulesOrBuilder> fixed64Builder_; - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - * @return Whether the fixed64 field is set. - */ - @java.lang.Override - public boolean hasFixed64() { - return typeCase_ == 10; - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - * @return The fixed64. - */ - @java.lang.Override - public build.buf.validate.Fixed64Rules getFixed64() { - if (fixed64Builder_ == null) { - if (typeCase_ == 10) { - return (build.buf.validate.Fixed64Rules) type_; - } - return build.buf.validate.Fixed64Rules.getDefaultInstance(); - } else { - if (typeCase_ == 10) { - return fixed64Builder_.getMessage(); - } - return build.buf.validate.Fixed64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - public Builder setFixed64(build.buf.validate.Fixed64Rules value) { - if (fixed64Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - fixed64Builder_.setMessage(value); - } - typeCase_ = 10; - return this; - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - public Builder setFixed64( - build.buf.validate.Fixed64Rules.Builder builderForValue) { - if (fixed64Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - fixed64Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 10; - return this; - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - public Builder mergeFixed64(build.buf.validate.Fixed64Rules value) { - if (fixed64Builder_ == null) { - if (typeCase_ == 10 && - type_ != build.buf.validate.Fixed64Rules.getDefaultInstance()) { - type_ = build.buf.validate.Fixed64Rules.newBuilder((build.buf.validate.Fixed64Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 10) { - fixed64Builder_.mergeFrom(value); - } else { - fixed64Builder_.setMessage(value); - } - } - typeCase_ = 10; - return this; - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - public Builder clearFixed64() { - if (fixed64Builder_ == null) { - if (typeCase_ == 10) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 10) { - typeCase_ = 0; - type_ = null; - } - fixed64Builder_.clear(); - } - return this; - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - public build.buf.validate.Fixed64Rules.Builder getFixed64Builder() { - return getFixed64FieldBuilder().getBuilder(); - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - @java.lang.Override - public build.buf.validate.Fixed64RulesOrBuilder getFixed64OrBuilder() { - if ((typeCase_ == 10) && (fixed64Builder_ != null)) { - return fixed64Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 10) { - return (build.buf.validate.Fixed64Rules) type_; - } - return build.buf.validate.Fixed64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Fixed64Rules, build.buf.validate.Fixed64Rules.Builder, build.buf.validate.Fixed64RulesOrBuilder> - getFixed64FieldBuilder() { - if (fixed64Builder_ == null) { - if (!(typeCase_ == 10)) { - type_ = build.buf.validate.Fixed64Rules.getDefaultInstance(); - } - fixed64Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.Fixed64Rules, build.buf.validate.Fixed64Rules.Builder, build.buf.validate.Fixed64RulesOrBuilder>( - (build.buf.validate.Fixed64Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 10; - onChanged(); - return fixed64Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SFixed32Rules, build.buf.validate.SFixed32Rules.Builder, build.buf.validate.SFixed32RulesOrBuilder> sfixed32Builder_; - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - * @return Whether the sfixed32 field is set. - */ - @java.lang.Override - public boolean hasSfixed32() { - return typeCase_ == 11; - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - * @return The sfixed32. - */ - @java.lang.Override - public build.buf.validate.SFixed32Rules getSfixed32() { - if (sfixed32Builder_ == null) { - if (typeCase_ == 11) { - return (build.buf.validate.SFixed32Rules) type_; - } - return build.buf.validate.SFixed32Rules.getDefaultInstance(); - } else { - if (typeCase_ == 11) { - return sfixed32Builder_.getMessage(); - } - return build.buf.validate.SFixed32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - public Builder setSfixed32(build.buf.validate.SFixed32Rules value) { - if (sfixed32Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - sfixed32Builder_.setMessage(value); - } - typeCase_ = 11; - return this; - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - public Builder setSfixed32( - build.buf.validate.SFixed32Rules.Builder builderForValue) { - if (sfixed32Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - sfixed32Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 11; - return this; - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - public Builder mergeSfixed32(build.buf.validate.SFixed32Rules value) { - if (sfixed32Builder_ == null) { - if (typeCase_ == 11 && - type_ != build.buf.validate.SFixed32Rules.getDefaultInstance()) { - type_ = build.buf.validate.SFixed32Rules.newBuilder((build.buf.validate.SFixed32Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 11) { - sfixed32Builder_.mergeFrom(value); - } else { - sfixed32Builder_.setMessage(value); - } - } - typeCase_ = 11; - return this; - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - public Builder clearSfixed32() { - if (sfixed32Builder_ == null) { - if (typeCase_ == 11) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 11) { - typeCase_ = 0; - type_ = null; - } - sfixed32Builder_.clear(); - } - return this; - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - public build.buf.validate.SFixed32Rules.Builder getSfixed32Builder() { - return getSfixed32FieldBuilder().getBuilder(); - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - @java.lang.Override - public build.buf.validate.SFixed32RulesOrBuilder getSfixed32OrBuilder() { - if ((typeCase_ == 11) && (sfixed32Builder_ != null)) { - return sfixed32Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 11) { - return (build.buf.validate.SFixed32Rules) type_; - } - return build.buf.validate.SFixed32Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SFixed32Rules, build.buf.validate.SFixed32Rules.Builder, build.buf.validate.SFixed32RulesOrBuilder> - getSfixed32FieldBuilder() { - if (sfixed32Builder_ == null) { - if (!(typeCase_ == 11)) { - type_ = build.buf.validate.SFixed32Rules.getDefaultInstance(); - } - sfixed32Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SFixed32Rules, build.buf.validate.SFixed32Rules.Builder, build.buf.validate.SFixed32RulesOrBuilder>( - (build.buf.validate.SFixed32Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 11; - onChanged(); - return sfixed32Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SFixed64Rules, build.buf.validate.SFixed64Rules.Builder, build.buf.validate.SFixed64RulesOrBuilder> sfixed64Builder_; - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - * @return Whether the sfixed64 field is set. - */ - @java.lang.Override - public boolean hasSfixed64() { - return typeCase_ == 12; - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - * @return The sfixed64. - */ - @java.lang.Override - public build.buf.validate.SFixed64Rules getSfixed64() { - if (sfixed64Builder_ == null) { - if (typeCase_ == 12) { - return (build.buf.validate.SFixed64Rules) type_; - } - return build.buf.validate.SFixed64Rules.getDefaultInstance(); - } else { - if (typeCase_ == 12) { - return sfixed64Builder_.getMessage(); - } - return build.buf.validate.SFixed64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - public Builder setSfixed64(build.buf.validate.SFixed64Rules value) { - if (sfixed64Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - sfixed64Builder_.setMessage(value); - } - typeCase_ = 12; - return this; - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - public Builder setSfixed64( - build.buf.validate.SFixed64Rules.Builder builderForValue) { - if (sfixed64Builder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - sfixed64Builder_.setMessage(builderForValue.build()); - } - typeCase_ = 12; - return this; - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - public Builder mergeSfixed64(build.buf.validate.SFixed64Rules value) { - if (sfixed64Builder_ == null) { - if (typeCase_ == 12 && - type_ != build.buf.validate.SFixed64Rules.getDefaultInstance()) { - type_ = build.buf.validate.SFixed64Rules.newBuilder((build.buf.validate.SFixed64Rules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 12) { - sfixed64Builder_.mergeFrom(value); - } else { - sfixed64Builder_.setMessage(value); - } - } - typeCase_ = 12; - return this; - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - public Builder clearSfixed64() { - if (sfixed64Builder_ == null) { - if (typeCase_ == 12) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 12) { - typeCase_ = 0; - type_ = null; - } - sfixed64Builder_.clear(); - } - return this; - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - public build.buf.validate.SFixed64Rules.Builder getSfixed64Builder() { - return getSfixed64FieldBuilder().getBuilder(); - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - @java.lang.Override - public build.buf.validate.SFixed64RulesOrBuilder getSfixed64OrBuilder() { - if ((typeCase_ == 12) && (sfixed64Builder_ != null)) { - return sfixed64Builder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 12) { - return (build.buf.validate.SFixed64Rules) type_; - } - return build.buf.validate.SFixed64Rules.getDefaultInstance(); - } - } - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SFixed64Rules, build.buf.validate.SFixed64Rules.Builder, build.buf.validate.SFixed64RulesOrBuilder> - getSfixed64FieldBuilder() { - if (sfixed64Builder_ == null) { - if (!(typeCase_ == 12)) { - type_ = build.buf.validate.SFixed64Rules.getDefaultInstance(); - } - sfixed64Builder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.SFixed64Rules, build.buf.validate.SFixed64Rules.Builder, build.buf.validate.SFixed64RulesOrBuilder>( - (build.buf.validate.SFixed64Rules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 12; - onChanged(); - return sfixed64Builder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.BoolRules, build.buf.validate.BoolRules.Builder, build.buf.validate.BoolRulesOrBuilder> boolBuilder_; - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - * @return Whether the bool field is set. - */ - @java.lang.Override - public boolean hasBool() { - return typeCase_ == 13; - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - * @return The bool. - */ - @java.lang.Override - public build.buf.validate.BoolRules getBool() { - if (boolBuilder_ == null) { - if (typeCase_ == 13) { - return (build.buf.validate.BoolRules) type_; - } - return build.buf.validate.BoolRules.getDefaultInstance(); - } else { - if (typeCase_ == 13) { - return boolBuilder_.getMessage(); - } - return build.buf.validate.BoolRules.getDefaultInstance(); - } - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - public Builder setBool(build.buf.validate.BoolRules value) { - if (boolBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - boolBuilder_.setMessage(value); - } - typeCase_ = 13; - return this; - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - public Builder setBool( - build.buf.validate.BoolRules.Builder builderForValue) { - if (boolBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - boolBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 13; - return this; - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - public Builder mergeBool(build.buf.validate.BoolRules value) { - if (boolBuilder_ == null) { - if (typeCase_ == 13 && - type_ != build.buf.validate.BoolRules.getDefaultInstance()) { - type_ = build.buf.validate.BoolRules.newBuilder((build.buf.validate.BoolRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 13) { - boolBuilder_.mergeFrom(value); - } else { - boolBuilder_.setMessage(value); - } - } - typeCase_ = 13; - return this; - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - public Builder clearBool() { - if (boolBuilder_ == null) { - if (typeCase_ == 13) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 13) { - typeCase_ = 0; - type_ = null; - } - boolBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - public build.buf.validate.BoolRules.Builder getBoolBuilder() { - return getBoolFieldBuilder().getBuilder(); - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - @java.lang.Override - public build.buf.validate.BoolRulesOrBuilder getBoolOrBuilder() { - if ((typeCase_ == 13) && (boolBuilder_ != null)) { - return boolBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 13) { - return (build.buf.validate.BoolRules) type_; - } - return build.buf.validate.BoolRules.getDefaultInstance(); - } - } - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.BoolRules, build.buf.validate.BoolRules.Builder, build.buf.validate.BoolRulesOrBuilder> - getBoolFieldBuilder() { - if (boolBuilder_ == null) { - if (!(typeCase_ == 13)) { - type_ = build.buf.validate.BoolRules.getDefaultInstance(); - } - boolBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.BoolRules, build.buf.validate.BoolRules.Builder, build.buf.validate.BoolRulesOrBuilder>( - (build.buf.validate.BoolRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 13; - onChanged(); - return boolBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.StringRules, build.buf.validate.StringRules.Builder, build.buf.validate.StringRulesOrBuilder> stringBuilder_; - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - * @return Whether the string field is set. - */ - @java.lang.Override - public boolean hasString() { - return typeCase_ == 14; - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - * @return The string. - */ - @java.lang.Override - public build.buf.validate.StringRules getString() { - if (stringBuilder_ == null) { - if (typeCase_ == 14) { - return (build.buf.validate.StringRules) type_; - } - return build.buf.validate.StringRules.getDefaultInstance(); - } else { - if (typeCase_ == 14) { - return stringBuilder_.getMessage(); - } - return build.buf.validate.StringRules.getDefaultInstance(); - } - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - public Builder setString(build.buf.validate.StringRules value) { - if (stringBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - stringBuilder_.setMessage(value); - } - typeCase_ = 14; - return this; - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - public Builder setString( - build.buf.validate.StringRules.Builder builderForValue) { - if (stringBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - stringBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 14; - return this; - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - public Builder mergeString(build.buf.validate.StringRules value) { - if (stringBuilder_ == null) { - if (typeCase_ == 14 && - type_ != build.buf.validate.StringRules.getDefaultInstance()) { - type_ = build.buf.validate.StringRules.newBuilder((build.buf.validate.StringRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 14) { - stringBuilder_.mergeFrom(value); - } else { - stringBuilder_.setMessage(value); - } - } - typeCase_ = 14; - return this; - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - public Builder clearString() { - if (stringBuilder_ == null) { - if (typeCase_ == 14) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 14) { - typeCase_ = 0; - type_ = null; - } - stringBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - public build.buf.validate.StringRules.Builder getStringBuilder() { - return getStringFieldBuilder().getBuilder(); - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - @java.lang.Override - public build.buf.validate.StringRulesOrBuilder getStringOrBuilder() { - if ((typeCase_ == 14) && (stringBuilder_ != null)) { - return stringBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 14) { - return (build.buf.validate.StringRules) type_; - } - return build.buf.validate.StringRules.getDefaultInstance(); - } - } - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.StringRules, build.buf.validate.StringRules.Builder, build.buf.validate.StringRulesOrBuilder> - getStringFieldBuilder() { - if (stringBuilder_ == null) { - if (!(typeCase_ == 14)) { - type_ = build.buf.validate.StringRules.getDefaultInstance(); - } - stringBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.StringRules, build.buf.validate.StringRules.Builder, build.buf.validate.StringRulesOrBuilder>( - (build.buf.validate.StringRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 14; - onChanged(); - return stringBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.BytesRules, build.buf.validate.BytesRules.Builder, build.buf.validate.BytesRulesOrBuilder> bytesBuilder_; - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - * @return Whether the bytes field is set. - */ - @java.lang.Override - public boolean hasBytes() { - return typeCase_ == 15; - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - * @return The bytes. - */ - @java.lang.Override - public build.buf.validate.BytesRules getBytes() { - if (bytesBuilder_ == null) { - if (typeCase_ == 15) { - return (build.buf.validate.BytesRules) type_; - } - return build.buf.validate.BytesRules.getDefaultInstance(); - } else { - if (typeCase_ == 15) { - return bytesBuilder_.getMessage(); - } - return build.buf.validate.BytesRules.getDefaultInstance(); - } - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - public Builder setBytes(build.buf.validate.BytesRules value) { - if (bytesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - bytesBuilder_.setMessage(value); - } - typeCase_ = 15; - return this; - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - public Builder setBytes( - build.buf.validate.BytesRules.Builder builderForValue) { - if (bytesBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - bytesBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 15; - return this; - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - public Builder mergeBytes(build.buf.validate.BytesRules value) { - if (bytesBuilder_ == null) { - if (typeCase_ == 15 && - type_ != build.buf.validate.BytesRules.getDefaultInstance()) { - type_ = build.buf.validate.BytesRules.newBuilder((build.buf.validate.BytesRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 15) { - bytesBuilder_.mergeFrom(value); - } else { - bytesBuilder_.setMessage(value); - } - } - typeCase_ = 15; - return this; - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - public Builder clearBytes() { - if (bytesBuilder_ == null) { - if (typeCase_ == 15) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 15) { - typeCase_ = 0; - type_ = null; - } - bytesBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - public build.buf.validate.BytesRules.Builder getBytesBuilder() { - return getBytesFieldBuilder().getBuilder(); - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - @java.lang.Override - public build.buf.validate.BytesRulesOrBuilder getBytesOrBuilder() { - if ((typeCase_ == 15) && (bytesBuilder_ != null)) { - return bytesBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 15) { - return (build.buf.validate.BytesRules) type_; - } - return build.buf.validate.BytesRules.getDefaultInstance(); - } - } - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.BytesRules, build.buf.validate.BytesRules.Builder, build.buf.validate.BytesRulesOrBuilder> - getBytesFieldBuilder() { - if (bytesBuilder_ == null) { - if (!(typeCase_ == 15)) { - type_ = build.buf.validate.BytesRules.getDefaultInstance(); - } - bytesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.BytesRules, build.buf.validate.BytesRules.Builder, build.buf.validate.BytesRulesOrBuilder>( - (build.buf.validate.BytesRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 15; - onChanged(); - return bytesBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.EnumRules, build.buf.validate.EnumRules.Builder, build.buf.validate.EnumRulesOrBuilder> enumBuilder_; - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - * @return Whether the enum field is set. - */ - @java.lang.Override - public boolean hasEnum() { - return typeCase_ == 16; - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - * @return The enum. - */ - @java.lang.Override - public build.buf.validate.EnumRules getEnum() { - if (enumBuilder_ == null) { - if (typeCase_ == 16) { - return (build.buf.validate.EnumRules) type_; - } - return build.buf.validate.EnumRules.getDefaultInstance(); - } else { - if (typeCase_ == 16) { - return enumBuilder_.getMessage(); - } - return build.buf.validate.EnumRules.getDefaultInstance(); - } - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - public Builder setEnum(build.buf.validate.EnumRules value) { - if (enumBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - enumBuilder_.setMessage(value); - } - typeCase_ = 16; - return this; - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - public Builder setEnum( - build.buf.validate.EnumRules.Builder builderForValue) { - if (enumBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - enumBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 16; - return this; - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - public Builder mergeEnum(build.buf.validate.EnumRules value) { - if (enumBuilder_ == null) { - if (typeCase_ == 16 && - type_ != build.buf.validate.EnumRules.getDefaultInstance()) { - type_ = build.buf.validate.EnumRules.newBuilder((build.buf.validate.EnumRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 16) { - enumBuilder_.mergeFrom(value); - } else { - enumBuilder_.setMessage(value); - } - } - typeCase_ = 16; - return this; - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - public Builder clearEnum() { - if (enumBuilder_ == null) { - if (typeCase_ == 16) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 16) { - typeCase_ = 0; - type_ = null; - } - enumBuilder_.clear(); - } - return this; - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - public build.buf.validate.EnumRules.Builder getEnumBuilder() { - return getEnumFieldBuilder().getBuilder(); - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - @java.lang.Override - public build.buf.validate.EnumRulesOrBuilder getEnumOrBuilder() { - if ((typeCase_ == 16) && (enumBuilder_ != null)) { - return enumBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 16) { - return (build.buf.validate.EnumRules) type_; - } - return build.buf.validate.EnumRules.getDefaultInstance(); - } - } - /** - *
-     * Complex Field Types
-     * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.EnumRules, build.buf.validate.EnumRules.Builder, build.buf.validate.EnumRulesOrBuilder> - getEnumFieldBuilder() { - if (enumBuilder_ == null) { - if (!(typeCase_ == 16)) { - type_ = build.buf.validate.EnumRules.getDefaultInstance(); - } - enumBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.EnumRules, build.buf.validate.EnumRules.Builder, build.buf.validate.EnumRulesOrBuilder>( - (build.buf.validate.EnumRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 16; - onChanged(); - return enumBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.RepeatedRules, build.buf.validate.RepeatedRules.Builder, build.buf.validate.RepeatedRulesOrBuilder> repeatedBuilder_; - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - * @return Whether the repeated field is set. - */ - @java.lang.Override - public boolean hasRepeated() { - return typeCase_ == 18; - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - * @return The repeated. - */ - @java.lang.Override - public build.buf.validate.RepeatedRules getRepeated() { - if (repeatedBuilder_ == null) { - if (typeCase_ == 18) { - return (build.buf.validate.RepeatedRules) type_; - } - return build.buf.validate.RepeatedRules.getDefaultInstance(); - } else { - if (typeCase_ == 18) { - return repeatedBuilder_.getMessage(); - } - return build.buf.validate.RepeatedRules.getDefaultInstance(); - } - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - public Builder setRepeated(build.buf.validate.RepeatedRules value) { - if (repeatedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - repeatedBuilder_.setMessage(value); - } - typeCase_ = 18; - return this; - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - public Builder setRepeated( - build.buf.validate.RepeatedRules.Builder builderForValue) { - if (repeatedBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - repeatedBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 18; - return this; - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - public Builder mergeRepeated(build.buf.validate.RepeatedRules value) { - if (repeatedBuilder_ == null) { - if (typeCase_ == 18 && - type_ != build.buf.validate.RepeatedRules.getDefaultInstance()) { - type_ = build.buf.validate.RepeatedRules.newBuilder((build.buf.validate.RepeatedRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 18) { - repeatedBuilder_.mergeFrom(value); - } else { - repeatedBuilder_.setMessage(value); - } - } - typeCase_ = 18; - return this; - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - public Builder clearRepeated() { - if (repeatedBuilder_ == null) { - if (typeCase_ == 18) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 18) { - typeCase_ = 0; - type_ = null; - } - repeatedBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - public build.buf.validate.RepeatedRules.Builder getRepeatedBuilder() { - return getRepeatedFieldBuilder().getBuilder(); - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - @java.lang.Override - public build.buf.validate.RepeatedRulesOrBuilder getRepeatedOrBuilder() { - if ((typeCase_ == 18) && (repeatedBuilder_ != null)) { - return repeatedBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 18) { - return (build.buf.validate.RepeatedRules) type_; - } - return build.buf.validate.RepeatedRules.getDefaultInstance(); - } - } - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.RepeatedRules, build.buf.validate.RepeatedRules.Builder, build.buf.validate.RepeatedRulesOrBuilder> - getRepeatedFieldBuilder() { - if (repeatedBuilder_ == null) { - if (!(typeCase_ == 18)) { - type_ = build.buf.validate.RepeatedRules.getDefaultInstance(); - } - repeatedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.RepeatedRules, build.buf.validate.RepeatedRules.Builder, build.buf.validate.RepeatedRulesOrBuilder>( - (build.buf.validate.RepeatedRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 18; - onChanged(); - return repeatedBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.MapRules, build.buf.validate.MapRules.Builder, build.buf.validate.MapRulesOrBuilder> mapBuilder_; - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - * @return Whether the map field is set. - */ - @java.lang.Override - public boolean hasMap() { - return typeCase_ == 19; - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - * @return The map. - */ - @java.lang.Override - public build.buf.validate.MapRules getMap() { - if (mapBuilder_ == null) { - if (typeCase_ == 19) { - return (build.buf.validate.MapRules) type_; - } - return build.buf.validate.MapRules.getDefaultInstance(); - } else { - if (typeCase_ == 19) { - return mapBuilder_.getMessage(); - } - return build.buf.validate.MapRules.getDefaultInstance(); - } - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - public Builder setMap(build.buf.validate.MapRules value) { - if (mapBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - mapBuilder_.setMessage(value); - } - typeCase_ = 19; - return this; - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - public Builder setMap( - build.buf.validate.MapRules.Builder builderForValue) { - if (mapBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - mapBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 19; - return this; - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - public Builder mergeMap(build.buf.validate.MapRules value) { - if (mapBuilder_ == null) { - if (typeCase_ == 19 && - type_ != build.buf.validate.MapRules.getDefaultInstance()) { - type_ = build.buf.validate.MapRules.newBuilder((build.buf.validate.MapRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 19) { - mapBuilder_.mergeFrom(value); - } else { - mapBuilder_.setMessage(value); - } - } - typeCase_ = 19; - return this; - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - public Builder clearMap() { - if (mapBuilder_ == null) { - if (typeCase_ == 19) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 19) { - typeCase_ = 0; - type_ = null; - } - mapBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - public build.buf.validate.MapRules.Builder getMapBuilder() { - return getMapFieldBuilder().getBuilder(); - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - @java.lang.Override - public build.buf.validate.MapRulesOrBuilder getMapOrBuilder() { - if ((typeCase_ == 19) && (mapBuilder_ != null)) { - return mapBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 19) { - return (build.buf.validate.MapRules) type_; - } - return build.buf.validate.MapRules.getDefaultInstance(); - } - } - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.MapRules, build.buf.validate.MapRules.Builder, build.buf.validate.MapRulesOrBuilder> - getMapFieldBuilder() { - if (mapBuilder_ == null) { - if (!(typeCase_ == 19)) { - type_ = build.buf.validate.MapRules.getDefaultInstance(); - } - mapBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.MapRules, build.buf.validate.MapRules.Builder, build.buf.validate.MapRulesOrBuilder>( - (build.buf.validate.MapRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 19; - onChanged(); - return mapBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.AnyRules, build.buf.validate.AnyRules.Builder, build.buf.validate.AnyRulesOrBuilder> anyBuilder_; - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - * @return Whether the any field is set. - */ - @java.lang.Override - public boolean hasAny() { - return typeCase_ == 20; - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - * @return The any. - */ - @java.lang.Override - public build.buf.validate.AnyRules getAny() { - if (anyBuilder_ == null) { - if (typeCase_ == 20) { - return (build.buf.validate.AnyRules) type_; - } - return build.buf.validate.AnyRules.getDefaultInstance(); - } else { - if (typeCase_ == 20) { - return anyBuilder_.getMessage(); - } - return build.buf.validate.AnyRules.getDefaultInstance(); - } - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - public Builder setAny(build.buf.validate.AnyRules value) { - if (anyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - anyBuilder_.setMessage(value); - } - typeCase_ = 20; - return this; - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - public Builder setAny( - build.buf.validate.AnyRules.Builder builderForValue) { - if (anyBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - anyBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 20; - return this; - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - public Builder mergeAny(build.buf.validate.AnyRules value) { - if (anyBuilder_ == null) { - if (typeCase_ == 20 && - type_ != build.buf.validate.AnyRules.getDefaultInstance()) { - type_ = build.buf.validate.AnyRules.newBuilder((build.buf.validate.AnyRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 20) { - anyBuilder_.mergeFrom(value); - } else { - anyBuilder_.setMessage(value); - } - } - typeCase_ = 20; - return this; - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - public Builder clearAny() { - if (anyBuilder_ == null) { - if (typeCase_ == 20) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 20) { - typeCase_ = 0; - type_ = null; - } - anyBuilder_.clear(); - } - return this; - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - public build.buf.validate.AnyRules.Builder getAnyBuilder() { - return getAnyFieldBuilder().getBuilder(); - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - @java.lang.Override - public build.buf.validate.AnyRulesOrBuilder getAnyOrBuilder() { - if ((typeCase_ == 20) && (anyBuilder_ != null)) { - return anyBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 20) { - return (build.buf.validate.AnyRules) type_; - } - return build.buf.validate.AnyRules.getDefaultInstance(); - } - } - /** - *
-     * Well-Known Field Types
-     * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.AnyRules, build.buf.validate.AnyRules.Builder, build.buf.validate.AnyRulesOrBuilder> - getAnyFieldBuilder() { - if (anyBuilder_ == null) { - if (!(typeCase_ == 20)) { - type_ = build.buf.validate.AnyRules.getDefaultInstance(); - } - anyBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.AnyRules, build.buf.validate.AnyRules.Builder, build.buf.validate.AnyRulesOrBuilder>( - (build.buf.validate.AnyRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 20; - onChanged(); - return anyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.DurationRules, build.buf.validate.DurationRules.Builder, build.buf.validate.DurationRulesOrBuilder> durationBuilder_; - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - * @return Whether the duration field is set. - */ - @java.lang.Override - public boolean hasDuration() { - return typeCase_ == 21; - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - * @return The duration. - */ - @java.lang.Override - public build.buf.validate.DurationRules getDuration() { - if (durationBuilder_ == null) { - if (typeCase_ == 21) { - return (build.buf.validate.DurationRules) type_; - } - return build.buf.validate.DurationRules.getDefaultInstance(); - } else { - if (typeCase_ == 21) { - return durationBuilder_.getMessage(); - } - return build.buf.validate.DurationRules.getDefaultInstance(); - } - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - public Builder setDuration(build.buf.validate.DurationRules value) { - if (durationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - durationBuilder_.setMessage(value); - } - typeCase_ = 21; - return this; - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - public Builder setDuration( - build.buf.validate.DurationRules.Builder builderForValue) { - if (durationBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - durationBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 21; - return this; - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - public Builder mergeDuration(build.buf.validate.DurationRules value) { - if (durationBuilder_ == null) { - if (typeCase_ == 21 && - type_ != build.buf.validate.DurationRules.getDefaultInstance()) { - type_ = build.buf.validate.DurationRules.newBuilder((build.buf.validate.DurationRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 21) { - durationBuilder_.mergeFrom(value); - } else { - durationBuilder_.setMessage(value); - } - } - typeCase_ = 21; - return this; - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - public Builder clearDuration() { - if (durationBuilder_ == null) { - if (typeCase_ == 21) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 21) { - typeCase_ = 0; - type_ = null; - } - durationBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - public build.buf.validate.DurationRules.Builder getDurationBuilder() { - return getDurationFieldBuilder().getBuilder(); - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - @java.lang.Override - public build.buf.validate.DurationRulesOrBuilder getDurationOrBuilder() { - if ((typeCase_ == 21) && (durationBuilder_ != null)) { - return durationBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 21) { - return (build.buf.validate.DurationRules) type_; - } - return build.buf.validate.DurationRules.getDefaultInstance(); - } - } - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.DurationRules, build.buf.validate.DurationRules.Builder, build.buf.validate.DurationRulesOrBuilder> - getDurationFieldBuilder() { - if (durationBuilder_ == null) { - if (!(typeCase_ == 21)) { - type_ = build.buf.validate.DurationRules.getDefaultInstance(); - } - durationBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.DurationRules, build.buf.validate.DurationRules.Builder, build.buf.validate.DurationRulesOrBuilder>( - (build.buf.validate.DurationRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 21; - onChanged(); - return durationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.TimestampRules, build.buf.validate.TimestampRules.Builder, build.buf.validate.TimestampRulesOrBuilder> timestampBuilder_; - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return typeCase_ == 22; - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - * @return The timestamp. - */ - @java.lang.Override - public build.buf.validate.TimestampRules getTimestamp() { - if (timestampBuilder_ == null) { - if (typeCase_ == 22) { - return (build.buf.validate.TimestampRules) type_; - } - return build.buf.validate.TimestampRules.getDefaultInstance(); - } else { - if (typeCase_ == 22) { - return timestampBuilder_.getMessage(); - } - return build.buf.validate.TimestampRules.getDefaultInstance(); - } - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - public Builder setTimestamp(build.buf.validate.TimestampRules value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - typeCase_ = 22; - return this; - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - public Builder setTimestamp( - build.buf.validate.TimestampRules.Builder builderForValue) { - if (timestampBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 22; - return this; - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - public Builder mergeTimestamp(build.buf.validate.TimestampRules value) { - if (timestampBuilder_ == null) { - if (typeCase_ == 22 && - type_ != build.buf.validate.TimestampRules.getDefaultInstance()) { - type_ = build.buf.validate.TimestampRules.newBuilder((build.buf.validate.TimestampRules) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 22) { - timestampBuilder_.mergeFrom(value); - } else { - timestampBuilder_.setMessage(value); - } - } - typeCase_ = 22; - return this; - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - if (typeCase_ == 22) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 22) { - typeCase_ = 0; - type_ = null; - } - timestampBuilder_.clear(); - } - return this; - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - public build.buf.validate.TimestampRules.Builder getTimestampBuilder() { - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - @java.lang.Override - public build.buf.validate.TimestampRulesOrBuilder getTimestampOrBuilder() { - if ((typeCase_ == 22) && (timestampBuilder_ != null)) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 22) { - return (build.buf.validate.TimestampRules) type_; - } - return build.buf.validate.TimestampRules.getDefaultInstance(); - } - } - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.TimestampRules, build.buf.validate.TimestampRules.Builder, build.buf.validate.TimestampRulesOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - if (!(typeCase_ == 22)) { - type_ = build.buf.validate.TimestampRules.getDefaultInstance(); - } - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.TimestampRules, build.buf.validate.TimestampRules.Builder, build.buf.validate.TimestampRulesOrBuilder>( - (build.buf.validate.TimestampRules) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 22; - onChanged(); - return timestampBuilder_; - } - - private boolean skipped_ ; - /** - *
-     * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return Whether the skipped field is set. - */ - @java.lang.Override - @java.lang.Deprecated public boolean hasSkipped() { - return ((bitField0_ & 0x01000000) != 0); - } - /** - *
-     * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return The skipped. - */ - @java.lang.Override - @java.lang.Deprecated public boolean getSkipped() { - return skipped_; - } - /** - *
-     * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @param value The skipped to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder setSkipped(boolean value) { - - skipped_ = value; - bitField0_ |= 0x01000000; - onChanged(); - return this; - } - /** - *
-     * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder clearSkipped() { - bitField0_ = (bitField0_ & ~0x01000000); - skipped_ = false; - onChanged(); - return this; - } - - private boolean ignoreEmpty_ ; - /** - *
-     * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return Whether the ignoreEmpty field is set. - */ - @java.lang.Override - @java.lang.Deprecated public boolean hasIgnoreEmpty() { - return ((bitField0_ & 0x02000000) != 0); - } - /** - *
-     * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return The ignoreEmpty. - */ - @java.lang.Override - @java.lang.Deprecated public boolean getIgnoreEmpty() { - return ignoreEmpty_; - } - /** - *
-     * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @param value The ignoreEmpty to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder setIgnoreEmpty(boolean value) { - - ignoreEmpty_ = value; - bitField0_ |= 0x02000000; - onChanged(); - return this; - } - /** - *
-     * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-     * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder clearIgnoreEmpty() { - bitField0_ = (bitField0_ & ~0x02000000); - ignoreEmpty_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.FieldConstraints) - } - - // @@protoc_insertion_point(class_scope:buf.validate.FieldConstraints) - private static final build.buf.validate.FieldConstraints DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.FieldConstraints(); - } - - public static build.buf.validate.FieldConstraints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FieldConstraints 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.FieldConstraints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/FieldConstraintsOrBuilder.java b/src/main/java/build/buf/validate/FieldConstraintsOrBuilder.java deleted file mode 100644 index 5a14e8a8..00000000 --- a/src/main/java/build/buf/validate/FieldConstraintsOrBuilder.java +++ /dev/null @@ -1,613 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface FieldConstraintsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.FieldConstraints) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - java.util.List - getCelList(); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - build.buf.validate.Constraint getCel(int index); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - int getCelCount(); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - java.util.List - getCelOrBuilderList(); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.field).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 23 [json_name = "cel"]; - */ - build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index); - - /** - *
-   * If `required` is true, the field must be populated. A populated field can be
-   * described as "serialized in the wire format," which includes:
-   *
-   * - the following "nullable" fields must be explicitly set to be considered populated:
-   * - singular message fields (whose fields may be unpopulated/default values)
-   * - member fields of a oneof (may be their default value)
-   * - proto3 optional fields (may be their default value)
-   * - proto2 scalar fields (both optional and required)
-   * - proto3 scalar fields must be non-zero to be considered populated
-   * - repeated and map fields must be non-empty to be considered populated
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be set to a non-null value.
-   * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-   * }
-   * ```
-   * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return Whether the required field is set. - */ - boolean hasRequired(); - /** - *
-   * If `required` is true, the field must be populated. A populated field can be
-   * described as "serialized in the wire format," which includes:
-   *
-   * - the following "nullable" fields must be explicitly set to be considered populated:
-   * - singular message fields (whose fields may be unpopulated/default values)
-   * - member fields of a oneof (may be their default value)
-   * - proto3 optional fields (may be their default value)
-   * - proto2 scalar fields (both optional and required)
-   * - proto3 scalar fields must be non-zero to be considered populated
-   * - repeated and map fields must be non-empty to be considered populated
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be set to a non-null value.
-   * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
-   * }
-   * ```
-   * 
- * - * optional bool required = 25 [json_name = "required"]; - * @return The required. - */ - boolean getRequired(); - - /** - *
-   * Skip validation on the field if its value matches the specified criteria.
-   * See Ignore enum for details.
-   *
-   * ```proto
-   * message UpdateRequest {
-   * // The uri rule only applies if the field is populated and not an empty
-   * // string.
-   * optional string url = 1 [
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-   * (buf.validate.field).string.uri = true,
-   * ];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return Whether the ignore field is set. - */ - boolean hasIgnore(); - /** - *
-   * Skip validation on the field if its value matches the specified criteria.
-   * See Ignore enum for details.
-   *
-   * ```proto
-   * message UpdateRequest {
-   * // The uri rule only applies if the field is populated and not an empty
-   * // string.
-   * optional string url = 1 [
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
-   * (buf.validate.field).string.uri = true,
-   * ];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.Ignore ignore = 27 [json_name = "ignore"]; - * @return The ignore. - */ - build.buf.validate.Ignore getIgnore(); - - /** - *
-   * Scalar Field Types
-   * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - * @return Whether the float field is set. - */ - boolean hasFloat(); - /** - *
-   * Scalar Field Types
-   * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - * @return The float. - */ - build.buf.validate.FloatRules getFloat(); - /** - *
-   * Scalar Field Types
-   * 
- * - * .buf.validate.FloatRules float = 1 [json_name = "float"]; - */ - build.buf.validate.FloatRulesOrBuilder getFloatOrBuilder(); - - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - * @return Whether the double field is set. - */ - boolean hasDouble(); - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - * @return The double. - */ - build.buf.validate.DoubleRules getDouble(); - /** - * .buf.validate.DoubleRules double = 2 [json_name = "double"]; - */ - build.buf.validate.DoubleRulesOrBuilder getDoubleOrBuilder(); - - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - * @return Whether the int32 field is set. - */ - boolean hasInt32(); - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - * @return The int32. - */ - build.buf.validate.Int32Rules getInt32(); - /** - * .buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; - */ - build.buf.validate.Int32RulesOrBuilder getInt32OrBuilder(); - - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - * @return Whether the int64 field is set. - */ - boolean hasInt64(); - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - * @return The int64. - */ - build.buf.validate.Int64Rules getInt64(); - /** - * .buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; - */ - build.buf.validate.Int64RulesOrBuilder getInt64OrBuilder(); - - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - * @return Whether the uint32 field is set. - */ - boolean hasUint32(); - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - * @return The uint32. - */ - build.buf.validate.UInt32Rules getUint32(); - /** - * .buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; - */ - build.buf.validate.UInt32RulesOrBuilder getUint32OrBuilder(); - - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - * @return Whether the uint64 field is set. - */ - boolean hasUint64(); - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - * @return The uint64. - */ - build.buf.validate.UInt64Rules getUint64(); - /** - * .buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; - */ - build.buf.validate.UInt64RulesOrBuilder getUint64OrBuilder(); - - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - * @return Whether the sint32 field is set. - */ - boolean hasSint32(); - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - * @return The sint32. - */ - build.buf.validate.SInt32Rules getSint32(); - /** - * .buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; - */ - build.buf.validate.SInt32RulesOrBuilder getSint32OrBuilder(); - - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - * @return Whether the sint64 field is set. - */ - boolean hasSint64(); - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - * @return The sint64. - */ - build.buf.validate.SInt64Rules getSint64(); - /** - * .buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; - */ - build.buf.validate.SInt64RulesOrBuilder getSint64OrBuilder(); - - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - * @return Whether the fixed32 field is set. - */ - boolean hasFixed32(); - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - * @return The fixed32. - */ - build.buf.validate.Fixed32Rules getFixed32(); - /** - * .buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; - */ - build.buf.validate.Fixed32RulesOrBuilder getFixed32OrBuilder(); - - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - * @return Whether the fixed64 field is set. - */ - boolean hasFixed64(); - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - * @return The fixed64. - */ - build.buf.validate.Fixed64Rules getFixed64(); - /** - * .buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; - */ - build.buf.validate.Fixed64RulesOrBuilder getFixed64OrBuilder(); - - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - * @return Whether the sfixed32 field is set. - */ - boolean hasSfixed32(); - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - * @return The sfixed32. - */ - build.buf.validate.SFixed32Rules getSfixed32(); - /** - * .buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; - */ - build.buf.validate.SFixed32RulesOrBuilder getSfixed32OrBuilder(); - - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - * @return Whether the sfixed64 field is set. - */ - boolean hasSfixed64(); - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - * @return The sfixed64. - */ - build.buf.validate.SFixed64Rules getSfixed64(); - /** - * .buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; - */ - build.buf.validate.SFixed64RulesOrBuilder getSfixed64OrBuilder(); - - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - * @return Whether the bool field is set. - */ - boolean hasBool(); - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - * @return The bool. - */ - build.buf.validate.BoolRules getBool(); - /** - * .buf.validate.BoolRules bool = 13 [json_name = "bool"]; - */ - build.buf.validate.BoolRulesOrBuilder getBoolOrBuilder(); - - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - * @return Whether the string field is set. - */ - boolean hasString(); - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - * @return The string. - */ - build.buf.validate.StringRules getString(); - /** - * .buf.validate.StringRules string = 14 [json_name = "string"]; - */ - build.buf.validate.StringRulesOrBuilder getStringOrBuilder(); - - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - * @return Whether the bytes field is set. - */ - boolean hasBytes(); - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - * @return The bytes. - */ - build.buf.validate.BytesRules getBytes(); - /** - * .buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; - */ - build.buf.validate.BytesRulesOrBuilder getBytesOrBuilder(); - - /** - *
-   * Complex Field Types
-   * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - * @return Whether the enum field is set. - */ - boolean hasEnum(); - /** - *
-   * Complex Field Types
-   * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - * @return The enum. - */ - build.buf.validate.EnumRules getEnum(); - /** - *
-   * Complex Field Types
-   * 
- * - * .buf.validate.EnumRules enum = 16 [json_name = "enum"]; - */ - build.buf.validate.EnumRulesOrBuilder getEnumOrBuilder(); - - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - * @return Whether the repeated field is set. - */ - boolean hasRepeated(); - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - * @return The repeated. - */ - build.buf.validate.RepeatedRules getRepeated(); - /** - * .buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; - */ - build.buf.validate.RepeatedRulesOrBuilder getRepeatedOrBuilder(); - - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - * @return Whether the map field is set. - */ - boolean hasMap(); - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - * @return The map. - */ - build.buf.validate.MapRules getMap(); - /** - * .buf.validate.MapRules map = 19 [json_name = "map"]; - */ - build.buf.validate.MapRulesOrBuilder getMapOrBuilder(); - - /** - *
-   * Well-Known Field Types
-   * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - * @return Whether the any field is set. - */ - boolean hasAny(); - /** - *
-   * Well-Known Field Types
-   * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - * @return The any. - */ - build.buf.validate.AnyRules getAny(); - /** - *
-   * Well-Known Field Types
-   * 
- * - * .buf.validate.AnyRules any = 20 [json_name = "any"]; - */ - build.buf.validate.AnyRulesOrBuilder getAnyOrBuilder(); - - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - * @return Whether the duration field is set. - */ - boolean hasDuration(); - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - * @return The duration. - */ - build.buf.validate.DurationRules getDuration(); - /** - * .buf.validate.DurationRules duration = 21 [json_name = "duration"]; - */ - build.buf.validate.DurationRulesOrBuilder getDurationOrBuilder(); - - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - * @return The timestamp. - */ - build.buf.validate.TimestampRules getTimestamp(); - /** - * .buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; - */ - build.buf.validate.TimestampRulesOrBuilder getTimestampOrBuilder(); - - /** - *
-   * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return Whether the skipped field is set. - */ - @java.lang.Deprecated boolean hasSkipped(); - /** - *
-   * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool skipped = 24 [json_name = "skipped", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.skipped is deprecated. - * See buf/validate/validate.proto;l=245 - * @return The skipped. - */ - @java.lang.Deprecated boolean getSkipped(); - - /** - *
-   * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return Whether the ignoreEmpty field is set. - */ - @java.lang.Deprecated boolean hasIgnoreEmpty(); - /** - *
-   * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
-   * 
- * - * optional bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true]; - * @deprecated buf.validate.FieldConstraints.ignore_empty is deprecated. - * See buf/validate/validate.proto;l=247 - * @return The ignoreEmpty. - */ - @java.lang.Deprecated boolean getIgnoreEmpty(); - - build.buf.validate.FieldConstraints.TypeCase getTypeCase(); -} diff --git a/src/main/java/build/buf/validate/Fixed32Rules.java b/src/main/java/build/buf/validate/Fixed32Rules.java deleted file mode 100644 index d6028ed3..00000000 --- a/src/main/java/build/buf/validate/Fixed32Rules.java +++ /dev/null @@ -1,2386 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * Fixed32Rules describes the constraints applied to `fixed32` values.
- * 
- * - * Protobuf type {@code buf.validate.Fixed32Rules} - */ -public final class Fixed32Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - Fixed32Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.Fixed32Rules) - Fixed32RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed32Rules.class.getName()); - } - // Use Fixed32Rules.newBuilder() to construct. - private Fixed32Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private Fixed32Rules() { - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Fixed32Rules.class, build.buf.validate.Fixed32Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private int const_ = 0; - /** - *
-   * `const` requires the field value to exactly match the specified value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must equal 42
-   * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must equal 42
-   * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than or equal to 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than or equal to 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than 5 [fixed32.gt]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than 5 [fixed32.gt]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than or equal to 5 [fixed32.gte]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than or equal to 5 [fixed32.gte]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList in_ = - emptyIntList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList notIn_ = - emptyIntList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList example_ = - emptyIntList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * fixed32 value = 1 [
-   * (buf.validate.field).fixed32.example = 1,
-   * (buf.validate.field).fixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * fixed32 value = 1 [
-   * (buf.validate.field).fixed32.example = 1,
-   * (buf.validate.field).fixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * fixed32 value = 1 [
-   * (buf.validate.field).fixed32.example = 1,
-   * (buf.validate.field).fixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFixed32(1, const_); - } - if (lessThanCase_ == 2) { - output.writeFixed32( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeFixed32( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeFixed32( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeFixed32( - 5, (int)((java.lang.Integer) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeFixed32(6, in_.getInt(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeFixed32(7, notIn_.getInt(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeFixed32(8, example_.getInt(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeFixed32Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeFixed32Size( - 5, (int)((java.lang.Integer) greaterThan_)); - } - { - int dataSize = 0; - dataSize = 4 * getInList().size(); - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getNotInList().size(); - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.Fixed32Rules)) { - return super.equals(obj); - } - build.buf.validate.Fixed32Rules other = (build.buf.validate.Fixed32Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Fixed32Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Fixed32Rules 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.Fixed32Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Fixed32Rules 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.Fixed32Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Fixed32Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Fixed32Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Fixed32Rules 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.Fixed32Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Fixed32Rules 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.Fixed32Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Fixed32Rules 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.Fixed32Rules 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; - } - /** - *
-   * Fixed32Rules describes the constraints applied to `fixed32` values.
-   * 
- * - * Protobuf type {@code buf.validate.Fixed32Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.Fixed32Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.Fixed32Rules) - build.buf.validate.Fixed32RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Fixed32Rules.class, build.buf.validate.Fixed32Rules.Builder.class); - } - - // Construct using build.buf.validate.Fixed32Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0; - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed32Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.Fixed32Rules getDefaultInstanceForType() { - return build.buf.validate.Fixed32Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Fixed32Rules build() { - build.buf.validate.Fixed32Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Fixed32Rules buildPartial() { - build.buf.validate.Fixed32Rules result = new build.buf.validate.Fixed32Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.Fixed32Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.Fixed32Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Fixed32Rules) { - return mergeFrom((build.buf.validate.Fixed32Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Fixed32Rules other) { - if (other == build.buf.validate.Fixed32Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 13: { - const_ = input.readFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - lessThan_ = input.readFixed32(); - lessThanCase_ = 2; - break; - } // case 21 - case 29: { - lessThan_ = input.readFixed32(); - lessThanCase_ = 3; - break; - } // case 29 - case 37: { - greaterThan_ = input.readFixed32(); - greaterThanCase_ = 4; - break; - } // case 37 - case 45: { - greaterThan_ = input.readFixed32(); - greaterThanCase_ = 5; - break; - } // case 45 - case 53: { - int v = input.readFixed32(); - ensureInIsMutable(); - in_.addInt(v); - break; - } // case 53 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureInIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - in_.addInt(input.readFixed32()); - } - input.popLimit(limit); - break; - } // case 50 - case 61: { - int v = input.readFixed32(); - ensureNotInIsMutable(); - notIn_.addInt(v); - break; - } // case 61 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureNotInIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - notIn_.addInt(input.readFixed32()); - } - input.popLimit(limit); - break; - } // case 58 - case 69: { - int v = input.readFixed32(); - ensureExampleIsMutable(); - example_.addInt(v); - break; - } // case 69 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - example_.addInt(input.readFixed32()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private int const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must equal 42
-     * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must equal 42
-     * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must equal 42
-     * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(int value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value.
-     * If the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must equal 42
-     * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(int value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than or equal to 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than or equal to 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than or equal to 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(int value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be less than or equal to 10
-     * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than 5 [fixed32.gt]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than 5 [fixed32.gt]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than 5 [fixed32.gt]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(int value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than 5 [fixed32.gt]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than or equal to 5 [fixed32.gte]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than or equal to 5 [fixed32.gte]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than or equal to 5 [fixed32.gte]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(int value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be greater than or equal to 5 [fixed32.gte]
-     * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-     * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-     * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.IntList in_ = emptyIntList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - private void ensureInIsMutable(int capacity) { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_, capacity); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, int value) { - - ensureInIsMutable(); - in_.setInt(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(int value) { - - ensureInIsMutable(); - in_.addInt(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList notIn_ = emptyIntList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - private void ensureNotInIsMutable(int capacity) { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_, capacity); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, int value) { - - ensureNotInIsMutable(); - notIn_.setInt(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(int value) { - - ensureNotInIsMutable(); - notIn_.addInt(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList example_ = emptyIntList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, int value) { - - ensureExampleIsMutable(); - example_.setInt(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(int value) { - - ensureExampleIsMutable(); - example_.addInt(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed32 {
-     * fixed32 value = 1 [
-     * (buf.validate.field).fixed32.example = 1,
-     * (buf.validate.field).fixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Fixed32Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Fixed32Rules) - private static final build.buf.validate.Fixed32Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Fixed32Rules(); - } - - public static build.buf.validate.Fixed32Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed32Rules 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.Fixed32Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java b/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java deleted file mode 100644 index 0f04c8e0..00000000 --- a/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface Fixed32RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Fixed32Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must equal 42
-   * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value.
-   * If the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must equal 42
-   * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - int getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - int getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than or equal to 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be less than or equal to 10
-   * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - int getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than 5 [fixed32.gt]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than 5 [fixed32.gt]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - int getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than or equal to 5 [fixed32.gte]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be greater than or equal to 5 [fixed32.gte]
-   * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
-   * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
-   * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - int getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - int getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - int getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * fixed32 value = 1 [
-   * (buf.validate.field).fixed32.example = 1,
-   * (buf.validate.field).fixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * fixed32 value = 1 [
-   * (buf.validate.field).fixed32.example = 1,
-   * (buf.validate.field).fixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed32 {
-   * fixed32 value = 1 [
-   * (buf.validate.field).fixed32.example = 1,
-   * (buf.validate.field).fixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - int getExample(int index); - - build.buf.validate.Fixed32Rules.LessThanCase getLessThanCase(); - - build.buf.validate.Fixed32Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/Fixed64Rules.java b/src/main/java/build/buf/validate/Fixed64Rules.java deleted file mode 100644 index 24c55d3e..00000000 --- a/src/main/java/build/buf/validate/Fixed64Rules.java +++ /dev/null @@ -1,2391 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * Fixed64Rules describes the constraints applied to `fixed64` values.
- * 
- * - * Protobuf type {@code buf.validate.Fixed64Rules} - */ -public final class Fixed64Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - Fixed64Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.Fixed64Rules) - Fixed64RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Fixed64Rules.class.getName()); - } - // Use Fixed64Rules.newBuilder() to construct. - private Fixed64Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private Fixed64Rules() { - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Fixed64Rules.class, build.buf.validate.Fixed64Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private long const_ = 0L; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must equal 42
-   * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must equal 42
-   * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than or equal to 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than or equal to 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than 5 [fixed64.gt]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than 5 [fixed64.gt]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than or equal to 5 [fixed64.gte]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than or equal to 5 [fixed64.gte]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList in_ = - emptyLongList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList notIn_ = - emptyLongList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList example_ = - emptyLongList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * fixed64 value = 1 [
-   * (buf.validate.field).fixed64.example = 1,
-   * (buf.validate.field).fixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * fixed64 value = 1 [
-   * (buf.validate.field).fixed64.example = 1,
-   * (buf.validate.field).fixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * fixed64 value = 1 [
-   * (buf.validate.field).fixed64.example = 1,
-   * (buf.validate.field).fixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFixed64(1, const_); - } - if (lessThanCase_ == 2) { - output.writeFixed64( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeFixed64( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeFixed64( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeFixed64( - 5, (long)((java.lang.Long) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeFixed64(6, in_.getLong(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeFixed64(7, notIn_.getLong(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeFixed64(8, example_.getLong(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeFixed64Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size( - 5, (long)((java.lang.Long) greaterThan_)); - } - { - int dataSize = 0; - dataSize = 8 * getInList().size(); - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - dataSize = 8 * getNotInList().size(); - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - dataSize = 8 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.Fixed64Rules)) { - return super.equals(obj); - } - build.buf.validate.Fixed64Rules other = (build.buf.validate.Fixed64Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConst()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Fixed64Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Fixed64Rules 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.Fixed64Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Fixed64Rules 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.Fixed64Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Fixed64Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Fixed64Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Fixed64Rules 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.Fixed64Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Fixed64Rules 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.Fixed64Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Fixed64Rules 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.Fixed64Rules 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; - } - /** - *
-   * Fixed64Rules describes the constraints applied to `fixed64` values.
-   * 
- * - * Protobuf type {@code buf.validate.Fixed64Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.Fixed64Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.Fixed64Rules) - build.buf.validate.Fixed64RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Fixed64Rules.class, build.buf.validate.Fixed64Rules.Builder.class); - } - - // Construct using build.buf.validate.Fixed64Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0L; - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Fixed64Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.Fixed64Rules getDefaultInstanceForType() { - return build.buf.validate.Fixed64Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Fixed64Rules build() { - build.buf.validate.Fixed64Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Fixed64Rules buildPartial() { - build.buf.validate.Fixed64Rules result = new build.buf.validate.Fixed64Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.Fixed64Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.Fixed64Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Fixed64Rules) { - return mergeFrom((build.buf.validate.Fixed64Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Fixed64Rules other) { - if (other == build.buf.validate.Fixed64Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 9: { - const_ = input.readFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - case 17: { - lessThan_ = input.readFixed64(); - lessThanCase_ = 2; - break; - } // case 17 - case 25: { - lessThan_ = input.readFixed64(); - lessThanCase_ = 3; - break; - } // case 25 - case 33: { - greaterThan_ = input.readFixed64(); - greaterThanCase_ = 4; - break; - } // case 33 - case 41: { - greaterThan_ = input.readFixed64(); - greaterThanCase_ = 5; - break; - } // case 41 - case 49: { - long v = input.readFixed64(); - ensureInIsMutable(); - in_.addLong(v); - break; - } // case 49 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureInIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - in_.addLong(input.readFixed64()); - } - input.popLimit(limit); - break; - } // case 50 - case 57: { - long v = input.readFixed64(); - ensureNotInIsMutable(); - notIn_.addLong(v); - break; - } // case 57 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureNotInIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - notIn_.addLong(input.readFixed64()); - } - input.popLimit(limit); - break; - } // case 58 - case 65: { - long v = input.readFixed64(); - ensureExampleIsMutable(); - example_.addLong(v); - break; - } // case 65 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - example_.addLong(input.readFixed64()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private long const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must equal 42
-     * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must equal 42
-     * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must equal 42
-     * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(long value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must equal 42
-     * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(long value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than or equal to 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than or equal to 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than or equal to 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(long value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be less than or equal to 10
-     * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than 5 [fixed64.gt]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than 5 [fixed64.gt]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than 5 [fixed64.gt]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(long value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than 5 [fixed64.gt]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than or equal to 5 [fixed64.gte]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than or equal to 5 [fixed64.gte]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than or equal to 5 [fixed64.gte]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(long value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be greater than or equal to 5 [fixed64.gte]
-     * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-     * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-     * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.LongList in_ = emptyLongList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - private void ensureInIsMutable(int capacity) { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_, capacity); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, long value) { - - ensureInIsMutable(); - in_.setLong(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(long value) { - - ensureInIsMutable(); - in_.addLong(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList notIn_ = emptyLongList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - private void ensureNotInIsMutable(int capacity) { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_, capacity); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, long value) { - - ensureNotInIsMutable(); - notIn_.setLong(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(long value) { - - ensureNotInIsMutable(); - notIn_.addLong(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList example_ = emptyLongList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, long value) { - - ensureExampleIsMutable(); - example_.setLong(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(long value) { - - ensureExampleIsMutable(); - example_.addLong(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFixed64 {
-     * fixed64 value = 1 [
-     * (buf.validate.field).fixed64.example = 1,
-     * (buf.validate.field).fixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Fixed64Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Fixed64Rules) - private static final build.buf.validate.Fixed64Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Fixed64Rules(); - } - - public static build.buf.validate.Fixed64Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Fixed64Rules 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.Fixed64Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java b/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java deleted file mode 100644 index 3cd318ea..00000000 --- a/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface Fixed64RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Fixed64Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must equal 42
-   * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must equal 42
-   * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional fixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - long getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - long getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than or equal to 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be less than or equal to 10
-   * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * fixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - long getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than 5 [fixed64.gt]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than 5 [fixed64.gt]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - long getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than or equal to 5 [fixed64.gte]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be greater than or equal to 5 [fixed64.gte]
-   * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
-   * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
-   * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * fixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - long getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - long getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated fixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - long getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * fixed64 value = 1 [
-   * (buf.validate.field).fixed64.example = 1,
-   * (buf.validate.field).fixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * fixed64 value = 1 [
-   * (buf.validate.field).fixed64.example = 1,
-   * (buf.validate.field).fixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFixed64 {
-   * fixed64 value = 1 [
-   * (buf.validate.field).fixed64.example = 1,
-   * (buf.validate.field).fixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated fixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - long getExample(int index); - - build.buf.validate.Fixed64Rules.LessThanCase getLessThanCase(); - - build.buf.validate.Fixed64Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/FloatRules.java b/src/main/java/build/buf/validate/FloatRules.java deleted file mode 100644 index 222c84b3..00000000 --- a/src/main/java/build/buf/validate/FloatRules.java +++ /dev/null @@ -1,2517 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * FloatRules describes the constraints applied to `float` values. These
- * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.FloatRules} - */ -public final class FloatRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - FloatRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.FloatRules) - FloatRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - FloatRules.class.getName()); - } - // Use FloatRules.newBuilder() to construct. - private FloatRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private FloatRules() { - in_ = emptyFloatList(); - notIn_ = emptyFloatList(); - example_ = emptyFloatList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FloatRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FloatRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.FloatRules.class, build.buf.validate.FloatRules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private float const_ = 0F; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must equal 42.0
-   * float value = 1 [(buf.validate.field).float.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must equal 42.0
-   * float value = 1 [(buf.validate.field).float.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public float getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than 10.0
-   * float value = 1 [(buf.validate.field).float.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than 10.0
-   * float value = 1 [(buf.validate.field).float.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public float getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Float) lessThan_; - } - return 0F; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than or equal to 10.0
-   * float value = 1 [(buf.validate.field).float.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than or equal to 10.0
-   * float value = 1 [(buf.validate.field).float.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public float getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Float) lessThan_; - } - return 0F; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than 5.0 [float.gt]
-   * float value = 1 [(buf.validate.field).float.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than 5.0 [float.gt]
-   * float value = 1 [(buf.validate.field).float.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public float getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Float) greaterThan_; - } - return 0F; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than or equal to 5.0 [float.gte]
-   * float value = 1 [(buf.validate.field).float.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than or equal to 5.0 [float.gte]
-   * float value = 1 [(buf.validate.field).float.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public float getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Float) greaterThan_; - } - return 0F; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList in_ = - emptyFloatList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public float getIn(int index) { - return in_.getFloat(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList notIn_ = - emptyFloatList(); - /** - *
-   * `in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public float getNotIn(int index) { - return notIn_.getFloat(index); - } - - public static final int FINITE_FIELD_NUMBER = 8; - private boolean finite_ = false; - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return Whether the finite field is set. - */ - @java.lang.Override - public boolean hasFinite() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return The finite. - */ - @java.lang.Override - public boolean getFinite() { - return finite_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList example_ = - emptyFloatList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFloat {
-   * float value = 1 [
-   * (buf.validate.field).float.example = 1.0,
-   * (buf.validate.field).float.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFloat {
-   * float value = 1 [
-   * (buf.validate.field).float.example = 1.0,
-   * (buf.validate.field).float.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFloat {
-   * float value = 1 [
-   * (buf.validate.field).float.example = 1.0,
-   * (buf.validate.field).float.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public float getExample(int index) { - return example_.getFloat(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(1, const_); - } - if (lessThanCase_ == 2) { - output.writeFloat( - 2, (float)((java.lang.Float) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeFloat( - 3, (float)((java.lang.Float) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeFloat( - 4, (float)((java.lang.Float) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeFloat( - 5, (float)((java.lang.Float) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeFloat(6, in_.getFloat(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeFloat(7, notIn_.getFloat(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBool(8, finite_); - } - for (int i = 0; i < example_.size(); i++) { - output.writeFloat(9, example_.getFloat(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeFloatSize(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 2, (float)((java.lang.Float) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 3, (float)((java.lang.Float) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 4, (float)((java.lang.Float) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 5, (float)((java.lang.Float) greaterThan_)); - } - { - int dataSize = 0; - dataSize = 4 * getInList().size(); - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getNotInList().size(); - size += dataSize; - size += 1 * getNotInList().size(); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, finite_); - } - { - int dataSize = 0; - dataSize = 4 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.FloatRules)) { - return super.equals(obj); - } - build.buf.validate.FloatRules other = (build.buf.validate.FloatRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (java.lang.Float.floatToIntBits(getConst()) - != java.lang.Float.floatToIntBits( - other.getConst())) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (hasFinite() != other.hasFinite()) return false; - if (hasFinite()) { - if (getFinite() - != other.getFinite()) return false; - } - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (java.lang.Float.floatToIntBits(getLt()) - != java.lang.Float.floatToIntBits( - other.getLt())) return false; - break; - case 3: - if (java.lang.Float.floatToIntBits(getLte()) - != java.lang.Float.floatToIntBits( - other.getLte())) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (java.lang.Float.floatToIntBits(getGt()) - != java.lang.Float.floatToIntBits( - other.getGt())) return false; - break; - case 5: - if (java.lang.Float.floatToIntBits(getGte()) - != java.lang.Float.floatToIntBits( - other.getGte())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConst()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (hasFinite()) { - hash = (37 * hash) + FINITE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFinite()); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLt()); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLte()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getGt()); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getGte()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.FloatRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.FloatRules 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.FloatRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.FloatRules 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.FloatRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.FloatRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.FloatRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.FloatRules 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.FloatRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.FloatRules 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.FloatRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.FloatRules 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.FloatRules 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; - } - /** - *
-   * FloatRules describes the constraints applied to `float` values. These
-   * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.FloatRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.FloatRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.FloatRules) - build.buf.validate.FloatRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FloatRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FloatRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.FloatRules.class, build.buf.validate.FloatRules.Builder.class); - } - - // Construct using build.buf.validate.FloatRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0F; - in_ = emptyFloatList(); - notIn_ = emptyFloatList(); - finite_ = false; - example_ = emptyFloatList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_FloatRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.FloatRules getDefaultInstanceForType() { - return build.buf.validate.FloatRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.FloatRules build() { - build.buf.validate.FloatRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.FloatRules buildPartial() { - build.buf.validate.FloatRules result = new build.buf.validate.FloatRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.FloatRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.finite_ = finite_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.FloatRules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.FloatRules) { - return mergeFrom((build.buf.validate.FloatRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.FloatRules other) { - if (other == build.buf.validate.FloatRules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (other.hasFinite()) { - setFinite(other.getFinite()); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000100; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 13: { - const_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - lessThan_ = input.readFloat(); - lessThanCase_ = 2; - break; - } // case 21 - case 29: { - lessThan_ = input.readFloat(); - lessThanCase_ = 3; - break; - } // case 29 - case 37: { - greaterThan_ = input.readFloat(); - greaterThanCase_ = 4; - break; - } // case 37 - case 45: { - greaterThan_ = input.readFloat(); - greaterThanCase_ = 5; - break; - } // case 45 - case 53: { - float v = input.readFloat(); - ensureInIsMutable(); - in_.addFloat(v); - break; - } // case 53 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureInIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - in_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 50 - case 61: { - float v = input.readFloat(); - ensureNotInIsMutable(); - notIn_.addFloat(v); - break; - } // case 61 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureNotInIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - notIn_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - finite_ = input.readBool(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 77: { - float v = input.readFloat(); - ensureExampleIsMutable(); - example_.addFloat(v); - break; - } // case 77 - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - example_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 74 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private float const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must equal 42.0
-     * float value = 1 [(buf.validate.field).float.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must equal 42.0
-     * float value = 1 [(buf.validate.field).float.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public float getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must equal 42.0
-     * float value = 1 [(buf.validate.field).float.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(float value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must equal 42.0
-     * float value = 1 [(buf.validate.field).float.const = 42.0];
-     * }
-     * ```
-     * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0F; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than 10.0
-     * float value = 1 [(buf.validate.field).float.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than 10.0
-     * float value = 1 [(buf.validate.field).float.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public float getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Float) lessThan_; - } - return 0F; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than 10.0
-     * float value = 1 [(buf.validate.field).float.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(float value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than 10.0
-     * float value = 1 [(buf.validate.field).float.lt = 10.0];
-     * }
-     * ```
-     * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than or equal to 10.0
-     * float value = 1 [(buf.validate.field).float.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than or equal to 10.0
-     * float value = 1 [(buf.validate.field).float.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public float getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Float) lessThan_; - } - return 0F; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than or equal to 10.0
-     * float value = 1 [(buf.validate.field).float.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(float value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be less than or equal to 10.0
-     * float value = 1 [(buf.validate.field).float.lte = 10.0];
-     * }
-     * ```
-     * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than 5.0 [float.gt]
-     * float value = 1 [(buf.validate.field).float.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than 5.0 [float.gt]
-     * float value = 1 [(buf.validate.field).float.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public float getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Float) greaterThan_; - } - return 0F; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than 5.0 [float.gt]
-     * float value = 1 [(buf.validate.field).float.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(float value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than 5.0 [float.gt]
-     * float value = 1 [(buf.validate.field).float.gt = 5.0];
-     *
-     * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than or equal to 5.0 [float.gte]
-     * float value = 1 [(buf.validate.field).float.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than or equal to 5.0 [float.gte]
-     * float value = 1 [(buf.validate.field).float.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public float getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Float) greaterThan_; - } - return 0F; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than or equal to 5.0 [float.gte]
-     * float value = 1 [(buf.validate.field).float.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(float value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be greater than or equal to 5.0 [float.gte]
-     * float value = 1 [(buf.validate.field).float.gte = 5.0];
-     *
-     * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-     * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-     *
-     * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-     * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-     * }
-     * ```
-     * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.FloatList in_ = emptyFloatList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - private void ensureInIsMutable(int capacity) { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_, capacity); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public float getIn(int index) { - return in_.getFloat(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, float value) { - - ensureInIsMutable(); - in_.setFloat(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(float value) { - - ensureInIsMutable(); - in_.addFloat(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.FloatList notIn_ = emptyFloatList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - private void ensureNotInIsMutable(int capacity) { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_, capacity); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public float getNotIn(int index) { - return notIn_.getFloat(index); - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, float value) { - - ensureNotInIsMutable(); - notIn_.setFloat(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(float value) { - - ensureNotInIsMutable(); - notIn_.addFloat(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyFloat {
-     * // value must not be in list [1.0, 2.0, 3.0]
-     * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-     * }
-     * ```
-     * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private boolean finite_ ; - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return Whether the finite field is set. - */ - @java.lang.Override - public boolean hasFinite() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return The finite. - */ - @java.lang.Override - public boolean getFinite() { - return finite_; - } - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @param value The finite to set. - * @return This builder for chaining. - */ - public Builder setFinite(boolean value) { - - finite_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `finite` requires the field value to be finite. If the field value is
-     * infinite or NaN, an error message is generated.
-     * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearFinite() { - bitField0_ = (bitField0_ & ~0x00000080); - finite_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.FloatList example_ = emptyFloatList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000100; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000100; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public float getExample(int index) { - return example_.getFloat(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, float value) { - - ensureExampleIsMutable(); - example_.setFloat(index, value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(float value) { - - ensureExampleIsMutable(); - example_.addFloat(value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyFloat {
-     * float value = 1 [
-     * (buf.validate.field).float.example = 1.0,
-     * (buf.validate.field).float.example = "Infinity"
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.FloatRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.FloatRules) - private static final build.buf.validate.FloatRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.FloatRules(); - } - - public static build.buf.validate.FloatRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FloatRules 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.FloatRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/FloatRulesOrBuilder.java b/src/main/java/build/buf/validate/FloatRulesOrBuilder.java deleted file mode 100644 index b945446c..00000000 --- a/src/main/java/build/buf/validate/FloatRulesOrBuilder.java +++ /dev/null @@ -1,426 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface FloatRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.FloatRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must equal 42.0
-   * float value = 1 [(buf.validate.field).float.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must equal 42.0
-   * float value = 1 [(buf.validate.field).float.const = 42.0];
-   * }
-   * ```
-   * 
- * - * optional float const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - float getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than 10.0
-   * float value = 1 [(buf.validate.field).float.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than 10.0
-   * float value = 1 [(buf.validate.field).float.lt = 10.0];
-   * }
-   * ```
-   * 
- * - * float lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - float getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than or equal to 10.0
-   * float value = 1 [(buf.validate.field).float.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be less than or equal to 10.0
-   * float value = 1 [(buf.validate.field).float.lte = 10.0];
-   * }
-   * ```
-   * 
- * - * float lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - float getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than 5.0 [float.gt]
-   * float value = 1 [(buf.validate.field).float.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than 5.0 [float.gt]
-   * float value = 1 [(buf.validate.field).float.gt = 5.0];
-   *
-   * // value must be greater than 5 and less than 10.0 [float.gt_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - float getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than or equal to 5.0 [float.gte]
-   * float value = 1 [(buf.validate.field).float.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be greater than or equal to 5.0 [float.gte]
-   * float value = 1 [(buf.validate.field).float.gte = 5.0];
-   *
-   * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
-   * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
-   *
-   * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
-   * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
-   * }
-   * ```
-   * 
- * - * float gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - float getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - float getIn(int index); - - /** - *
-   * `in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyFloat {
-   * // value must not be in list [1.0, 2.0, 3.0]
-   * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
-   * }
-   * ```
-   * 
- * - * repeated float not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - float getNotIn(int index); - - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return Whether the finite field is set. - */ - boolean hasFinite(); - /** - *
-   * `finite` requires the field value to be finite. If the field value is
-   * infinite or NaN, an error message is generated.
-   * 
- * - * optional bool finite = 8 [json_name = "finite", (.buf.validate.predefined) = { ... } - * @return The finite. - */ - boolean getFinite(); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFloat {
-   * float value = 1 [
-   * (buf.validate.field).float.example = 1.0,
-   * (buf.validate.field).float.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFloat {
-   * float value = 1 [
-   * (buf.validate.field).float.example = 1.0,
-   * (buf.validate.field).float.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyFloat {
-   * float value = 1 [
-   * (buf.validate.field).float.example = 1.0,
-   * (buf.validate.field).float.example = "Infinity"
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated float example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - float getExample(int index); - - build.buf.validate.FloatRules.LessThanCase getLessThanCase(); - - build.buf.validate.FloatRules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/Ignore.java b/src/main/java/build/buf/validate/Ignore.java deleted file mode 100644 index 1094eb74..00000000 --- a/src/main/java/build/buf/validate/Ignore.java +++ /dev/null @@ -1,465 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * Specifies how FieldConstraints.ignore behaves. See the documentation for
- * FieldConstraints.required for definitions of "populated" and "nullable".
- * 
- * - * Protobuf enum {@code buf.validate.Ignore} - */ -public enum Ignore - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Validation is only skipped if it's an unpopulated nullable fields.
-   *
-   * ```proto
-   * syntax="proto3";
-   *
-   * message Request {
-   * // The uri rule applies to any value, including the empty string.
-   * string foo = 1 [
-   * (buf.validate.field).string.uri = true
-   * ];
-   *
-   * // The uri rule only applies if the field is set, including if it's
-   * // set to the empty string.
-   * optional string bar = 2 [
-   * (buf.validate.field).string.uri = true
-   * ];
-   *
-   * // The min_items rule always applies, even if the list is empty.
-   * repeated string baz = 3 [
-   * (buf.validate.field).repeated.min_items = 3
-   * ];
-   *
-   * // The custom CEL rule applies only if the field is set, including if
-   * // it's the "zero" value of that message.
-   * SomeMessage quux = 4 [
-   * (buf.validate.field).cel = {/* ... */}
-   * ];
-   * }
-   * ```
-   * 
- * - * IGNORE_UNSPECIFIED = 0; - */ - IGNORE_UNSPECIFIED(0), - /** - *
-   * Validation is skipped if the field is unpopulated. This rule is redundant
-   * if the field is already nullable. This value is equivalent behavior to the
-   * deprecated ignore_empty rule.
-   *
-   * ```proto
-   * syntax="proto3
-   *
-   * message Request {
-   * // The uri rule applies only if the value is not the empty string.
-   * string foo = 1 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   *
-   * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
-   * // case: the uri rule only applies if the field is set, including if
-   * // it's set to the empty string.
-   * optional string bar = 2 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   *
-   * // The min_items rule only applies if the list has at least one item.
-   * repeated string baz = 3 [
-   * (buf.validate.field).repeated.min_items = 3,
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   *
-   * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
-   * // case: the custom CEL rule applies only if the field is set, including
-   * // if it's the "zero" value of that message.
-   * SomeMessage quux = 4 [
-   * (buf.validate.field).cel = {/* ... */},
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   * }
-   * ```
-   * 
- * - * IGNORE_IF_UNPOPULATED = 1; - */ - IGNORE_IF_UNPOPULATED(1), - /** - *
-   * Validation is skipped if the field is unpopulated or if it is a nullable
-   * field populated with its default value. This is typically the zero or
-   * empty value, but proto2 scalars support custom defaults. For messages, the
-   * default is a non-null message with all its fields unpopulated.
-   *
-   * ```proto
-   * syntax="proto3
-   *
-   * message Request {
-   * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
-   * // this case; the uri rule applies only if the value is not the empty
-   * // string.
-   * string foo = 1 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   *
-   * // The uri rule only applies if the field is set to a value other than
-   * // the empty string.
-   * optional string bar = 2 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   *
-   * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
-   * // this case; the min_items rule only applies if the list has at least
-   * // one item.
-   * repeated string baz = 3 [
-   * (buf.validate.field).repeated.min_items = 3,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   *
-   * // The custom CEL rule only applies if the field is set to a value other
-   * // than an empty message (i.e., fields are unpopulated).
-   * SomeMessage quux = 4 [
-   * (buf.validate.field).cel = {/* ... */},
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   * }
-   * ```
-   *
-   * This rule is affected by proto2 custom default values:
-   *
-   * ```proto
-   * syntax="proto2";
-   *
-   * message Request {
-   * // The gt rule only applies if the field is set and it's value is not
-   * the default (i.e., not -42). The rule even applies if the field is set
-   * to zero since the default value differs.
-   * optional int32 value = 1 [
-   * default = -42,
-   * (buf.validate.field).int32.gt = 0,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   * }
-   * 
- * - * IGNORE_IF_DEFAULT_VALUE = 2; - */ - IGNORE_IF_DEFAULT_VALUE(2), - /** - *
-   * The validation rules of this field will be skipped and not evaluated. This
-   * is useful for situations that necessitate turning off the rules of a field
-   * containing a message that may not make sense in the current context, or to
-   * temporarily disable constraints during development.
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field's rules will always be ignored, including any validation's
-   * // on value's fields.
-   * MyOtherMessage value = 1 [
-   * (buf.validate.field).ignore = IGNORE_ALWAYS];
-   * }
-   * ```
-   * 
- * - * IGNORE_ALWAYS = 3; - */ - IGNORE_ALWAYS(3), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Ignore.class.getName()); - } - /** - *
-   * Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1.
-   * 
- * - * IGNORE_EMPTY = 1 [deprecated = true]; - */ - public static final Ignore IGNORE_EMPTY = IGNORE_IF_UNPOPULATED; - /** - *
-   * Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1.
-   * 
- * - * IGNORE_DEFAULT = 2 [deprecated = true]; - */ - public static final Ignore IGNORE_DEFAULT = IGNORE_IF_DEFAULT_VALUE; - /** - *
-   * Validation is only skipped if it's an unpopulated nullable fields.
-   *
-   * ```proto
-   * syntax="proto3";
-   *
-   * message Request {
-   * // The uri rule applies to any value, including the empty string.
-   * string foo = 1 [
-   * (buf.validate.field).string.uri = true
-   * ];
-   *
-   * // The uri rule only applies if the field is set, including if it's
-   * // set to the empty string.
-   * optional string bar = 2 [
-   * (buf.validate.field).string.uri = true
-   * ];
-   *
-   * // The min_items rule always applies, even if the list is empty.
-   * repeated string baz = 3 [
-   * (buf.validate.field).repeated.min_items = 3
-   * ];
-   *
-   * // The custom CEL rule applies only if the field is set, including if
-   * // it's the "zero" value of that message.
-   * SomeMessage quux = 4 [
-   * (buf.validate.field).cel = {/* ... */}
-   * ];
-   * }
-   * ```
-   * 
- * - * IGNORE_UNSPECIFIED = 0; - */ - public static final int IGNORE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Validation is skipped if the field is unpopulated. This rule is redundant
-   * if the field is already nullable. This value is equivalent behavior to the
-   * deprecated ignore_empty rule.
-   *
-   * ```proto
-   * syntax="proto3
-   *
-   * message Request {
-   * // The uri rule applies only if the value is not the empty string.
-   * string foo = 1 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   *
-   * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
-   * // case: the uri rule only applies if the field is set, including if
-   * // it's set to the empty string.
-   * optional string bar = 2 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   *
-   * // The min_items rule only applies if the list has at least one item.
-   * repeated string baz = 3 [
-   * (buf.validate.field).repeated.min_items = 3,
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   *
-   * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
-   * // case: the custom CEL rule applies only if the field is set, including
-   * // if it's the "zero" value of that message.
-   * SomeMessage quux = 4 [
-   * (buf.validate.field).cel = {/* ... */},
-   * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
-   * ];
-   * }
-   * ```
-   * 
- * - * IGNORE_IF_UNPOPULATED = 1; - */ - public static final int IGNORE_IF_UNPOPULATED_VALUE = 1; - /** - *
-   * Validation is skipped if the field is unpopulated or if it is a nullable
-   * field populated with its default value. This is typically the zero or
-   * empty value, but proto2 scalars support custom defaults. For messages, the
-   * default is a non-null message with all its fields unpopulated.
-   *
-   * ```proto
-   * syntax="proto3
-   *
-   * message Request {
-   * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
-   * // this case; the uri rule applies only if the value is not the empty
-   * // string.
-   * string foo = 1 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   *
-   * // The uri rule only applies if the field is set to a value other than
-   * // the empty string.
-   * optional string bar = 2 [
-   * (buf.validate.field).string.uri = true,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   *
-   * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
-   * // this case; the min_items rule only applies if the list has at least
-   * // one item.
-   * repeated string baz = 3 [
-   * (buf.validate.field).repeated.min_items = 3,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   *
-   * // The custom CEL rule only applies if the field is set to a value other
-   * // than an empty message (i.e., fields are unpopulated).
-   * SomeMessage quux = 4 [
-   * (buf.validate.field).cel = {/* ... */},
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   * }
-   * ```
-   *
-   * This rule is affected by proto2 custom default values:
-   *
-   * ```proto
-   * syntax="proto2";
-   *
-   * message Request {
-   * // The gt rule only applies if the field is set and it's value is not
-   * the default (i.e., not -42). The rule even applies if the field is set
-   * to zero since the default value differs.
-   * optional int32 value = 1 [
-   * default = -42,
-   * (buf.validate.field).int32.gt = 0,
-   * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
-   * ];
-   * }
-   * 
- * - * IGNORE_IF_DEFAULT_VALUE = 2; - */ - public static final int IGNORE_IF_DEFAULT_VALUE_VALUE = 2; - /** - *
-   * The validation rules of this field will be skipped and not evaluated. This
-   * is useful for situations that necessitate turning off the rules of a field
-   * containing a message that may not make sense in the current context, or to
-   * temporarily disable constraints during development.
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field's rules will always be ignored, including any validation's
-   * // on value's fields.
-   * MyOtherMessage value = 1 [
-   * (buf.validate.field).ignore = IGNORE_ALWAYS];
-   * }
-   * ```
-   * 
- * - * IGNORE_ALWAYS = 3; - */ - public static final int IGNORE_ALWAYS_VALUE = 3; - /** - *
-   * Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1.
-   * 
- * - * IGNORE_EMPTY = 1 [deprecated = true]; - */ - @java.lang.Deprecated public static final int IGNORE_EMPTY_VALUE = 1; - /** - *
-   * Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1.
-   * 
- * - * IGNORE_DEFAULT = 2 [deprecated = true]; - */ - @java.lang.Deprecated public static final int IGNORE_DEFAULT_VALUE = 2; - - - public final int getNumber() { - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Ignore valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Ignore forNumber(int value) { - switch (value) { - case 0: return IGNORE_UNSPECIFIED; - case 1: return IGNORE_IF_UNPOPULATED; - case 2: return IGNORE_IF_DEFAULT_VALUE; - case 3: return IGNORE_ALWAYS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Ignore> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Ignore findValueByNumber(int number) { - return Ignore.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.ValidateProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Ignore[] VALUES = getStaticValuesArray(); - private static Ignore[] getStaticValuesArray() { - return new Ignore[] { - IGNORE_UNSPECIFIED, IGNORE_IF_UNPOPULATED, IGNORE_IF_DEFAULT_VALUE, IGNORE_ALWAYS, IGNORE_EMPTY, IGNORE_DEFAULT, - }; - } - public static Ignore valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Ignore(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.Ignore) -} - diff --git a/src/main/java/build/buf/validate/Int32Rules.java b/src/main/java/build/buf/validate/Int32Rules.java deleted file mode 100644 index deef34be..00000000 --- a/src/main/java/build/buf/validate/Int32Rules.java +++ /dev/null @@ -1,2376 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * Int32Rules describes the constraints applied to `int32` values. These
- * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.Int32Rules} - */ -public final class Int32Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - Int32Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.Int32Rules) - Int32RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int32Rules.class.getName()); - } - // Use Int32Rules.newBuilder() to construct. - private Int32Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private Int32Rules() { - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Int32Rules.class, build.buf.validate.Int32Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private int const_ = 0; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must equal 42
-   * int32 value = 1 [(buf.validate.field).int32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must equal 42
-   * int32 value = 1 [(buf.validate.field).int32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than 10
-   * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-   * }
-   * ```
-   * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than 10
-   * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-   * }
-   * ```
-   * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than or equal to 10
-   * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-   * }
-   * ```
-   * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than or equal to 10
-   * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-   * }
-   * ```
-   * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than 5 [int32.gt]
-   * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int32.gt_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than 5 [int32.gt]
-   * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int32.gt_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified value
-   * (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than or equal to 5 [int32.gte]
-   * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified value
-   * (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than or equal to 5 [int32.gte]
-   * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList in_ = - emptyIntList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList notIn_ = - emptyIntList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList example_ = - emptyIntList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt32 {
-   * int32 value = 1 [
-   * (buf.validate.field).int32.example = 1,
-   * (buf.validate.field).int32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt32 {
-   * int32 value = 1 [
-   * (buf.validate.field).int32.example = 1,
-   * (buf.validate.field).int32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt32 {
-   * int32 value = 1 [
-   * (buf.validate.field).int32.example = 1,
-   * (buf.validate.field).int32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, const_); - } - if (lessThanCase_ == 2) { - output.writeInt32( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeInt32( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeInt32( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeInt32( - 5, (int)((java.lang.Integer) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeInt32(6, in_.getInt(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeInt32(7, notIn_.getInt(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeInt32(8, example_.getInt(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeInt32Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 5, (int)((java.lang.Integer) greaterThan_)); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(in_.getInt(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(notIn_.getInt(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(example_.getInt(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.Int32Rules)) { - return super.equals(obj); - } - build.buf.validate.Int32Rules other = (build.buf.validate.Int32Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Int32Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Int32Rules 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.Int32Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Int32Rules 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.Int32Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Int32Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Int32Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Int32Rules 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.Int32Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Int32Rules 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.Int32Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Int32Rules 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.Int32Rules 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; - } - /** - *
-   * Int32Rules describes the constraints applied to `int32` values. These
-   * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.Int32Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.Int32Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.Int32Rules) - build.buf.validate.Int32RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Int32Rules.class, build.buf.validate.Int32Rules.Builder.class); - } - - // Construct using build.buf.validate.Int32Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0; - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int32Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.Int32Rules getDefaultInstanceForType() { - return build.buf.validate.Int32Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Int32Rules build() { - build.buf.validate.Int32Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Int32Rules buildPartial() { - build.buf.validate.Int32Rules result = new build.buf.validate.Int32Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.Int32Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.Int32Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Int32Rules) { - return mergeFrom((build.buf.validate.Int32Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Int32Rules other) { - if (other == build.buf.validate.Int32Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - lessThan_ = input.readInt32(); - lessThanCase_ = 2; - break; - } // case 16 - case 24: { - lessThan_ = input.readInt32(); - lessThanCase_ = 3; - break; - } // case 24 - case 32: { - greaterThan_ = input.readInt32(); - greaterThanCase_ = 4; - break; - } // case 32 - case 40: { - greaterThan_ = input.readInt32(); - greaterThanCase_ = 5; - break; - } // case 40 - case 48: { - int v = input.readInt32(); - ensureInIsMutable(); - in_.addInt(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - int v = input.readInt32(); - ensureNotInIsMutable(); - notIn_.addInt(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - int v = input.readInt32(); - ensureExampleIsMutable(); - example_.addInt(v); - break; - } // case 64 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private int const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must equal 42
-     * int32 value = 1 [(buf.validate.field).int32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must equal 42
-     * int32 value = 1 [(buf.validate.field).int32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must equal 42
-     * int32 value = 1 [(buf.validate.field).int32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(int value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must equal 42
-     * int32 value = 1 [(buf.validate.field).int32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than 10
-     * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-     * }
-     * ```
-     * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than 10
-     * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-     * }
-     * ```
-     * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than 10
-     * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-     * }
-     * ```
-     * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(int value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than 10
-     * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-     * }
-     * ```
-     * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than or equal to 10
-     * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-     * }
-     * ```
-     * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than or equal to 10
-     * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-     * }
-     * ```
-     * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than or equal to 10
-     * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-     * }
-     * ```
-     * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(int value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be less than or equal to 10
-     * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-     * }
-     * ```
-     * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than 5 [int32.gt]
-     * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int32.gt_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than 5 [int32.gt]
-     * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int32.gt_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than 5 [int32.gt]
-     * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int32.gt_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(int value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than 5 [int32.gt]
-     * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int32.gt_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified value
-     * (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than or equal to 5 [int32.gte]
-     * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified value
-     * (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than or equal to 5 [int32.gte]
-     * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified value
-     * (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than or equal to 5 [int32.gte]
-     * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(int value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified value
-     * (exclusive). If the value of `gte` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be greater than or equal to 5 [int32.gte]
-     * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-     * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-     * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.IntList in_ = emptyIntList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, int value) { - - ensureInIsMutable(); - in_.setInt(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(int value) { - - ensureInIsMutable(); - in_.addInt(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList notIn_ = emptyIntList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, int value) { - - ensureNotInIsMutable(); - notIn_.setInt(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(int value) { - - ensureNotInIsMutable(); - notIn_.addInt(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MyInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList example_ = emptyIntList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, int value) { - - ensureExampleIsMutable(); - example_.setInt(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(int value) { - - ensureExampleIsMutable(); - example_.addInt(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt32 {
-     * int32 value = 1 [
-     * (buf.validate.field).int32.example = 1,
-     * (buf.validate.field).int32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Int32Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Int32Rules) - private static final build.buf.validate.Int32Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Int32Rules(); - } - - public static build.buf.validate.Int32Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int32Rules 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.Int32Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/Int32RulesOrBuilder.java b/src/main/java/build/buf/validate/Int32RulesOrBuilder.java deleted file mode 100644 index 8bc1b9b9..00000000 --- a/src/main/java/build/buf/validate/Int32RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface Int32RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Int32Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must equal 42
-   * int32 value = 1 [(buf.validate.field).int32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must equal 42
-   * int32 value = 1 [(buf.validate.field).int32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - int getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than 10
-   * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-   * }
-   * ```
-   * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than 10
-   * int32 value = 1 [(buf.validate.field).int32.lt = 10];
-   * }
-   * ```
-   * 
- * - * int32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - int getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than or equal to 10
-   * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-   * }
-   * ```
-   * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be less than or equal to 10
-   * int32 value = 1 [(buf.validate.field).int32.lte = 10];
-   * }
-   * ```
-   * 
- * - * int32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - int getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than 5 [int32.gt]
-   * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int32.gt_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than 5 [int32.gt]
-   * int32 value = 1 [(buf.validate.field).int32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int32.gt_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - int getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified value
-   * (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than or equal to 5 [int32.gte]
-   * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified value
-   * (exclusive). If the value of `gte` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be greater than or equal to 5 [int32.gte]
-   * int32 value = 1 [(buf.validate.field).int32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
-   * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
-   * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - int getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - int getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MyInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - int getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt32 {
-   * int32 value = 1 [
-   * (buf.validate.field).int32.example = 1,
-   * (buf.validate.field).int32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt32 {
-   * int32 value = 1 [
-   * (buf.validate.field).int32.example = 1,
-   * (buf.validate.field).int32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt32 {
-   * int32 value = 1 [
-   * (buf.validate.field).int32.example = 1,
-   * (buf.validate.field).int32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - int getExample(int index); - - build.buf.validate.Int32Rules.LessThanCase getLessThanCase(); - - build.buf.validate.Int32Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/Int64Rules.java b/src/main/java/build/buf/validate/Int64Rules.java deleted file mode 100644 index f457f24d..00000000 --- a/src/main/java/build/buf/validate/Int64Rules.java +++ /dev/null @@ -1,2381 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * Int64Rules describes the constraints applied to `int64` values. These
- * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.Int64Rules} - */ -public final class Int64Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - Int64Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.Int64Rules) - Int64RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Int64Rules.class.getName()); - } - // Use Int64Rules.newBuilder() to construct. - private Int64Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private Int64Rules() { - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Int64Rules.class, build.buf.validate.Int64Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private long const_ = 0L; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must equal 42
-   * int64 value = 1 [(buf.validate.field).int64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must equal 42
-   * int64 value = 1 [(buf.validate.field).int64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than 10
-   * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-   * }
-   * ```
-   * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than 10
-   * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-   * }
-   * ```
-   * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than or equal to 10
-   * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-   * }
-   * ```
-   * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than or equal to 10
-   * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-   * }
-   * ```
-   * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than 5 [int64.gt]
-   * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int64.gt_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than 5 [int64.gt]
-   * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int64.gt_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than or equal to 5 [int64.gte]
-   * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than or equal to 5 [int64.gte]
-   * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList in_ = - emptyLongList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList notIn_ = - emptyLongList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList example_ = - emptyLongList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt64 {
-   * int64 value = 1 [
-   * (buf.validate.field).int64.example = 1,
-   * (buf.validate.field).int64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt64 {
-   * int64 value = 1 [
-   * (buf.validate.field).int64.example = 1,
-   * (buf.validate.field).int64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt64 {
-   * int64 value = 1 [
-   * (buf.validate.field).int64.example = 1,
-   * (buf.validate.field).int64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt64(1, const_); - } - if (lessThanCase_ == 2) { - output.writeInt64( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeInt64( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeInt64( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeInt64( - 5, (long)((java.lang.Long) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeInt64(6, in_.getLong(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeInt64(7, notIn_.getLong(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeInt64(9, example_.getLong(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeInt64Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 5, (long)((java.lang.Long) greaterThan_)); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(in_.getLong(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(notIn_.getLong(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(example_.getLong(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.Int64Rules)) { - return super.equals(obj); - } - build.buf.validate.Int64Rules other = (build.buf.validate.Int64Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConst()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Int64Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Int64Rules 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.Int64Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Int64Rules 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.Int64Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Int64Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Int64Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Int64Rules 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.Int64Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Int64Rules 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.Int64Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Int64Rules 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.Int64Rules 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; - } - /** - *
-   * Int64Rules describes the constraints applied to `int64` values. These
-   * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.Int64Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.Int64Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.Int64Rules) - build.buf.validate.Int64RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Int64Rules.class, build.buf.validate.Int64Rules.Builder.class); - } - - // Construct using build.buf.validate.Int64Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0L; - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Int64Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.Int64Rules getDefaultInstanceForType() { - return build.buf.validate.Int64Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Int64Rules build() { - build.buf.validate.Int64Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Int64Rules buildPartial() { - build.buf.validate.Int64Rules result = new build.buf.validate.Int64Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.Int64Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.Int64Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Int64Rules) { - return mergeFrom((build.buf.validate.Int64Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Int64Rules other) { - if (other == build.buf.validate.Int64Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - lessThan_ = input.readInt64(); - lessThanCase_ = 2; - break; - } // case 16 - case 24: { - lessThan_ = input.readInt64(); - lessThanCase_ = 3; - break; - } // case 24 - case 32: { - greaterThan_ = input.readInt64(); - greaterThanCase_ = 4; - break; - } // case 32 - case 40: { - greaterThan_ = input.readInt64(); - greaterThanCase_ = 5; - break; - } // case 40 - case 48: { - long v = input.readInt64(); - ensureInIsMutable(); - in_.addLong(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - long v = input.readInt64(); - ensureNotInIsMutable(); - notIn_.addLong(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 58 - case 72: { - long v = input.readInt64(); - ensureExampleIsMutable(); - example_.addLong(v); - break; - } // case 72 - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 74 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private long const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must equal 42
-     * int64 value = 1 [(buf.validate.field).int64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must equal 42
-     * int64 value = 1 [(buf.validate.field).int64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must equal 42
-     * int64 value = 1 [(buf.validate.field).int64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(long value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must equal 42
-     * int64 value = 1 [(buf.validate.field).int64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than 10
-     * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-     * }
-     * ```
-     * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than 10
-     * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-     * }
-     * ```
-     * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than 10
-     * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-     * }
-     * ```
-     * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(long value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than 10
-     * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-     * }
-     * ```
-     * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than or equal to 10
-     * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-     * }
-     * ```
-     * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than or equal to 10
-     * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-     * }
-     * ```
-     * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than or equal to 10
-     * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-     * }
-     * ```
-     * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(long value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be less than or equal to 10
-     * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-     * }
-     * ```
-     * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than 5 [int64.gt]
-     * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int64.gt_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than 5 [int64.gt]
-     * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int64.gt_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than 5 [int64.gt]
-     * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int64.gt_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(long value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than 5 [int64.gt]
-     * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [int64.gt_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than or equal to 5 [int64.gte]
-     * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than or equal to 5 [int64.gte]
-     * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than or equal to 5 [int64.gte]
-     * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(long value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be greater than or equal to 5 [int64.gte]
-     * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-     * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-     * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.LongList in_ = emptyLongList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, long value) { - - ensureInIsMutable(); - in_.setLong(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(long value) { - - ensureInIsMutable(); - in_.addLong(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList notIn_ = emptyLongList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, long value) { - - ensureNotInIsMutable(); - notIn_.setLong(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(long value) { - - ensureNotInIsMutable(); - notIn_.addLong(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList example_ = emptyLongList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, long value) { - - ensureExampleIsMutable(); - example_.setLong(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(long value) { - - ensureExampleIsMutable(); - example_.addLong(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyInt64 {
-     * int64 value = 1 [
-     * (buf.validate.field).int64.example = 1,
-     * (buf.validate.field).int64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Int64Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Int64Rules) - private static final build.buf.validate.Int64Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Int64Rules(); - } - - public static build.buf.validate.Int64Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64Rules 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.Int64Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/Int64RulesOrBuilder.java b/src/main/java/build/buf/validate/Int64RulesOrBuilder.java deleted file mode 100644 index c3ad5745..00000000 --- a/src/main/java/build/buf/validate/Int64RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface Int64RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Int64Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must equal 42
-   * int64 value = 1 [(buf.validate.field).int64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must equal 42
-   * int64 value = 1 [(buf.validate.field).int64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional int64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - long getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than 10
-   * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-   * }
-   * ```
-   * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than 10
-   * int64 value = 1 [(buf.validate.field).int64.lt = 10];
-   * }
-   * ```
-   * 
- * - * int64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - long getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than or equal to 10
-   * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-   * }
-   * ```
-   * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be less than or equal to 10
-   * int64 value = 1 [(buf.validate.field).int64.lte = 10];
-   * }
-   * ```
-   * 
- * - * int64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - long getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than 5 [int64.gt]
-   * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int64.gt_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than 5 [int64.gt]
-   * int64 value = 1 [(buf.validate.field).int64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [int64.gt_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - long getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than or equal to 5 [int64.gte]
-   * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be greater than or equal to 5 [int64.gte]
-   * int64 value = 1 [(buf.validate.field).int64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
-   * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
-   * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * int64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - long getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - long getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated int64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - long getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt64 {
-   * int64 value = 1 [
-   * (buf.validate.field).int64.example = 1,
-   * (buf.validate.field).int64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt64 {
-   * int64 value = 1 [
-   * (buf.validate.field).int64.example = 1,
-   * (buf.validate.field).int64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyInt64 {
-   * int64 value = 1 [
-   * (buf.validate.field).int64.example = 1,
-   * (buf.validate.field).int64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated int64 example = 9 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - long getExample(int index); - - build.buf.validate.Int64Rules.LessThanCase getLessThanCase(); - - build.buf.validate.Int64Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/KnownRegex.java b/src/main/java/build/buf/validate/KnownRegex.java deleted file mode 100644 index 4184d664..00000000 --- a/src/main/java/build/buf/validate/KnownRegex.java +++ /dev/null @@ -1,141 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * WellKnownRegex contain some well-known patterns.
- * 
- * - * Protobuf enum {@code buf.validate.KnownRegex} - */ -public enum KnownRegex - implements com.google.protobuf.ProtocolMessageEnum { - /** - * KNOWN_REGEX_UNSPECIFIED = 0; - */ - KNOWN_REGEX_UNSPECIFIED(0), - /** - *
-   * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).
-   * 
- * - * KNOWN_REGEX_HTTP_HEADER_NAME = 1; - */ - KNOWN_REGEX_HTTP_HEADER_NAME(1), - /** - *
-   * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).
-   * 
- * - * KNOWN_REGEX_HTTP_HEADER_VALUE = 2; - */ - KNOWN_REGEX_HTTP_HEADER_VALUE(2), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - KnownRegex.class.getName()); - } - /** - * KNOWN_REGEX_UNSPECIFIED = 0; - */ - public static final int KNOWN_REGEX_UNSPECIFIED_VALUE = 0; - /** - *
-   * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).
-   * 
- * - * KNOWN_REGEX_HTTP_HEADER_NAME = 1; - */ - public static final int KNOWN_REGEX_HTTP_HEADER_NAME_VALUE = 1; - /** - *
-   * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).
-   * 
- * - * KNOWN_REGEX_HTTP_HEADER_VALUE = 2; - */ - public static final int KNOWN_REGEX_HTTP_HEADER_VALUE_VALUE = 2; - - - public final int getNumber() { - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static KnownRegex valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static KnownRegex forNumber(int value) { - switch (value) { - case 0: return KNOWN_REGEX_UNSPECIFIED; - case 1: return KNOWN_REGEX_HTTP_HEADER_NAME; - case 2: return KNOWN_REGEX_HTTP_HEADER_VALUE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - KnownRegex> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public KnownRegex findValueByNumber(int number) { - return KnownRegex.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return build.buf.validate.ValidateProto.getDescriptor().getEnumTypes().get(1); - } - - private static final KnownRegex[] VALUES = values(); - - public static KnownRegex valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private KnownRegex(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:buf.validate.KnownRegex) -} - diff --git a/src/main/java/build/buf/validate/MapRules.java b/src/main/java/build/buf/validate/MapRules.java deleted file mode 100644 index c05f6982..00000000 --- a/src/main/java/build/buf/validate/MapRules.java +++ /dev/null @@ -1,1521 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * MapRules describe the constraints applied to `map` values.
- * 
- * - * Protobuf type {@code buf.validate.MapRules} - */ -public final class MapRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - MapRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.MapRules) - MapRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MapRules.class.getName()); - } - // Use MapRules.newBuilder() to construct. - private MapRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private MapRules() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MapRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MapRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.MapRules.class, build.buf.validate.MapRules.Builder.class); - } - - private int bitField0_; - public static final int MIN_PAIRS_FIELD_NUMBER = 1; - private long minPairs_ = 0L; - /** - *
-   * Specifies the minimum number of key-value pairs allowed. If the field has
-   * fewer key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at least 2 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return Whether the minPairs field is set. - */ - @java.lang.Override - public boolean hasMinPairs() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * Specifies the minimum number of key-value pairs allowed. If the field has
-   * fewer key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at least 2 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return The minPairs. - */ - @java.lang.Override - public long getMinPairs() { - return minPairs_; - } - - public static final int MAX_PAIRS_FIELD_NUMBER = 2; - private long maxPairs_ = 0L; - /** - *
-   * Specifies the maximum number of key-value pairs allowed. If the field has
-   * more key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at most 3 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return Whether the maxPairs field is set. - */ - @java.lang.Override - public boolean hasMaxPairs() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * Specifies the maximum number of key-value pairs allowed. If the field has
-   * more key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at most 3 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return The maxPairs. - */ - @java.lang.Override - public long getMaxPairs() { - return maxPairs_; - } - - public static final int KEYS_FIELD_NUMBER = 4; - private build.buf.validate.FieldConstraints keys_; - /** - *
-   * Specifies the constraints to be applied to each key in the field.
-   *
-   * ```proto
-   * message MyMap {
-   * // The keys in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - * @return Whether the keys field is set. - */ - @java.lang.Override - public boolean hasKeys() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * Specifies the constraints to be applied to each key in the field.
-   *
-   * ```proto
-   * message MyMap {
-   * // The keys in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - * @return The keys. - */ - @java.lang.Override - public build.buf.validate.FieldConstraints getKeys() { - return keys_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : keys_; - } - /** - *
-   * Specifies the constraints to be applied to each key in the field.
-   *
-   * ```proto
-   * message MyMap {
-   * // The keys in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - @java.lang.Override - public build.buf.validate.FieldConstraintsOrBuilder getKeysOrBuilder() { - return keys_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : keys_; - } - - public static final int VALUES_FIELD_NUMBER = 5; - private build.buf.validate.FieldConstraints values_; - /** - *
-   * Specifies the constraints to be applied to the value of each key in the
-   * field. Message values will still have their validations evaluated unless
-   * skip is specified here.
-   *
-   * ```proto
-   * message MyMap {
-   * // The values in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.values = {
-   * string: {
-   * min_len: 5
-   * max_len: 20
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - * @return Whether the values field is set. - */ - @java.lang.Override - public boolean hasValues() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-   * Specifies the constraints to be applied to the value of each key in the
-   * field. Message values will still have their validations evaluated unless
-   * skip is specified here.
-   *
-   * ```proto
-   * message MyMap {
-   * // The values in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.values = {
-   * string: {
-   * min_len: 5
-   * max_len: 20
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - * @return The values. - */ - @java.lang.Override - public build.buf.validate.FieldConstraints getValues() { - return values_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : values_; - } - /** - *
-   * Specifies the constraints to be applied to the value of each key in the
-   * field. Message values will still have their validations evaluated unless
-   * skip is specified here.
-   *
-   * ```proto
-   * message MyMap {
-   * // The values in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.values = {
-   * string: {
-   * min_len: 5
-   * max_len: 20
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - @java.lang.Override - public build.buf.validate.FieldConstraintsOrBuilder getValuesOrBuilder() { - return values_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : values_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasKeys()) { - if (!getKeys().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasValues()) { - if (!getValues().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt64(1, minPairs_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt64(2, maxPairs_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getKeys()); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(5, getValues()); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeUInt64Size(1, minPairs_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, maxPairs_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getKeys()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getValues()); - } - size += extensionsSerializedSize(); - 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.MapRules)) { - return super.equals(obj); - } - build.buf.validate.MapRules other = (build.buf.validate.MapRules) obj; - - if (hasMinPairs() != other.hasMinPairs()) return false; - if (hasMinPairs()) { - if (getMinPairs() - != other.getMinPairs()) return false; - } - if (hasMaxPairs() != other.hasMaxPairs()) return false; - if (hasMaxPairs()) { - if (getMaxPairs() - != other.getMaxPairs()) return false; - } - if (hasKeys() != other.hasKeys()) return false; - if (hasKeys()) { - if (!getKeys() - .equals(other.getKeys())) return false; - } - if (hasValues() != other.hasValues()) return false; - if (hasValues()) { - if (!getValues() - .equals(other.getValues())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinPairs()) { - hash = (37 * hash) + MIN_PAIRS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinPairs()); - } - if (hasMaxPairs()) { - hash = (37 * hash) + MAX_PAIRS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxPairs()); - } - if (hasKeys()) { - hash = (37 * hash) + KEYS_FIELD_NUMBER; - hash = (53 * hash) + getKeys().hashCode(); - } - if (hasValues()) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValues().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.MapRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.MapRules 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.MapRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.MapRules 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.MapRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.MapRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.MapRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.MapRules 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.MapRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.MapRules 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.MapRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.MapRules 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.MapRules 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; - } - /** - *
-   * MapRules describe the constraints applied to `map` values.
-   * 
- * - * Protobuf type {@code buf.validate.MapRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.MapRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.MapRules) - build.buf.validate.MapRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MapRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MapRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.MapRules.class, build.buf.validate.MapRules.Builder.class); - } - - // Construct using build.buf.validate.MapRules.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getKeysFieldBuilder(); - getValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - minPairs_ = 0L; - maxPairs_ = 0L; - keys_ = null; - if (keysBuilder_ != null) { - keysBuilder_.dispose(); - keysBuilder_ = null; - } - values_ = null; - if (valuesBuilder_ != null) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MapRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.MapRules getDefaultInstanceForType() { - return build.buf.validate.MapRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.MapRules build() { - build.buf.validate.MapRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.MapRules buildPartial() { - build.buf.validate.MapRules result = new build.buf.validate.MapRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.MapRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.minPairs_ = minPairs_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxPairs_ = maxPairs_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.keys_ = keysBuilder_ == null - ? keys_ - : keysBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.values_ = valuesBuilder_ == null - ? values_ - : valuesBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.MapRules) { - return mergeFrom((build.buf.validate.MapRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.MapRules other) { - if (other == build.buf.validate.MapRules.getDefaultInstance()) return this; - if (other.hasMinPairs()) { - setMinPairs(other.getMinPairs()); - } - if (other.hasMaxPairs()) { - setMaxPairs(other.getMaxPairs()); - } - if (other.hasKeys()) { - mergeKeys(other.getKeys()); - } - if (other.hasValues()) { - mergeValues(other.getValues()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (hasKeys()) { - if (!getKeys().isInitialized()) { - return false; - } - } - if (hasValues()) { - if (!getValues().isInitialized()) { - return false; - } - } - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - minPairs_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - maxPairs_ = input.readUInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 34: { - input.readMessage( - getKeysFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 34 - case 42: { - input.readMessage( - getValuesFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 42 - 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 long minPairs_ ; - /** - *
-     * Specifies the minimum number of key-value pairs allowed. If the field has
-     * fewer key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at least 2 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return Whether the minPairs field is set. - */ - @java.lang.Override - public boolean hasMinPairs() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Specifies the minimum number of key-value pairs allowed. If the field has
-     * fewer key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at least 2 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return The minPairs. - */ - @java.lang.Override - public long getMinPairs() { - return minPairs_; - } - /** - *
-     * Specifies the minimum number of key-value pairs allowed. If the field has
-     * fewer key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at least 2 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @param value The minPairs to set. - * @return This builder for chaining. - */ - public Builder setMinPairs(long value) { - - minPairs_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * Specifies the minimum number of key-value pairs allowed. If the field has
-     * fewer key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at least 2 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMinPairs() { - bitField0_ = (bitField0_ & ~0x00000001); - minPairs_ = 0L; - onChanged(); - return this; - } - - private long maxPairs_ ; - /** - *
-     * Specifies the maximum number of key-value pairs allowed. If the field has
-     * more key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at most 3 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return Whether the maxPairs field is set. - */ - @java.lang.Override - public boolean hasMaxPairs() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Specifies the maximum number of key-value pairs allowed. If the field has
-     * more key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at most 3 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return The maxPairs. - */ - @java.lang.Override - public long getMaxPairs() { - return maxPairs_; - } - /** - *
-     * Specifies the maximum number of key-value pairs allowed. If the field has
-     * more key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at most 3 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @param value The maxPairs to set. - * @return This builder for chaining. - */ - public Builder setMaxPairs(long value) { - - maxPairs_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * Specifies the maximum number of key-value pairs allowed. If the field has
-     * more key-value pairs than specified, an error message is generated.
-     *
-     * ```proto
-     * message MyMap {
-     * // The field `value` must have at most 3 key-value pairs.
-     * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMaxPairs() { - bitField0_ = (bitField0_ & ~0x00000002); - maxPairs_ = 0L; - onChanged(); - return this; - } - - private build.buf.validate.FieldConstraints keys_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder> keysBuilder_; - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - * @return Whether the keys field is set. - */ - public boolean hasKeys() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - * @return The keys. - */ - public build.buf.validate.FieldConstraints getKeys() { - if (keysBuilder_ == null) { - return keys_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : keys_; - } else { - return keysBuilder_.getMessage(); - } - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - public Builder setKeys(build.buf.validate.FieldConstraints value) { - if (keysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - keys_ = value; - } else { - keysBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - public Builder setKeys( - build.buf.validate.FieldConstraints.Builder builderForValue) { - if (keysBuilder_ == null) { - keys_ = builderForValue.build(); - } else { - keysBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - public Builder mergeKeys(build.buf.validate.FieldConstraints value) { - if (keysBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - keys_ != null && - keys_ != build.buf.validate.FieldConstraints.getDefaultInstance()) { - getKeysBuilder().mergeFrom(value); - } else { - keys_ = value; - } - } else { - keysBuilder_.mergeFrom(value); - } - if (keys_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - public Builder clearKeys() { - bitField0_ = (bitField0_ & ~0x00000004); - keys_ = null; - if (keysBuilder_ != null) { - keysBuilder_.dispose(); - keysBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - public build.buf.validate.FieldConstraints.Builder getKeysBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getKeysFieldBuilder().getBuilder(); - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - public build.buf.validate.FieldConstraintsOrBuilder getKeysOrBuilder() { - if (keysBuilder_ != null) { - return keysBuilder_.getMessageOrBuilder(); - } else { - return keys_ == null ? - build.buf.validate.FieldConstraints.getDefaultInstance() : keys_; - } - } - /** - *
-     * Specifies the constraints to be applied to each key in the field.
-     *
-     * ```proto
-     * message MyMap {
-     * // The keys in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder> - getKeysFieldBuilder() { - if (keysBuilder_ == null) { - keysBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder>( - getKeys(), - getParentForChildren(), - isClean()); - keys_ = null; - } - return keysBuilder_; - } - - private build.buf.validate.FieldConstraints values_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder> valuesBuilder_; - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - * @return Whether the values field is set. - */ - public boolean hasValues() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - * @return The values. - */ - public build.buf.validate.FieldConstraints getValues() { - if (valuesBuilder_ == null) { - return values_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : values_; - } else { - return valuesBuilder_.getMessage(); - } - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - public Builder setValues(build.buf.validate.FieldConstraints value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - values_ = value; - } else { - valuesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - public Builder setValues( - build.buf.validate.FieldConstraints.Builder builderForValue) { - if (valuesBuilder_ == null) { - values_ = builderForValue.build(); - } else { - valuesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - public Builder mergeValues(build.buf.validate.FieldConstraints value) { - if (valuesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - values_ != null && - values_ != build.buf.validate.FieldConstraints.getDefaultInstance()) { - getValuesBuilder().mergeFrom(value); - } else { - values_ = value; - } - } else { - valuesBuilder_.mergeFrom(value); - } - if (values_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - public Builder clearValues() { - bitField0_ = (bitField0_ & ~0x00000008); - values_ = null; - if (valuesBuilder_ != null) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - public build.buf.validate.FieldConstraints.Builder getValuesBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getValuesFieldBuilder().getBuilder(); - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - public build.buf.validate.FieldConstraintsOrBuilder getValuesOrBuilder() { - if (valuesBuilder_ != null) { - return valuesBuilder_.getMessageOrBuilder(); - } else { - return values_ == null ? - build.buf.validate.FieldConstraints.getDefaultInstance() : values_; - } - } - /** - *
-     * Specifies the constraints to be applied to the value of each key in the
-     * field. Message values will still have their validations evaluated unless
-     * skip is specified here.
-     *
-     * ```proto
-     * message MyMap {
-     * // The values in the field `value` must follow the specified constraints.
-     * map<string, string> value = 1 [(buf.validate.field).map.values = {
-     * string: {
-     * min_len: 5
-     * max_len: 20
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - valuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder>( - getValues(), - getParentForChildren(), - isClean()); - values_ = null; - } - return valuesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.MapRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.MapRules) - private static final build.buf.validate.MapRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.MapRules(); - } - - public static build.buf.validate.MapRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MapRules 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.MapRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/MapRulesOrBuilder.java b/src/main/java/build/buf/validate/MapRulesOrBuilder.java deleted file mode 100644 index 793813b7..00000000 --- a/src/main/java/build/buf/validate/MapRulesOrBuilder.java +++ /dev/null @@ -1,214 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface MapRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.MapRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * Specifies the minimum number of key-value pairs allowed. If the field has
-   * fewer key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at least 2 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return Whether the minPairs field is set. - */ - boolean hasMinPairs(); - /** - *
-   * Specifies the minimum number of key-value pairs allowed. If the field has
-   * fewer key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at least 2 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_pairs = 1 [json_name = "minPairs", (.buf.validate.predefined) = { ... } - * @return The minPairs. - */ - long getMinPairs(); - - /** - *
-   * Specifies the maximum number of key-value pairs allowed. If the field has
-   * more key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at most 3 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return Whether the maxPairs field is set. - */ - boolean hasMaxPairs(); - /** - *
-   * Specifies the maximum number of key-value pairs allowed. If the field has
-   * more key-value pairs than specified, an error message is generated.
-   *
-   * ```proto
-   * message MyMap {
-   * // The field `value` must have at most 3 key-value pairs.
-   * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_pairs = 2 [json_name = "maxPairs", (.buf.validate.predefined) = { ... } - * @return The maxPairs. - */ - long getMaxPairs(); - - /** - *
-   * Specifies the constraints to be applied to each key in the field.
-   *
-   * ```proto
-   * message MyMap {
-   * // The keys in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - * @return Whether the keys field is set. - */ - boolean hasKeys(); - /** - *
-   * Specifies the constraints to be applied to each key in the field.
-   *
-   * ```proto
-   * message MyMap {
-   * // The keys in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - * @return The keys. - */ - build.buf.validate.FieldConstraints getKeys(); - /** - *
-   * Specifies the constraints to be applied to each key in the field.
-   *
-   * ```proto
-   * message MyMap {
-   * // The keys in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.keys = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints keys = 4 [json_name = "keys"]; - */ - build.buf.validate.FieldConstraintsOrBuilder getKeysOrBuilder(); - - /** - *
-   * Specifies the constraints to be applied to the value of each key in the
-   * field. Message values will still have their validations evaluated unless
-   * skip is specified here.
-   *
-   * ```proto
-   * message MyMap {
-   * // The values in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.values = {
-   * string: {
-   * min_len: 5
-   * max_len: 20
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - * @return Whether the values field is set. - */ - boolean hasValues(); - /** - *
-   * Specifies the constraints to be applied to the value of each key in the
-   * field. Message values will still have their validations evaluated unless
-   * skip is specified here.
-   *
-   * ```proto
-   * message MyMap {
-   * // The values in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.values = {
-   * string: {
-   * min_len: 5
-   * max_len: 20
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - * @return The values. - */ - build.buf.validate.FieldConstraints getValues(); - /** - *
-   * Specifies the constraints to be applied to the value of each key in the
-   * field. Message values will still have their validations evaluated unless
-   * skip is specified here.
-   *
-   * ```proto
-   * message MyMap {
-   * // The values in the field `value` must follow the specified constraints.
-   * map<string, string> value = 1 [(buf.validate.field).map.values = {
-   * string: {
-   * min_len: 5
-   * max_len: 20
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints values = 5 [json_name = "values"]; - */ - build.buf.validate.FieldConstraintsOrBuilder getValuesOrBuilder(); -} diff --git a/src/main/java/build/buf/validate/MessageConstraints.java b/src/main/java/build/buf/validate/MessageConstraints.java deleted file mode 100644 index 2c0fdca7..00000000 --- a/src/main/java/build/buf/validate/MessageConstraints.java +++ /dev/null @@ -1,1330 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * MessageConstraints represents validation rules that are applied to the entire message.
- * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.
- * 
- * - * Protobuf type {@code buf.validate.MessageConstraints} - */ -public final class MessageConstraints extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.MessageConstraints) - MessageConstraintsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - MessageConstraints.class.getName()); - } - // Use MessageConstraints.newBuilder() to construct. - private MessageConstraints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MessageConstraints() { - cel_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MessageConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MessageConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.MessageConstraints.class, build.buf.validate.MessageConstraints.Builder.class); - } - - private int bitField0_; - public static final int DISABLED_FIELD_NUMBER = 1; - private boolean disabled_ = false; - /** - *
-   * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-   * This includes any fields within the message that would otherwise support validation.
-   *
-   * ```proto
-   * message MyMessage {
-   * // validation will be bypassed for this message
-   * option (buf.validate.message).disabled = true;
-   * }
-   * ```
-   * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return Whether the disabled field is set. - */ - @java.lang.Override - public boolean hasDisabled() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-   * This includes any fields within the message that would otherwise support validation.
-   *
-   * ```proto
-   * message MyMessage {
-   * // validation will be bypassed for this message
-   * option (buf.validate.message).disabled = true;
-   * }
-   * ```
-   * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return The disabled. - */ - @java.lang.Override - public boolean getDisabled() { - return disabled_; - } - - public static final int CEL_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List cel_; - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - @java.lang.Override - public java.util.List getCelList() { - return cel_; - } - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - @java.lang.Override - public java.util.List - getCelOrBuilderList() { - return cel_; - } - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - @java.lang.Override - public int getCelCount() { - return cel_.size(); - } - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - @java.lang.Override - public build.buf.validate.Constraint getCel(int index) { - return cel_.get(index); - } - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - @java.lang.Override - public build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index) { - return cel_.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 { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBool(1, disabled_); - } - for (int i = 0; i < cel_.size(); i++) { - output.writeMessage(3, cel_.get(i)); - } - 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 - .computeBoolSize(1, disabled_); - } - for (int i = 0; i < cel_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, cel_.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.MessageConstraints)) { - return super.equals(obj); - } - build.buf.validate.MessageConstraints other = (build.buf.validate.MessageConstraints) obj; - - if (hasDisabled() != other.hasDisabled()) return false; - if (hasDisabled()) { - if (getDisabled() - != other.getDisabled()) return false; - } - if (!getCelList() - .equals(other.getCelList())) 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 (hasDisabled()) { - hash = (37 * hash) + DISABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDisabled()); - } - if (getCelCount() > 0) { - hash = (37 * hash) + CEL_FIELD_NUMBER; - hash = (53 * hash) + getCelList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.MessageConstraints parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.MessageConstraints 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.MessageConstraints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.MessageConstraints 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.MessageConstraints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.MessageConstraints parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.MessageConstraints parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.MessageConstraints 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.MessageConstraints parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.MessageConstraints 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.MessageConstraints parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.MessageConstraints 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.MessageConstraints 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; - } - /** - *
-   * MessageConstraints represents validation rules that are applied to the entire message.
-   * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.
-   * 
- * - * Protobuf type {@code buf.validate.MessageConstraints} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.MessageConstraints) - build.buf.validate.MessageConstraintsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MessageConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MessageConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.MessageConstraints.class, build.buf.validate.MessageConstraints.Builder.class); - } - - // Construct using build.buf.validate.MessageConstraints.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - disabled_ = false; - if (celBuilder_ == null) { - cel_ = java.util.Collections.emptyList(); - } else { - cel_ = null; - celBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_MessageConstraints_descriptor; - } - - @java.lang.Override - public build.buf.validate.MessageConstraints getDefaultInstanceForType() { - return build.buf.validate.MessageConstraints.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.MessageConstraints build() { - build.buf.validate.MessageConstraints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.MessageConstraints buildPartial() { - build.buf.validate.MessageConstraints result = new build.buf.validate.MessageConstraints(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.MessageConstraints result) { - if (celBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - cel_ = java.util.Collections.unmodifiableList(cel_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.cel_ = cel_; - } else { - result.cel_ = celBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.MessageConstraints result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.disabled_ = disabled_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.MessageConstraints) { - return mergeFrom((build.buf.validate.MessageConstraints)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.MessageConstraints other) { - if (other == build.buf.validate.MessageConstraints.getDefaultInstance()) return this; - if (other.hasDisabled()) { - setDisabled(other.getDisabled()); - } - if (celBuilder_ == null) { - if (!other.cel_.isEmpty()) { - if (cel_.isEmpty()) { - cel_ = other.cel_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureCelIsMutable(); - cel_.addAll(other.cel_); - } - onChanged(); - } - } else { - if (!other.cel_.isEmpty()) { - if (celBuilder_.isEmpty()) { - celBuilder_.dispose(); - celBuilder_ = null; - cel_ = other.cel_; - bitField0_ = (bitField0_ & ~0x00000002); - celBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCelFieldBuilder() : null; - } else { - celBuilder_.addAllMessages(other.cel_); - } - } - } - 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 8: { - disabled_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 26: { - build.buf.validate.Constraint m = - input.readMessage( - build.buf.validate.Constraint.parser(), - extensionRegistry); - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(m); - } else { - celBuilder_.addMessage(m); - } - break; - } // case 26 - 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 boolean disabled_ ; - /** - *
-     * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-     * This includes any fields within the message that would otherwise support validation.
-     *
-     * ```proto
-     * message MyMessage {
-     * // validation will be bypassed for this message
-     * option (buf.validate.message).disabled = true;
-     * }
-     * ```
-     * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return Whether the disabled field is set. - */ - @java.lang.Override - public boolean hasDisabled() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-     * This includes any fields within the message that would otherwise support validation.
-     *
-     * ```proto
-     * message MyMessage {
-     * // validation will be bypassed for this message
-     * option (buf.validate.message).disabled = true;
-     * }
-     * ```
-     * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return The disabled. - */ - @java.lang.Override - public boolean getDisabled() { - return disabled_; - } - /** - *
-     * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-     * This includes any fields within the message that would otherwise support validation.
-     *
-     * ```proto
-     * message MyMessage {
-     * // validation will be bypassed for this message
-     * option (buf.validate.message).disabled = true;
-     * }
-     * ```
-     * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @param value The disabled to set. - * @return This builder for chaining. - */ - public Builder setDisabled(boolean value) { - - disabled_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-     * This includes any fields within the message that would otherwise support validation.
-     *
-     * ```proto
-     * message MyMessage {
-     * // validation will be bypassed for this message
-     * option (buf.validate.message).disabled = true;
-     * }
-     * ```
-     * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return This builder for chaining. - */ - public Builder clearDisabled() { - bitField0_ = (bitField0_ & ~0x00000001); - disabled_ = false; - onChanged(); - return this; - } - - private java.util.List cel_ = - java.util.Collections.emptyList(); - private void ensureCelIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - cel_ = new java.util.ArrayList(cel_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder> celBuilder_; - - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public java.util.List getCelList() { - if (celBuilder_ == null) { - return java.util.Collections.unmodifiableList(cel_); - } else { - return celBuilder_.getMessageList(); - } - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public int getCelCount() { - if (celBuilder_ == null) { - return cel_.size(); - } else { - return celBuilder_.getCount(); - } - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public build.buf.validate.Constraint getCel(int index) { - if (celBuilder_ == null) { - return cel_.get(index); - } else { - return celBuilder_.getMessage(index); - } - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder setCel( - int index, build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.set(index, value); - onChanged(); - } else { - celBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder setCel( - int index, build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.set(index, builderForValue.build()); - onChanged(); - } else { - celBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder addCel(build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.add(value); - onChanged(); - } else { - celBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder addCel( - int index, build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.add(index, value); - onChanged(); - } else { - celBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder addCel( - build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(builderForValue.build()); - onChanged(); - } else { - celBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder addCel( - int index, build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(index, builderForValue.build()); - onChanged(); - } else { - celBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder addAllCel( - java.lang.Iterable values) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cel_); - onChanged(); - } else { - celBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder clearCel() { - if (celBuilder_ == null) { - cel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - celBuilder_.clear(); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public Builder removeCel(int index) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.remove(index); - onChanged(); - } else { - celBuilder_.remove(index); - } - return this; - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder getCelBuilder( - int index) { - return getCelFieldBuilder().getBuilder(index); - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index) { - if (celBuilder_ == null) { - return cel_.get(index); } else { - return celBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public java.util.List - getCelOrBuilderList() { - if (celBuilder_ != null) { - return celBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cel_); - } - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder addCelBuilder() { - return getCelFieldBuilder().addBuilder( - build.buf.validate.Constraint.getDefaultInstance()); - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder addCelBuilder( - int index) { - return getCelFieldBuilder().addBuilder( - index, build.buf.validate.Constraint.getDefaultInstance()); - } - /** - *
-     * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-     * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `foo` must be greater than 42.
-     * option (buf.validate.message).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this.foo > 42",
-     * };
-     * optional int32 foo = 1;
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - public java.util.List - getCelBuilderList() { - return getCelFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder> - getCelFieldBuilder() { - if (celBuilder_ == null) { - celBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder>( - cel_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - cel_ = null; - } - return celBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.MessageConstraints) - } - - // @@protoc_insertion_point(class_scope:buf.validate.MessageConstraints) - private static final build.buf.validate.MessageConstraints DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.MessageConstraints(); - } - - public static build.buf.validate.MessageConstraints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MessageConstraints 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.MessageConstraints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/MessageConstraintsOrBuilder.java b/src/main/java/build/buf/validate/MessageConstraintsOrBuilder.java deleted file mode 100644 index 0137006e..00000000 --- a/src/main/java/build/buf/validate/MessageConstraintsOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface MessageConstraintsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.MessageConstraints) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-   * This includes any fields within the message that would otherwise support validation.
-   *
-   * ```proto
-   * message MyMessage {
-   * // validation will be bypassed for this message
-   * option (buf.validate.message).disabled = true;
-   * }
-   * ```
-   * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return Whether the disabled field is set. - */ - boolean hasDisabled(); - /** - *
-   * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
-   * This includes any fields within the message that would otherwise support validation.
-   *
-   * ```proto
-   * message MyMessage {
-   * // validation will be bypassed for this message
-   * option (buf.validate.message).disabled = true;
-   * }
-   * ```
-   * 
- * - * optional bool disabled = 1 [json_name = "disabled"]; - * @return The disabled. - */ - boolean getDisabled(); - - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - java.util.List - getCelList(); - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - build.buf.validate.Constraint getCel(int index); - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - int getCelCount(); - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - java.util.List - getCelOrBuilderList(); - /** - *
-   * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
-   * These constraints are written in Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `foo` must be greater than 42.
-   * option (buf.validate.message).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this.foo > 42",
-   * };
-   * optional int32 foo = 1;
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; - */ - build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index); -} diff --git a/src/main/java/build/buf/validate/OneofConstraints.java b/src/main/java/build/buf/validate/OneofConstraints.java deleted file mode 100644 index 7b2e3036..00000000 --- a/src/main/java/build/buf/validate/OneofConstraints.java +++ /dev/null @@ -1,587 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * The `OneofConstraints` message type enables you to manage constraints for
- * oneof fields in your protobuf messages.
- * 
- * - * Protobuf type {@code buf.validate.OneofConstraints} - */ -public final class OneofConstraints extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.OneofConstraints) - OneofConstraintsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - OneofConstraints.class.getName()); - } - // Use OneofConstraints.newBuilder() to construct. - private OneofConstraints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OneofConstraints() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_OneofConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_OneofConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.OneofConstraints.class, build.buf.validate.OneofConstraints.Builder.class); - } - - private int bitField0_; - public static final int REQUIRED_FIELD_NUMBER = 1; - private boolean required_ = false; - /** - *
-   * If `required` is true, exactly one field of the oneof must be present. A
-   * validation error is returned if no fields in the oneof are present. The
-   * field itself may still be a default value; further constraints
-   * should be placed on the fields themselves to ensure they are valid values,
-   * such as `min_len` or `gt`.
-   *
-   * ```proto
-   * message MyMessage {
-   * oneof value {
-   * // Either `a` or `b` must be set. If `a` is set, it must also be
-   * // non-empty; whereas if `b` is set, it can still be an empty string.
-   * option (buf.validate.oneof).required = true;
-   * string a = 1 [(buf.validate.field).string.min_len = 1];
-   * string b = 2;
-   * }
-   * }
-   * ```
-   * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return Whether the required field is set. - */ - @java.lang.Override - public boolean hasRequired() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * If `required` is true, exactly one field of the oneof must be present. A
-   * validation error is returned if no fields in the oneof are present. The
-   * field itself may still be a default value; further constraints
-   * should be placed on the fields themselves to ensure they are valid values,
-   * such as `min_len` or `gt`.
-   *
-   * ```proto
-   * message MyMessage {
-   * oneof value {
-   * // Either `a` or `b` must be set. If `a` is set, it must also be
-   * // non-empty; whereas if `b` is set, it can still be an empty string.
-   * option (buf.validate.oneof).required = true;
-   * string a = 1 [(buf.validate.field).string.min_len = 1];
-   * string b = 2;
-   * }
-   * }
-   * ```
-   * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return The required. - */ - @java.lang.Override - public boolean getRequired() { - return required_; - } - - 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.writeBool(1, required_); - } - 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 - .computeBoolSize(1, required_); - } - 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.OneofConstraints)) { - return super.equals(obj); - } - build.buf.validate.OneofConstraints other = (build.buf.validate.OneofConstraints) obj; - - if (hasRequired() != other.hasRequired()) return false; - if (hasRequired()) { - if (getRequired() - != other.getRequired()) 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 (hasRequired()) { - hash = (37 * hash) + REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getRequired()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.OneofConstraints parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.OneofConstraints 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.OneofConstraints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.OneofConstraints 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.OneofConstraints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.OneofConstraints parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.OneofConstraints parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.OneofConstraints 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.OneofConstraints parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.OneofConstraints 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.OneofConstraints parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.OneofConstraints 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.OneofConstraints 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; - } - /** - *
-   * The `OneofConstraints` message type enables you to manage constraints for
-   * oneof fields in your protobuf messages.
-   * 
- * - * Protobuf type {@code buf.validate.OneofConstraints} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.OneofConstraints) - build.buf.validate.OneofConstraintsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_OneofConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_OneofConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.OneofConstraints.class, build.buf.validate.OneofConstraints.Builder.class); - } - - // Construct using build.buf.validate.OneofConstraints.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - required_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_OneofConstraints_descriptor; - } - - @java.lang.Override - public build.buf.validate.OneofConstraints getDefaultInstanceForType() { - return build.buf.validate.OneofConstraints.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.OneofConstraints build() { - build.buf.validate.OneofConstraints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.OneofConstraints buildPartial() { - build.buf.validate.OneofConstraints result = new build.buf.validate.OneofConstraints(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.OneofConstraints result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.required_ = required_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.OneofConstraints) { - return mergeFrom((build.buf.validate.OneofConstraints)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.OneofConstraints other) { - if (other == build.buf.validate.OneofConstraints.getDefaultInstance()) return this; - if (other.hasRequired()) { - setRequired(other.getRequired()); - } - 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 8: { - required_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - 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 boolean required_ ; - /** - *
-     * If `required` is true, exactly one field of the oneof must be present. A
-     * validation error is returned if no fields in the oneof are present. The
-     * field itself may still be a default value; further constraints
-     * should be placed on the fields themselves to ensure they are valid values,
-     * such as `min_len` or `gt`.
-     *
-     * ```proto
-     * message MyMessage {
-     * oneof value {
-     * // Either `a` or `b` must be set. If `a` is set, it must also be
-     * // non-empty; whereas if `b` is set, it can still be an empty string.
-     * option (buf.validate.oneof).required = true;
-     * string a = 1 [(buf.validate.field).string.min_len = 1];
-     * string b = 2;
-     * }
-     * }
-     * ```
-     * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return Whether the required field is set. - */ - @java.lang.Override - public boolean hasRequired() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * If `required` is true, exactly one field of the oneof must be present. A
-     * validation error is returned if no fields in the oneof are present. The
-     * field itself may still be a default value; further constraints
-     * should be placed on the fields themselves to ensure they are valid values,
-     * such as `min_len` or `gt`.
-     *
-     * ```proto
-     * message MyMessage {
-     * oneof value {
-     * // Either `a` or `b` must be set. If `a` is set, it must also be
-     * // non-empty; whereas if `b` is set, it can still be an empty string.
-     * option (buf.validate.oneof).required = true;
-     * string a = 1 [(buf.validate.field).string.min_len = 1];
-     * string b = 2;
-     * }
-     * }
-     * ```
-     * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return The required. - */ - @java.lang.Override - public boolean getRequired() { - return required_; - } - /** - *
-     * If `required` is true, exactly one field of the oneof must be present. A
-     * validation error is returned if no fields in the oneof are present. The
-     * field itself may still be a default value; further constraints
-     * should be placed on the fields themselves to ensure they are valid values,
-     * such as `min_len` or `gt`.
-     *
-     * ```proto
-     * message MyMessage {
-     * oneof value {
-     * // Either `a` or `b` must be set. If `a` is set, it must also be
-     * // non-empty; whereas if `b` is set, it can still be an empty string.
-     * option (buf.validate.oneof).required = true;
-     * string a = 1 [(buf.validate.field).string.min_len = 1];
-     * string b = 2;
-     * }
-     * }
-     * ```
-     * 
- * - * optional bool required = 1 [json_name = "required"]; - * @param value The required to set. - * @return This builder for chaining. - */ - public Builder setRequired(boolean value) { - - required_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * If `required` is true, exactly one field of the oneof must be present. A
-     * validation error is returned if no fields in the oneof are present. The
-     * field itself may still be a default value; further constraints
-     * should be placed on the fields themselves to ensure they are valid values,
-     * such as `min_len` or `gt`.
-     *
-     * ```proto
-     * message MyMessage {
-     * oneof value {
-     * // Either `a` or `b` must be set. If `a` is set, it must also be
-     * // non-empty; whereas if `b` is set, it can still be an empty string.
-     * option (buf.validate.oneof).required = true;
-     * string a = 1 [(buf.validate.field).string.min_len = 1];
-     * string b = 2;
-     * }
-     * }
-     * ```
-     * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return This builder for chaining. - */ - public Builder clearRequired() { - bitField0_ = (bitField0_ & ~0x00000001); - required_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.OneofConstraints) - } - - // @@protoc_insertion_point(class_scope:buf.validate.OneofConstraints) - private static final build.buf.validate.OneofConstraints DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.OneofConstraints(); - } - - public static build.buf.validate.OneofConstraints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OneofConstraints 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.OneofConstraints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/OneofConstraintsOrBuilder.java b/src/main/java/build/buf/validate/OneofConstraintsOrBuilder.java deleted file mode 100644 index 7fb266c3..00000000 --- a/src/main/java/build/buf/validate/OneofConstraintsOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface OneofConstraintsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.OneofConstraints) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If `required` is true, exactly one field of the oneof must be present. A
-   * validation error is returned if no fields in the oneof are present. The
-   * field itself may still be a default value; further constraints
-   * should be placed on the fields themselves to ensure they are valid values,
-   * such as `min_len` or `gt`.
-   *
-   * ```proto
-   * message MyMessage {
-   * oneof value {
-   * // Either `a` or `b` must be set. If `a` is set, it must also be
-   * // non-empty; whereas if `b` is set, it can still be an empty string.
-   * option (buf.validate.oneof).required = true;
-   * string a = 1 [(buf.validate.field).string.min_len = 1];
-   * string b = 2;
-   * }
-   * }
-   * ```
-   * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return Whether the required field is set. - */ - boolean hasRequired(); - /** - *
-   * If `required` is true, exactly one field of the oneof must be present. A
-   * validation error is returned if no fields in the oneof are present. The
-   * field itself may still be a default value; further constraints
-   * should be placed on the fields themselves to ensure they are valid values,
-   * such as `min_len` or `gt`.
-   *
-   * ```proto
-   * message MyMessage {
-   * oneof value {
-   * // Either `a` or `b` must be set. If `a` is set, it must also be
-   * // non-empty; whereas if `b` is set, it can still be an empty string.
-   * option (buf.validate.oneof).required = true;
-   * string a = 1 [(buf.validate.field).string.min_len = 1];
-   * string b = 2;
-   * }
-   * }
-   * ```
-   * 
- * - * optional bool required = 1 [json_name = "required"]; - * @return The required. - */ - boolean getRequired(); -} diff --git a/src/main/java/build/buf/validate/PredefinedConstraints.java b/src/main/java/build/buf/validate/PredefinedConstraints.java deleted file mode 100644 index 0d34f198..00000000 --- a/src/main/java/build/buf/validate/PredefinedConstraints.java +++ /dev/null @@ -1,1120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * PredefinedConstraints are custom constraints that can be re-used with
- * multiple fields.
- * 
- * - * Protobuf type {@code buf.validate.PredefinedConstraints} - */ -public final class PredefinedConstraints extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.PredefinedConstraints) - PredefinedConstraintsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - PredefinedConstraints.class.getName()); - } - // Use PredefinedConstraints.newBuilder() to construct. - private PredefinedConstraints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PredefinedConstraints() { - cel_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_PredefinedConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_PredefinedConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.PredefinedConstraints.class, build.buf.validate.PredefinedConstraints.Builder.class); - } - - public static final int CEL_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List cel_; - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - @java.lang.Override - public java.util.List getCelList() { - return cel_; - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - @java.lang.Override - public java.util.List - getCelOrBuilderList() { - return cel_; - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - @java.lang.Override - public int getCelCount() { - return cel_.size(); - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - @java.lang.Override - public build.buf.validate.Constraint getCel(int index) { - return cel_.get(index); - } - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - @java.lang.Override - public build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index) { - return cel_.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 < cel_.size(); i++) { - output.writeMessage(1, cel_.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 < cel_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, cel_.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.PredefinedConstraints)) { - return super.equals(obj); - } - build.buf.validate.PredefinedConstraints other = (build.buf.validate.PredefinedConstraints) obj; - - if (!getCelList() - .equals(other.getCelList())) 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 (getCelCount() > 0) { - hash = (37 * hash) + CEL_FIELD_NUMBER; - hash = (53 * hash) + getCelList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.PredefinedConstraints parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.PredefinedConstraints 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.PredefinedConstraints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.PredefinedConstraints 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.PredefinedConstraints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.PredefinedConstraints parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.PredefinedConstraints parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.PredefinedConstraints 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.PredefinedConstraints parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.PredefinedConstraints 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.PredefinedConstraints parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.PredefinedConstraints 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.PredefinedConstraints 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; - } - /** - *
-   * PredefinedConstraints are custom constraints that can be re-used with
-   * multiple fields.
-   * 
- * - * Protobuf type {@code buf.validate.PredefinedConstraints} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.PredefinedConstraints) - build.buf.validate.PredefinedConstraintsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_PredefinedConstraints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_PredefinedConstraints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.PredefinedConstraints.class, build.buf.validate.PredefinedConstraints.Builder.class); - } - - // Construct using build.buf.validate.PredefinedConstraints.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (celBuilder_ == null) { - cel_ = java.util.Collections.emptyList(); - } else { - cel_ = null; - celBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_PredefinedConstraints_descriptor; - } - - @java.lang.Override - public build.buf.validate.PredefinedConstraints getDefaultInstanceForType() { - return build.buf.validate.PredefinedConstraints.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.PredefinedConstraints build() { - build.buf.validate.PredefinedConstraints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.PredefinedConstraints buildPartial() { - build.buf.validate.PredefinedConstraints result = new build.buf.validate.PredefinedConstraints(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.PredefinedConstraints result) { - if (celBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cel_ = java.util.Collections.unmodifiableList(cel_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cel_ = cel_; - } else { - result.cel_ = celBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.PredefinedConstraints result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.PredefinedConstraints) { - return mergeFrom((build.buf.validate.PredefinedConstraints)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.PredefinedConstraints other) { - if (other == build.buf.validate.PredefinedConstraints.getDefaultInstance()) return this; - if (celBuilder_ == null) { - if (!other.cel_.isEmpty()) { - if (cel_.isEmpty()) { - cel_ = other.cel_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCelIsMutable(); - cel_.addAll(other.cel_); - } - onChanged(); - } - } else { - if (!other.cel_.isEmpty()) { - if (celBuilder_.isEmpty()) { - celBuilder_.dispose(); - celBuilder_ = null; - cel_ = other.cel_; - bitField0_ = (bitField0_ & ~0x00000001); - celBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCelFieldBuilder() : null; - } else { - celBuilder_.addAllMessages(other.cel_); - } - } - } - 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: { - build.buf.validate.Constraint m = - input.readMessage( - build.buf.validate.Constraint.parser(), - extensionRegistry); - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(m); - } else { - celBuilder_.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 cel_ = - java.util.Collections.emptyList(); - private void ensureCelIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cel_ = new java.util.ArrayList(cel_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder> celBuilder_; - - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public java.util.List getCelList() { - if (celBuilder_ == null) { - return java.util.Collections.unmodifiableList(cel_); - } else { - return celBuilder_.getMessageList(); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public int getCelCount() { - if (celBuilder_ == null) { - return cel_.size(); - } else { - return celBuilder_.getCount(); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public build.buf.validate.Constraint getCel(int index) { - if (celBuilder_ == null) { - return cel_.get(index); - } else { - return celBuilder_.getMessage(index); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder setCel( - int index, build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.set(index, value); - onChanged(); - } else { - celBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder setCel( - int index, build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.set(index, builderForValue.build()); - onChanged(); - } else { - celBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder addCel(build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.add(value); - onChanged(); - } else { - celBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder addCel( - int index, build.buf.validate.Constraint value) { - if (celBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelIsMutable(); - cel_.add(index, value); - onChanged(); - } else { - celBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder addCel( - build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(builderForValue.build()); - onChanged(); - } else { - celBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder addCel( - int index, build.buf.validate.Constraint.Builder builderForValue) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.add(index, builderForValue.build()); - onChanged(); - } else { - celBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder addAllCel( - java.lang.Iterable values) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cel_); - onChanged(); - } else { - celBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder clearCel() { - if (celBuilder_ == null) { - cel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - celBuilder_.clear(); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public Builder removeCel(int index) { - if (celBuilder_ == null) { - ensureCelIsMutable(); - cel_.remove(index); - onChanged(); - } else { - celBuilder_.remove(index); - } - return this; - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder getCelBuilder( - int index) { - return getCelFieldBuilder().getBuilder(index); - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index) { - if (celBuilder_ == null) { - return cel_.get(index); } else { - return celBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public java.util.List - getCelOrBuilderList() { - if (celBuilder_ != null) { - return celBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cel_); - } - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder addCelBuilder() { - return getCelFieldBuilder().addBuilder( - build.buf.validate.Constraint.getDefaultInstance()); - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public build.buf.validate.Constraint.Builder addCelBuilder( - int index) { - return getCelFieldBuilder().addBuilder( - index, build.buf.validate.Constraint.getDefaultInstance()); - } - /** - *
-     * `cel` is a repeated field used to represent a textual expression
-     * in the Common Expression Language (CEL) syntax. For more information on
-     * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-     *
-     * ```proto
-     * message MyMessage {
-     * // The field `value` must be greater than 42.
-     * optional int32 value = 1 [(buf.validate.predefined).cel = {
-     * id: "my_message.value",
-     * message: "value must be greater than 42",
-     * expression: "this > 42",
-     * }];
-     * }
-     * ```
-     * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - public java.util.List - getCelBuilderList() { - return getCelFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder> - getCelFieldBuilder() { - if (celBuilder_ == null) { - celBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Constraint, build.buf.validate.Constraint.Builder, build.buf.validate.ConstraintOrBuilder>( - cel_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cel_ = null; - } - return celBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.PredefinedConstraints) - } - - // @@protoc_insertion_point(class_scope:buf.validate.PredefinedConstraints) - private static final build.buf.validate.PredefinedConstraints DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.PredefinedConstraints(); - } - - public static build.buf.validate.PredefinedConstraints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredefinedConstraints 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.PredefinedConstraints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/PredefinedConstraintsOrBuilder.java b/src/main/java/build/buf/validate/PredefinedConstraintsOrBuilder.java deleted file mode 100644 index 9aa87b0d..00000000 --- a/src/main/java/build/buf/validate/PredefinedConstraintsOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface PredefinedConstraintsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.PredefinedConstraints) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - java.util.List - getCelList(); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - build.buf.validate.Constraint getCel(int index); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - int getCelCount(); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - java.util.List - getCelOrBuilderList(); - /** - *
-   * `cel` is a repeated field used to represent a textual expression
-   * in the Common Expression Language (CEL) syntax. For more information on
-   * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
-   *
-   * ```proto
-   * message MyMessage {
-   * // The field `value` must be greater than 42.
-   * optional int32 value = 1 [(buf.validate.predefined).cel = {
-   * id: "my_message.value",
-   * message: "value must be greater than 42",
-   * expression: "this > 42",
-   * }];
-   * }
-   * ```
-   * 
- * - * repeated .buf.validate.Constraint cel = 1 [json_name = "cel"]; - */ - build.buf.validate.ConstraintOrBuilder getCelOrBuilder( - int index); -} diff --git a/src/main/java/build/buf/validate/RepeatedRules.java b/src/main/java/build/buf/validate/RepeatedRules.java deleted file mode 100644 index f53adb4b..00000000 --- a/src/main/java/build/buf/validate/RepeatedRules.java +++ /dev/null @@ -1,1324 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * RepeatedRules describe the constraints applied to `repeated` values.
- * 
- * - * Protobuf type {@code buf.validate.RepeatedRules} - */ -public final class RepeatedRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - RepeatedRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.RepeatedRules) - RepeatedRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - RepeatedRules.class.getName()); - } - // Use RepeatedRules.newBuilder() to construct. - private RepeatedRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private RepeatedRules() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_RepeatedRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_RepeatedRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.RepeatedRules.class, build.buf.validate.RepeatedRules.Builder.class); - } - - private int bitField0_; - public static final int MIN_ITEMS_FIELD_NUMBER = 1; - private long minItems_ = 0L; - /** - *
-   * `min_items` requires that this field must contain at least the specified
-   * minimum number of items.
-   *
-   * Note that `min_items = 1` is equivalent to setting a field as `required`.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain at least  2 items
-   * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return Whether the minItems field is set. - */ - @java.lang.Override - public boolean hasMinItems() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `min_items` requires that this field must contain at least the specified
-   * minimum number of items.
-   *
-   * Note that `min_items = 1` is equivalent to setting a field as `required`.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain at least  2 items
-   * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return The minItems. - */ - @java.lang.Override - public long getMinItems() { - return minItems_; - } - - public static final int MAX_ITEMS_FIELD_NUMBER = 2; - private long maxItems_ = 0L; - /** - *
-   * `max_items` denotes that this field must not exceed a
-   * certain number of items as the upper limit. If the field contains more
-   * items than specified, an error message will be generated, requiring the
-   * field to maintain no more than the specified number of items.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain no more than 3 item(s)
-   * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return Whether the maxItems field is set. - */ - @java.lang.Override - public boolean hasMaxItems() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `max_items` denotes that this field must not exceed a
-   * certain number of items as the upper limit. If the field contains more
-   * items than specified, an error message will be generated, requiring the
-   * field to maintain no more than the specified number of items.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain no more than 3 item(s)
-   * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return The maxItems. - */ - @java.lang.Override - public long getMaxItems() { - return maxItems_; - } - - public static final int UNIQUE_FIELD_NUMBER = 3; - private boolean unique_ = false; - /** - *
-   * `unique` indicates that all elements in this field must
-   * be unique. This constraint is strictly applicable to scalar and enum
-   * types, with message types not being supported.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // repeated value must contain unique items
-   * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-   * }
-   * ```
-   * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return Whether the unique field is set. - */ - @java.lang.Override - public boolean hasUnique() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * `unique` indicates that all elements in this field must
-   * be unique. This constraint is strictly applicable to scalar and enum
-   * types, with message types not being supported.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // repeated value must contain unique items
-   * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-   * }
-   * ```
-   * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return The unique. - */ - @java.lang.Override - public boolean getUnique() { - return unique_; - } - - public static final int ITEMS_FIELD_NUMBER = 4; - private build.buf.validate.FieldConstraints items_; - /** - *
-   * `items` details the constraints to be applied to each item
-   * in the field. Even for repeated message fields, validation is executed
-   * against each item unless skip is explicitly specified.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // The items in the field `value` must follow the specified constraints.
-   * repeated string value = 1 [(buf.validate.field).repeated.items = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - * @return Whether the items field is set. - */ - @java.lang.Override - public boolean hasItems() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-   * `items` details the constraints to be applied to each item
-   * in the field. Even for repeated message fields, validation is executed
-   * against each item unless skip is explicitly specified.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // The items in the field `value` must follow the specified constraints.
-   * repeated string value = 1 [(buf.validate.field).repeated.items = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - * @return The items. - */ - @java.lang.Override - public build.buf.validate.FieldConstraints getItems() { - return items_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : items_; - } - /** - *
-   * `items` details the constraints to be applied to each item
-   * in the field. Even for repeated message fields, validation is executed
-   * against each item unless skip is explicitly specified.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // The items in the field `value` must follow the specified constraints.
-   * repeated string value = 1 [(buf.validate.field).repeated.items = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - @java.lang.Override - public build.buf.validate.FieldConstraintsOrBuilder getItemsOrBuilder() { - return items_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : items_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (hasItems()) { - if (!getItems().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt64(1, minItems_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt64(2, maxItems_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeBool(3, unique_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(4, getItems()); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeUInt64Size(1, minItems_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, maxItems_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, unique_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getItems()); - } - size += extensionsSerializedSize(); - 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.RepeatedRules)) { - return super.equals(obj); - } - build.buf.validate.RepeatedRules other = (build.buf.validate.RepeatedRules) obj; - - if (hasMinItems() != other.hasMinItems()) return false; - if (hasMinItems()) { - if (getMinItems() - != other.getMinItems()) return false; - } - if (hasMaxItems() != other.hasMaxItems()) return false; - if (hasMaxItems()) { - if (getMaxItems() - != other.getMaxItems()) return false; - } - if (hasUnique() != other.hasUnique()) return false; - if (hasUnique()) { - if (getUnique() - != other.getUnique()) return false; - } - if (hasItems() != other.hasItems()) return false; - if (hasItems()) { - if (!getItems() - .equals(other.getItems())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinItems()) { - hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinItems()); - } - if (hasMaxItems()) { - hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxItems()); - } - if (hasUnique()) { - hash = (37 * hash) + UNIQUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getUnique()); - } - if (hasItems()) { - hash = (37 * hash) + ITEMS_FIELD_NUMBER; - hash = (53 * hash) + getItems().hashCode(); - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.RepeatedRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.RepeatedRules 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.RepeatedRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.RepeatedRules 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.RepeatedRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.RepeatedRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.RepeatedRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.RepeatedRules 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.RepeatedRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.RepeatedRules 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.RepeatedRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.RepeatedRules 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.RepeatedRules 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; - } - /** - *
-   * RepeatedRules describe the constraints applied to `repeated` values.
-   * 
- * - * Protobuf type {@code buf.validate.RepeatedRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.RepeatedRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.RepeatedRules) - build.buf.validate.RepeatedRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_RepeatedRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_RepeatedRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.RepeatedRules.class, build.buf.validate.RepeatedRules.Builder.class); - } - - // Construct using build.buf.validate.RepeatedRules.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getItemsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - minItems_ = 0L; - maxItems_ = 0L; - unique_ = false; - items_ = null; - if (itemsBuilder_ != null) { - itemsBuilder_.dispose(); - itemsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_RepeatedRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.RepeatedRules getDefaultInstanceForType() { - return build.buf.validate.RepeatedRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.RepeatedRules build() { - build.buf.validate.RepeatedRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.RepeatedRules buildPartial() { - build.buf.validate.RepeatedRules result = new build.buf.validate.RepeatedRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.RepeatedRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.minItems_ = minItems_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxItems_ = maxItems_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.unique_ = unique_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.items_ = itemsBuilder_ == null - ? items_ - : itemsBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.RepeatedRules) { - return mergeFrom((build.buf.validate.RepeatedRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.RepeatedRules other) { - if (other == build.buf.validate.RepeatedRules.getDefaultInstance()) return this; - if (other.hasMinItems()) { - setMinItems(other.getMinItems()); - } - if (other.hasMaxItems()) { - setMaxItems(other.getMaxItems()); - } - if (other.hasUnique()) { - setUnique(other.getUnique()); - } - if (other.hasItems()) { - mergeItems(other.getItems()); - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (hasItems()) { - if (!getItems().isInitialized()) { - return false; - } - } - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - minItems_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - maxItems_ = input.readUInt64(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - unique_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - input.readMessage( - getItemsFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - 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 long minItems_ ; - /** - *
-     * `min_items` requires that this field must contain at least the specified
-     * minimum number of items.
-     *
-     * Note that `min_items = 1` is equivalent to setting a field as `required`.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain at least  2 items
-     * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return Whether the minItems field is set. - */ - @java.lang.Override - public boolean hasMinItems() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `min_items` requires that this field must contain at least the specified
-     * minimum number of items.
-     *
-     * Note that `min_items = 1` is equivalent to setting a field as `required`.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain at least  2 items
-     * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return The minItems. - */ - @java.lang.Override - public long getMinItems() { - return minItems_; - } - /** - *
-     * `min_items` requires that this field must contain at least the specified
-     * minimum number of items.
-     *
-     * Note that `min_items = 1` is equivalent to setting a field as `required`.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain at least  2 items
-     * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @param value The minItems to set. - * @return This builder for chaining. - */ - public Builder setMinItems(long value) { - - minItems_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `min_items` requires that this field must contain at least the specified
-     * minimum number of items.
-     *
-     * Note that `min_items = 1` is equivalent to setting a field as `required`.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain at least  2 items
-     * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMinItems() { - bitField0_ = (bitField0_ & ~0x00000001); - minItems_ = 0L; - onChanged(); - return this; - } - - private long maxItems_ ; - /** - *
-     * `max_items` denotes that this field must not exceed a
-     * certain number of items as the upper limit. If the field contains more
-     * items than specified, an error message will be generated, requiring the
-     * field to maintain no more than the specified number of items.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain no more than 3 item(s)
-     * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return Whether the maxItems field is set. - */ - @java.lang.Override - public boolean hasMaxItems() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `max_items` denotes that this field must not exceed a
-     * certain number of items as the upper limit. If the field contains more
-     * items than specified, an error message will be generated, requiring the
-     * field to maintain no more than the specified number of items.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain no more than 3 item(s)
-     * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return The maxItems. - */ - @java.lang.Override - public long getMaxItems() { - return maxItems_; - } - /** - *
-     * `max_items` denotes that this field must not exceed a
-     * certain number of items as the upper limit. If the field contains more
-     * items than specified, an error message will be generated, requiring the
-     * field to maintain no more than the specified number of items.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain no more than 3 item(s)
-     * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @param value The maxItems to set. - * @return This builder for chaining. - */ - public Builder setMaxItems(long value) { - - maxItems_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `max_items` denotes that this field must not exceed a
-     * certain number of items as the upper limit. If the field contains more
-     * items than specified, an error message will be generated, requiring the
-     * field to maintain no more than the specified number of items.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // value must contain no more than 3 item(s)
-     * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMaxItems() { - bitField0_ = (bitField0_ & ~0x00000002); - maxItems_ = 0L; - onChanged(); - return this; - } - - private boolean unique_ ; - /** - *
-     * `unique` indicates that all elements in this field must
-     * be unique. This constraint is strictly applicable to scalar and enum
-     * types, with message types not being supported.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // repeated value must contain unique items
-     * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-     * }
-     * ```
-     * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return Whether the unique field is set. - */ - @java.lang.Override - public boolean hasUnique() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * `unique` indicates that all elements in this field must
-     * be unique. This constraint is strictly applicable to scalar and enum
-     * types, with message types not being supported.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // repeated value must contain unique items
-     * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-     * }
-     * ```
-     * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return The unique. - */ - @java.lang.Override - public boolean getUnique() { - return unique_; - } - /** - *
-     * `unique` indicates that all elements in this field must
-     * be unique. This constraint is strictly applicable to scalar and enum
-     * types, with message types not being supported.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // repeated value must contain unique items
-     * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-     * }
-     * ```
-     * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @param value The unique to set. - * @return This builder for chaining. - */ - public Builder setUnique(boolean value) { - - unique_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `unique` indicates that all elements in this field must
-     * be unique. This constraint is strictly applicable to scalar and enum
-     * types, with message types not being supported.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // repeated value must contain unique items
-     * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-     * }
-     * ```
-     * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearUnique() { - bitField0_ = (bitField0_ & ~0x00000004); - unique_ = false; - onChanged(); - return this; - } - - private build.buf.validate.FieldConstraints items_; - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder> itemsBuilder_; - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - * @return Whether the items field is set. - */ - public boolean hasItems() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - * @return The items. - */ - public build.buf.validate.FieldConstraints getItems() { - if (itemsBuilder_ == null) { - return items_ == null ? build.buf.validate.FieldConstraints.getDefaultInstance() : items_; - } else { - return itemsBuilder_.getMessage(); - } - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - public Builder setItems(build.buf.validate.FieldConstraints value) { - if (itemsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - items_ = value; - } else { - itemsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - public Builder setItems( - build.buf.validate.FieldConstraints.Builder builderForValue) { - if (itemsBuilder_ == null) { - items_ = builderForValue.build(); - } else { - itemsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - public Builder mergeItems(build.buf.validate.FieldConstraints value) { - if (itemsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - items_ != null && - items_ != build.buf.validate.FieldConstraints.getDefaultInstance()) { - getItemsBuilder().mergeFrom(value); - } else { - items_ = value; - } - } else { - itemsBuilder_.mergeFrom(value); - } - if (items_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - public Builder clearItems() { - bitField0_ = (bitField0_ & ~0x00000008); - items_ = null; - if (itemsBuilder_ != null) { - itemsBuilder_.dispose(); - itemsBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - public build.buf.validate.FieldConstraints.Builder getItemsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getItemsFieldBuilder().getBuilder(); - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - public build.buf.validate.FieldConstraintsOrBuilder getItemsOrBuilder() { - if (itemsBuilder_ != null) { - return itemsBuilder_.getMessageOrBuilder(); - } else { - return items_ == null ? - build.buf.validate.FieldConstraints.getDefaultInstance() : items_; - } - } - /** - *
-     * `items` details the constraints to be applied to each item
-     * in the field. Even for repeated message fields, validation is executed
-     * against each item unless skip is explicitly specified.
-     *
-     * ```proto
-     * message MyRepeated {
-     * // The items in the field `value` must follow the specified constraints.
-     * repeated string value = 1 [(buf.validate.field).repeated.items = {
-     * string: {
-     * min_len: 3
-     * max_len: 10
-     * }
-     * }];
-     * }
-     * ```
-     * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - private com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder> - getItemsFieldBuilder() { - if (itemsBuilder_ == null) { - itemsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - build.buf.validate.FieldConstraints, build.buf.validate.FieldConstraints.Builder, build.buf.validate.FieldConstraintsOrBuilder>( - getItems(), - getParentForChildren(), - isClean()); - items_ = null; - } - return itemsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.RepeatedRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.RepeatedRules) - private static final build.buf.validate.RepeatedRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.RepeatedRules(); - } - - public static build.buf.validate.RepeatedRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RepeatedRules 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.RepeatedRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/RepeatedRulesOrBuilder.java b/src/main/java/build/buf/validate/RepeatedRulesOrBuilder.java deleted file mode 100644 index fd7078ec..00000000 --- a/src/main/java/build/buf/validate/RepeatedRulesOrBuilder.java +++ /dev/null @@ -1,196 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface RepeatedRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.RepeatedRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `min_items` requires that this field must contain at least the specified
-   * minimum number of items.
-   *
-   * Note that `min_items = 1` is equivalent to setting a field as `required`.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain at least  2 items
-   * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return Whether the minItems field is set. - */ - boolean hasMinItems(); - /** - *
-   * `min_items` requires that this field must contain at least the specified
-   * minimum number of items.
-   *
-   * Note that `min_items = 1` is equivalent to setting a field as `required`.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain at least  2 items
-   * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.predefined) = { ... } - * @return The minItems. - */ - long getMinItems(); - - /** - *
-   * `max_items` denotes that this field must not exceed a
-   * certain number of items as the upper limit. If the field contains more
-   * items than specified, an error message will be generated, requiring the
-   * field to maintain no more than the specified number of items.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain no more than 3 item(s)
-   * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return Whether the maxItems field is set. - */ - boolean hasMaxItems(); - /** - *
-   * `max_items` denotes that this field must not exceed a
-   * certain number of items as the upper limit. If the field contains more
-   * items than specified, an error message will be generated, requiring the
-   * field to maintain no more than the specified number of items.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // value must contain no more than 3 item(s)
-   * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.predefined) = { ... } - * @return The maxItems. - */ - long getMaxItems(); - - /** - *
-   * `unique` indicates that all elements in this field must
-   * be unique. This constraint is strictly applicable to scalar and enum
-   * types, with message types not being supported.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // repeated value must contain unique items
-   * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-   * }
-   * ```
-   * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return Whether the unique field is set. - */ - boolean hasUnique(); - /** - *
-   * `unique` indicates that all elements in this field must
-   * be unique. This constraint is strictly applicable to scalar and enum
-   * types, with message types not being supported.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // repeated value must contain unique items
-   * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
-   * }
-   * ```
-   * 
- * - * optional bool unique = 3 [json_name = "unique", (.buf.validate.predefined) = { ... } - * @return The unique. - */ - boolean getUnique(); - - /** - *
-   * `items` details the constraints to be applied to each item
-   * in the field. Even for repeated message fields, validation is executed
-   * against each item unless skip is explicitly specified.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // The items in the field `value` must follow the specified constraints.
-   * repeated string value = 1 [(buf.validate.field).repeated.items = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - * @return Whether the items field is set. - */ - boolean hasItems(); - /** - *
-   * `items` details the constraints to be applied to each item
-   * in the field. Even for repeated message fields, validation is executed
-   * against each item unless skip is explicitly specified.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // The items in the field `value` must follow the specified constraints.
-   * repeated string value = 1 [(buf.validate.field).repeated.items = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - * @return The items. - */ - build.buf.validate.FieldConstraints getItems(); - /** - *
-   * `items` details the constraints to be applied to each item
-   * in the field. Even for repeated message fields, validation is executed
-   * against each item unless skip is explicitly specified.
-   *
-   * ```proto
-   * message MyRepeated {
-   * // The items in the field `value` must follow the specified constraints.
-   * repeated string value = 1 [(buf.validate.field).repeated.items = {
-   * string: {
-   * min_len: 3
-   * max_len: 10
-   * }
-   * }];
-   * }
-   * ```
-   * 
- * - * optional .buf.validate.FieldConstraints items = 4 [json_name = "items"]; - */ - build.buf.validate.FieldConstraintsOrBuilder getItemsOrBuilder(); -} diff --git a/src/main/java/build/buf/validate/SFixed32Rules.java b/src/main/java/build/buf/validate/SFixed32Rules.java deleted file mode 100644 index 5747837b..00000000 --- a/src/main/java/build/buf/validate/SFixed32Rules.java +++ /dev/null @@ -1,2386 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * SFixed32Rules describes the constraints applied to `fixed32` values.
- * 
- * - * Protobuf type {@code buf.validate.SFixed32Rules} - */ -public final class SFixed32Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - SFixed32Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.SFixed32Rules) - SFixed32RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed32Rules.class.getName()); - } - // Use SFixed32Rules.newBuilder() to construct. - private SFixed32Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private SFixed32Rules() { - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SFixed32Rules.class, build.buf.validate.SFixed32Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private int const_ = 0; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must equal 42
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must equal 42
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than or equal to 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than or equal to 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than 5 [sfixed32.gt]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than 5 [sfixed32.gt]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than or equal to 5 [sfixed32.gte]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than or equal to 5 [sfixed32.gte]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList in_ = - emptyIntList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList notIn_ = - emptyIntList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList example_ = - emptyIntList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * sfixed32 value = 1 [
-   * (buf.validate.field).sfixed32.example = 1,
-   * (buf.validate.field).sfixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * sfixed32 value = 1 [
-   * (buf.validate.field).sfixed32.example = 1,
-   * (buf.validate.field).sfixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * sfixed32 value = 1 [
-   * (buf.validate.field).sfixed32.example = 1,
-   * (buf.validate.field).sfixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeSFixed32(1, const_); - } - if (lessThanCase_ == 2) { - output.writeSFixed32( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeSFixed32( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeSFixed32( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeSFixed32( - 5, (int)((java.lang.Integer) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeSFixed32(6, in_.getInt(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeSFixed32(7, notIn_.getInt(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeSFixed32(8, example_.getInt(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeSFixed32Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size( - 5, (int)((java.lang.Integer) greaterThan_)); - } - { - int dataSize = 0; - dataSize = 4 * getInList().size(); - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getNotInList().size(); - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.SFixed32Rules)) { - return super.equals(obj); - } - build.buf.validate.SFixed32Rules other = (build.buf.validate.SFixed32Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.SFixed32Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SFixed32Rules 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.SFixed32Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SFixed32Rules 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.SFixed32Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SFixed32Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.SFixed32Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SFixed32Rules 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.SFixed32Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.SFixed32Rules 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.SFixed32Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SFixed32Rules 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.SFixed32Rules 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; - } - /** - *
-   * SFixed32Rules describes the constraints applied to `fixed32` values.
-   * 
- * - * Protobuf type {@code buf.validate.SFixed32Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.SFixed32Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.SFixed32Rules) - build.buf.validate.SFixed32RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SFixed32Rules.class, build.buf.validate.SFixed32Rules.Builder.class); - } - - // Construct using build.buf.validate.SFixed32Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0; - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed32Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.SFixed32Rules getDefaultInstanceForType() { - return build.buf.validate.SFixed32Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.SFixed32Rules build() { - build.buf.validate.SFixed32Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.SFixed32Rules buildPartial() { - build.buf.validate.SFixed32Rules result = new build.buf.validate.SFixed32Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.SFixed32Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.SFixed32Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.SFixed32Rules) { - return mergeFrom((build.buf.validate.SFixed32Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.SFixed32Rules other) { - if (other == build.buf.validate.SFixed32Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 13: { - const_ = input.readSFixed32(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: { - lessThan_ = input.readSFixed32(); - lessThanCase_ = 2; - break; - } // case 21 - case 29: { - lessThan_ = input.readSFixed32(); - lessThanCase_ = 3; - break; - } // case 29 - case 37: { - greaterThan_ = input.readSFixed32(); - greaterThanCase_ = 4; - break; - } // case 37 - case 45: { - greaterThan_ = input.readSFixed32(); - greaterThanCase_ = 5; - break; - } // case 45 - case 53: { - int v = input.readSFixed32(); - ensureInIsMutable(); - in_.addInt(v); - break; - } // case 53 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureInIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - in_.addInt(input.readSFixed32()); - } - input.popLimit(limit); - break; - } // case 50 - case 61: { - int v = input.readSFixed32(); - ensureNotInIsMutable(); - notIn_.addInt(v); - break; - } // case 61 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureNotInIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - notIn_.addInt(input.readSFixed32()); - } - input.popLimit(limit); - break; - } // case 58 - case 69: { - int v = input.readSFixed32(); - ensureExampleIsMutable(); - example_.addInt(v); - break; - } // case 69 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - example_.addInt(input.readSFixed32()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private int const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must equal 42
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must equal 42
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must equal 42
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(int value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must equal 42
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(int value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than or equal to 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than or equal to 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than or equal to 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(int value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be less than or equal to 10
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than 5 [sfixed32.gt]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than 5 [sfixed32.gt]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than 5 [sfixed32.gt]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(int value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than 5 [sfixed32.gt]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than or equal to 5 [sfixed32.gte]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than or equal to 5 [sfixed32.gte]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than or equal to 5 [sfixed32.gte]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(int value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be greater than or equal to 5 [sfixed32.gte]
-     * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-     * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-     * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.IntList in_ = emptyIntList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - private void ensureInIsMutable(int capacity) { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_, capacity); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, int value) { - - ensureInIsMutable(); - in_.setInt(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(int value) { - - ensureInIsMutable(); - in_.addInt(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList notIn_ = emptyIntList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - private void ensureNotInIsMutable(int capacity) { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_, capacity); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, int value) { - - ensureNotInIsMutable(); - notIn_.setInt(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(int value) { - - ensureNotInIsMutable(); - notIn_.addInt(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList example_ = emptyIntList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, int value) { - - ensureExampleIsMutable(); - example_.setInt(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(int value) { - - ensureExampleIsMutable(); - example_.addInt(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed32 {
-     * sfixed32 value = 1 [
-     * (buf.validate.field).sfixed32.example = 1,
-     * (buf.validate.field).sfixed32.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.SFixed32Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.SFixed32Rules) - private static final build.buf.validate.SFixed32Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.SFixed32Rules(); - } - - public static build.buf.validate.SFixed32Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed32Rules 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.SFixed32Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java b/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java deleted file mode 100644 index c3e48a78..00000000 --- a/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface SFixed32RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.SFixed32Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must equal 42
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must equal 42
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - int getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - int getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than or equal to 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be less than or equal to 10
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - int getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than 5 [sfixed32.gt]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than 5 [sfixed32.gt]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - int getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than or equal to 5 [sfixed32.gte]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be greater than or equal to 5 [sfixed32.gte]
-   * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
-   * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
-   * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - int getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - int getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - int getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * sfixed32 value = 1 [
-   * (buf.validate.field).sfixed32.example = 1,
-   * (buf.validate.field).sfixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * sfixed32 value = 1 [
-   * (buf.validate.field).sfixed32.example = 1,
-   * (buf.validate.field).sfixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed32 {
-   * sfixed32 value = 1 [
-   * (buf.validate.field).sfixed32.example = 1,
-   * (buf.validate.field).sfixed32.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - int getExample(int index); - - build.buf.validate.SFixed32Rules.LessThanCase getLessThanCase(); - - build.buf.validate.SFixed32Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/SFixed64Rules.java b/src/main/java/build/buf/validate/SFixed64Rules.java deleted file mode 100644 index 3918908a..00000000 --- a/src/main/java/build/buf/validate/SFixed64Rules.java +++ /dev/null @@ -1,2391 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * SFixed64Rules describes the constraints applied to `fixed64` values.
- * 
- * - * Protobuf type {@code buf.validate.SFixed64Rules} - */ -public final class SFixed64Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - SFixed64Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.SFixed64Rules) - SFixed64RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SFixed64Rules.class.getName()); - } - // Use SFixed64Rules.newBuilder() to construct. - private SFixed64Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private SFixed64Rules() { - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SFixed64Rules.class, build.buf.validate.SFixed64Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private long const_ = 0L; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must equal 42
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must equal 42
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than or equal to 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than or equal to 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than 5 [sfixed64.gt]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than 5 [sfixed64.gt]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than or equal to 5 [sfixed64.gte]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than or equal to 5 [sfixed64.gte]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList in_ = - emptyLongList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList notIn_ = - emptyLongList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList example_ = - emptyLongList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * sfixed64 value = 1 [
-   * (buf.validate.field).sfixed64.example = 1,
-   * (buf.validate.field).sfixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * sfixed64 value = 1 [
-   * (buf.validate.field).sfixed64.example = 1,
-   * (buf.validate.field).sfixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * sfixed64 value = 1 [
-   * (buf.validate.field).sfixed64.example = 1,
-   * (buf.validate.field).sfixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeSFixed64(1, const_); - } - if (lessThanCase_ == 2) { - output.writeSFixed64( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeSFixed64( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeSFixed64( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeSFixed64( - 5, (long)((java.lang.Long) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeSFixed64(6, in_.getLong(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeSFixed64(7, notIn_.getLong(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeSFixed64(8, example_.getLong(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeSFixed64Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size( - 5, (long)((java.lang.Long) greaterThan_)); - } - { - int dataSize = 0; - dataSize = 8 * getInList().size(); - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - dataSize = 8 * getNotInList().size(); - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - dataSize = 8 * getExampleList().size(); - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.SFixed64Rules)) { - return super.equals(obj); - } - build.buf.validate.SFixed64Rules other = (build.buf.validate.SFixed64Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConst()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.SFixed64Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SFixed64Rules 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.SFixed64Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SFixed64Rules 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.SFixed64Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SFixed64Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.SFixed64Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SFixed64Rules 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.SFixed64Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.SFixed64Rules 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.SFixed64Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SFixed64Rules 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.SFixed64Rules 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; - } - /** - *
-   * SFixed64Rules describes the constraints applied to `fixed64` values.
-   * 
- * - * Protobuf type {@code buf.validate.SFixed64Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.SFixed64Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.SFixed64Rules) - build.buf.validate.SFixed64RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SFixed64Rules.class, build.buf.validate.SFixed64Rules.Builder.class); - } - - // Construct using build.buf.validate.SFixed64Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0L; - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SFixed64Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.SFixed64Rules getDefaultInstanceForType() { - return build.buf.validate.SFixed64Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.SFixed64Rules build() { - build.buf.validate.SFixed64Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.SFixed64Rules buildPartial() { - build.buf.validate.SFixed64Rules result = new build.buf.validate.SFixed64Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.SFixed64Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.SFixed64Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.SFixed64Rules) { - return mergeFrom((build.buf.validate.SFixed64Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.SFixed64Rules other) { - if (other == build.buf.validate.SFixed64Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 9: { - const_ = input.readSFixed64(); - bitField0_ |= 0x00000001; - break; - } // case 9 - case 17: { - lessThan_ = input.readSFixed64(); - lessThanCase_ = 2; - break; - } // case 17 - case 25: { - lessThan_ = input.readSFixed64(); - lessThanCase_ = 3; - break; - } // case 25 - case 33: { - greaterThan_ = input.readSFixed64(); - greaterThanCase_ = 4; - break; - } // case 33 - case 41: { - greaterThan_ = input.readSFixed64(); - greaterThanCase_ = 5; - break; - } // case 41 - case 49: { - long v = input.readSFixed64(); - ensureInIsMutable(); - in_.addLong(v); - break; - } // case 49 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureInIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - in_.addLong(input.readSFixed64()); - } - input.popLimit(limit); - break; - } // case 50 - case 57: { - long v = input.readSFixed64(); - ensureNotInIsMutable(); - notIn_.addLong(v); - break; - } // case 57 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureNotInIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - notIn_.addLong(input.readSFixed64()); - } - input.popLimit(limit); - break; - } // case 58 - case 65: { - long v = input.readSFixed64(); - ensureExampleIsMutable(); - example_.addLong(v); - break; - } // case 65 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureExampleIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - example_.addLong(input.readSFixed64()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private long const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must equal 42
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must equal 42
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must equal 42
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(long value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must equal 42
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(long value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than or equal to 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than or equal to 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than or equal to 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(long value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be less than or equal to 10
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than 5 [sfixed64.gt]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than 5 [sfixed64.gt]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than 5 [sfixed64.gt]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(long value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than 5 [sfixed64.gt]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than or equal to 5 [sfixed64.gte]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than or equal to 5 [sfixed64.gte]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than or equal to 5 [sfixed64.gte]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(long value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be greater than or equal to 5 [sfixed64.gte]
-     * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-     * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-     * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.LongList in_ = emptyLongList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - private void ensureInIsMutable(int capacity) { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_, capacity); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, long value) { - - ensureInIsMutable(); - in_.setLong(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(long value) { - - ensureInIsMutable(); - in_.addLong(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList notIn_ = emptyLongList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - private void ensureNotInIsMutable(int capacity) { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_, capacity); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, long value) { - - ensureNotInIsMutable(); - notIn_.setLong(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(long value) { - - ensureNotInIsMutable(); - notIn_.addLong(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList example_ = emptyLongList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - private void ensureExampleIsMutable(int capacity) { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_, capacity); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, long value) { - - ensureExampleIsMutable(); - example_.setLong(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(long value) { - - ensureExampleIsMutable(); - example_.addLong(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySFixed64 {
-     * sfixed64 value = 1 [
-     * (buf.validate.field).sfixed64.example = 1,
-     * (buf.validate.field).sfixed64.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.SFixed64Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.SFixed64Rules) - private static final build.buf.validate.SFixed64Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.SFixed64Rules(); - } - - public static build.buf.validate.SFixed64Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SFixed64Rules 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.SFixed64Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java b/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java deleted file mode 100644 index e15edabf..00000000 --- a/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface SFixed64RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.SFixed64Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must equal 42
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must equal 42
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sfixed64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - long getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - long getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than or equal to 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be less than or equal to 10
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - long getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than 5 [sfixed64.gt]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than 5 [sfixed64.gt]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - long getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than or equal to 5 [sfixed64.gte]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be greater than or equal to 5 [sfixed64.gte]
-   * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
-   * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
-   * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - long getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - long getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - long getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * sfixed64 value = 1 [
-   * (buf.validate.field).sfixed64.example = 1,
-   * (buf.validate.field).sfixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * sfixed64 value = 1 [
-   * (buf.validate.field).sfixed64.example = 1,
-   * (buf.validate.field).sfixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySFixed64 {
-   * sfixed64 value = 1 [
-   * (buf.validate.field).sfixed64.example = 1,
-   * (buf.validate.field).sfixed64.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sfixed64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - long getExample(int index); - - build.buf.validate.SFixed64Rules.LessThanCase getLessThanCase(); - - build.buf.validate.SFixed64Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/SInt32Rules.java b/src/main/java/build/buf/validate/SInt32Rules.java deleted file mode 100644 index bc70dcb4..00000000 --- a/src/main/java/build/buf/validate/SInt32Rules.java +++ /dev/null @@ -1,2374 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * SInt32Rules describes the constraints applied to `sint32` values.
- * 
- * - * Protobuf type {@code buf.validate.SInt32Rules} - */ -public final class SInt32Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - SInt32Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.SInt32Rules) - SInt32RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt32Rules.class.getName()); - } - // Use SInt32Rules.newBuilder() to construct. - private SInt32Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private SInt32Rules() { - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SInt32Rules.class, build.buf.validate.SInt32Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private int const_ = 0; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must equal 42
-   * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must equal 42
-   * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than or equal to 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than or equal to 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than 5 [sint32.gt]
-   * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than 5 [sint32.gt]
-   * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than or equal to 5 [sint32.gte]
-   * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than or equal to 5 [sint32.gte]
-   * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList in_ = - emptyIntList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList notIn_ = - emptyIntList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList example_ = - emptyIntList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt32 {
-   * sint32 value = 1 [
-   * (buf.validate.field).sint32.example = 1,
-   * (buf.validate.field).sint32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt32 {
-   * sint32 value = 1 [
-   * (buf.validate.field).sint32.example = 1,
-   * (buf.validate.field).sint32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt32 {
-   * sint32 value = 1 [
-   * (buf.validate.field).sint32.example = 1,
-   * (buf.validate.field).sint32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeSInt32(1, const_); - } - if (lessThanCase_ == 2) { - output.writeSInt32( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeSInt32( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeSInt32( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeSInt32( - 5, (int)((java.lang.Integer) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeSInt32(6, in_.getInt(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeSInt32(7, notIn_.getInt(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeSInt32(8, example_.getInt(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeSInt32Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeSInt32Size( - 5, (int)((java.lang.Integer) greaterThan_)); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt32SizeNoTag(in_.getInt(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt32SizeNoTag(notIn_.getInt(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt32SizeNoTag(example_.getInt(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.SInt32Rules)) { - return super.equals(obj); - } - build.buf.validate.SInt32Rules other = (build.buf.validate.SInt32Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.SInt32Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SInt32Rules 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.SInt32Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SInt32Rules 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.SInt32Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SInt32Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.SInt32Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SInt32Rules 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.SInt32Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.SInt32Rules 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.SInt32Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SInt32Rules 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.SInt32Rules 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; - } - /** - *
-   * SInt32Rules describes the constraints applied to `sint32` values.
-   * 
- * - * Protobuf type {@code buf.validate.SInt32Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.SInt32Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.SInt32Rules) - build.buf.validate.SInt32RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SInt32Rules.class, build.buf.validate.SInt32Rules.Builder.class); - } - - // Construct using build.buf.validate.SInt32Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0; - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt32Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.SInt32Rules getDefaultInstanceForType() { - return build.buf.validate.SInt32Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.SInt32Rules build() { - build.buf.validate.SInt32Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.SInt32Rules buildPartial() { - build.buf.validate.SInt32Rules result = new build.buf.validate.SInt32Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.SInt32Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.SInt32Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.SInt32Rules) { - return mergeFrom((build.buf.validate.SInt32Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.SInt32Rules other) { - if (other == build.buf.validate.SInt32Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readSInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - lessThan_ = input.readSInt32(); - lessThanCase_ = 2; - break; - } // case 16 - case 24: { - lessThan_ = input.readSInt32(); - lessThanCase_ = 3; - break; - } // case 24 - case 32: { - greaterThan_ = input.readSInt32(); - greaterThanCase_ = 4; - break; - } // case 32 - case 40: { - greaterThan_ = input.readSInt32(); - greaterThanCase_ = 5; - break; - } // case 40 - case 48: { - int v = input.readSInt32(); - ensureInIsMutable(); - in_.addInt(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addInt(input.readSInt32()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - int v = input.readSInt32(); - ensureNotInIsMutable(); - notIn_.addInt(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addInt(input.readSInt32()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - int v = input.readSInt32(); - ensureExampleIsMutable(); - example_.addInt(v); - break; - } // case 64 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addInt(input.readSInt32()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private int const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must equal 42
-     * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must equal 42
-     * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must equal 42
-     * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(int value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must equal 42
-     * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(int value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than or equal to 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than or equal to 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than or equal to 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(int value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be less than or equal to 10
-     * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than 5 [sint32.gt]
-     * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than 5 [sint32.gt]
-     * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than 5 [sint32.gt]
-     * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(int value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than 5 [sint32.gt]
-     * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than or equal to 5 [sint32.gte]
-     * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than or equal to 5 [sint32.gte]
-     * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than or equal to 5 [sint32.gte]
-     * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(int value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be greater than or equal to 5 [sint32.gte]
-     * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-     * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-     * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.IntList in_ = emptyIntList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, int value) { - - ensureInIsMutable(); - in_.setInt(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(int value) { - - ensureInIsMutable(); - in_.addInt(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList notIn_ = emptyIntList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, int value) { - - ensureNotInIsMutable(); - notIn_.setInt(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(int value) { - - ensureNotInIsMutable(); - notIn_.addInt(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList example_ = emptyIntList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, int value) { - - ensureExampleIsMutable(); - example_.setInt(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(int value) { - - ensureExampleIsMutable(); - example_.addInt(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt32 {
-     * sint32 value = 1 [
-     * (buf.validate.field).sint32.example = 1,
-     * (buf.validate.field).sint32.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.SInt32Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.SInt32Rules) - private static final build.buf.validate.SInt32Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.SInt32Rules(); - } - - public static build.buf.validate.SInt32Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt32Rules 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.SInt32Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java b/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java deleted file mode 100644 index e3398c72..00000000 --- a/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface SInt32RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.SInt32Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must equal 42
-   * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must equal 42
-   * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - int getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - int getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than or equal to 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be less than or equal to 10
-   * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - int getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than 5 [sint32.gt]
-   * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than 5 [sint32.gt]
-   * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint32.gt_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - int getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than or equal to 5 [sint32.gte]
-   * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be greater than or equal to 5 [sint32.gte]
-   * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
-   * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
-   * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - int getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - int getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - int getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt32 {
-   * sint32 value = 1 [
-   * (buf.validate.field).sint32.example = 1,
-   * (buf.validate.field).sint32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt32 {
-   * sint32 value = 1 [
-   * (buf.validate.field).sint32.example = 1,
-   * (buf.validate.field).sint32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt32 {
-   * sint32 value = 1 [
-   * (buf.validate.field).sint32.example = 1,
-   * (buf.validate.field).sint32.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - int getExample(int index); - - build.buf.validate.SInt32Rules.LessThanCase getLessThanCase(); - - build.buf.validate.SInt32Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/SInt64Rules.java b/src/main/java/build/buf/validate/SInt64Rules.java deleted file mode 100644 index 6676b1cf..00000000 --- a/src/main/java/build/buf/validate/SInt64Rules.java +++ /dev/null @@ -1,2379 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * SInt64Rules describes the constraints applied to `sint64` values.
- * 
- * - * Protobuf type {@code buf.validate.SInt64Rules} - */ -public final class SInt64Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - SInt64Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.SInt64Rules) - SInt64RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - SInt64Rules.class.getName()); - } - // Use SInt64Rules.newBuilder() to construct. - private SInt64Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private SInt64Rules() { - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SInt64Rules.class, build.buf.validate.SInt64Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private long const_ = 0L; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must equal 42
-   * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must equal 42
-   * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than or equal to 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than or equal to 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than 5 [sint64.gt]
-   * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than 5 [sint64.gt]
-   * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than or equal to 5 [sint64.gte]
-   * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than or equal to 5 [sint64.gte]
-   * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList in_ = - emptyLongList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList notIn_ = - emptyLongList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList example_ = - emptyLongList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt64 {
-   * sint64 value = 1 [
-   * (buf.validate.field).sint64.example = 1,
-   * (buf.validate.field).sint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt64 {
-   * sint64 value = 1 [
-   * (buf.validate.field).sint64.example = 1,
-   * (buf.validate.field).sint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt64 {
-   * sint64 value = 1 [
-   * (buf.validate.field).sint64.example = 1,
-   * (buf.validate.field).sint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeSInt64(1, const_); - } - if (lessThanCase_ == 2) { - output.writeSInt64( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeSInt64( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeSInt64( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeSInt64( - 5, (long)((java.lang.Long) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeSInt64(6, in_.getLong(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeSInt64(7, notIn_.getLong(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeSInt64(8, example_.getLong(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeSInt64Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size( - 5, (long)((java.lang.Long) greaterThan_)); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(in_.getLong(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(notIn_.getLong(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeSInt64SizeNoTag(example_.getLong(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.SInt64Rules)) { - return super.equals(obj); - } - build.buf.validate.SInt64Rules other = (build.buf.validate.SInt64Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConst()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.SInt64Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SInt64Rules 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.SInt64Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SInt64Rules 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.SInt64Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.SInt64Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.SInt64Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SInt64Rules 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.SInt64Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.SInt64Rules 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.SInt64Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.SInt64Rules 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.SInt64Rules 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; - } - /** - *
-   * SInt64Rules describes the constraints applied to `sint64` values.
-   * 
- * - * Protobuf type {@code buf.validate.SInt64Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.SInt64Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.SInt64Rules) - build.buf.validate.SInt64RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.SInt64Rules.class, build.buf.validate.SInt64Rules.Builder.class); - } - - // Construct using build.buf.validate.SInt64Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0L; - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_SInt64Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.SInt64Rules getDefaultInstanceForType() { - return build.buf.validate.SInt64Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.SInt64Rules build() { - build.buf.validate.SInt64Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.SInt64Rules buildPartial() { - build.buf.validate.SInt64Rules result = new build.buf.validate.SInt64Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.SInt64Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.SInt64Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.SInt64Rules) { - return mergeFrom((build.buf.validate.SInt64Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.SInt64Rules other) { - if (other == build.buf.validate.SInt64Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readSInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - lessThan_ = input.readSInt64(); - lessThanCase_ = 2; - break; - } // case 16 - case 24: { - lessThan_ = input.readSInt64(); - lessThanCase_ = 3; - break; - } // case 24 - case 32: { - greaterThan_ = input.readSInt64(); - greaterThanCase_ = 4; - break; - } // case 32 - case 40: { - greaterThan_ = input.readSInt64(); - greaterThanCase_ = 5; - break; - } // case 40 - case 48: { - long v = input.readSInt64(); - ensureInIsMutable(); - in_.addLong(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - long v = input.readSInt64(); - ensureNotInIsMutable(); - notIn_.addLong(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - long v = input.readSInt64(); - ensureExampleIsMutable(); - example_.addLong(v); - break; - } // case 64 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addLong(input.readSInt64()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private long const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must equal 42
-     * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must equal 42
-     * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must equal 42
-     * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(long value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must equal 42
-     * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(long value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field
-     * < value). If the field value is equal to or greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than or equal to 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than or equal to 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than or equal to 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(long value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be less than or equal to 10
-     * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than 5 [sint64.gt]
-     * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than 5 [sint64.gt]
-     * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than 5 [sint64.gt]
-     * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(long value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than 5 [sint64.gt]
-     * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than or equal to 5 [sint64.gte]
-     * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than or equal to 5 [sint64.gte]
-     * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than or equal to 5 [sint64.gte]
-     * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(long value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be greater than or equal to 5 [sint64.gte]
-     * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-     * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-     * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.LongList in_ = emptyLongList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, long value) { - - ensureInIsMutable(); - in_.setLong(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(long value) { - - ensureInIsMutable(); - in_.addLong(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message
-     * is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList notIn_ = emptyLongList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, long value) { - - ensureNotInIsMutable(); - notIn_.setLong(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(long value) { - - ensureNotInIsMutable(); - notIn_.addLong(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MySInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList example_ = emptyLongList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, long value) { - - ensureExampleIsMutable(); - example_.setLong(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(long value) { - - ensureExampleIsMutable(); - example_.addLong(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MySInt64 {
-     * sint64 value = 1 [
-     * (buf.validate.field).sint64.example = 1,
-     * (buf.validate.field).sint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.SInt64Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.SInt64Rules) - private static final build.buf.validate.SInt64Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.SInt64Rules(); - } - - public static build.buf.validate.SInt64Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SInt64Rules 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.SInt64Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java b/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java deleted file mode 100644 index 93a4d79c..00000000 --- a/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface SInt64RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.SInt64Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must equal 42
-   * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must equal 42
-   * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional sint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - long getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field
-   * < value). If the field value is equal to or greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - long getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than or equal to 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be less than or equal to 10
-   * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * sint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - long getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than 5 [sint64.gt]
-   * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than 5 [sint64.gt]
-   * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [sint64.gt_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - long getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than or equal to 5 [sint64.gte]
-   * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be greater than or equal to 5 [sint64.gte]
-   * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
-   * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
-   * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * sint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - long getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message
-   * is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - long getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MySInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated sint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - long getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt64 {
-   * sint64 value = 1 [
-   * (buf.validate.field).sint64.example = 1,
-   * (buf.validate.field).sint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt64 {
-   * sint64 value = 1 [
-   * (buf.validate.field).sint64.example = 1,
-   * (buf.validate.field).sint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MySInt64 {
-   * sint64 value = 1 [
-   * (buf.validate.field).sint64.example = 1,
-   * (buf.validate.field).sint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated sint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - long getExample(int index); - - build.buf.validate.SInt64Rules.LessThanCase getLessThanCase(); - - build.buf.validate.SInt64Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/StringRules.java b/src/main/java/build/buf/validate/StringRules.java deleted file mode 100644 index 10df159b..00000000 --- a/src/main/java/build/buf/validate/StringRules.java +++ /dev/null @@ -1,7600 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * StringRules describes the constraints applied to `string` values These
- * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.StringRules} - */ -public final class StringRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - StringRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.StringRules) - StringRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - StringRules.class.getName()); - } - // Use StringRules.newBuilder() to construct. - private StringRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private StringRules() { - const_ = ""; - pattern_ = ""; - prefix_ = ""; - suffix_ = ""; - contains_ = ""; - notContains_ = ""; - in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - example_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_StringRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_StringRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.StringRules.class, build.buf.validate.StringRules.Builder.class); - } - - private int bitField0_; - private int wellKnownCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object wellKnown_; - public enum WellKnownCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - EMAIL(12), - HOSTNAME(13), - IP(14), - IPV4(15), - IPV6(16), - URI(17), - URI_REF(18), - ADDRESS(21), - UUID(22), - TUUID(33), - IP_WITH_PREFIXLEN(26), - IPV4_WITH_PREFIXLEN(27), - IPV6_WITH_PREFIXLEN(28), - IP_PREFIX(29), - IPV4_PREFIX(30), - IPV6_PREFIX(31), - HOST_AND_PORT(32), - WELL_KNOWN_REGEX(24), - WELLKNOWN_NOT_SET(0); - private final int value; - private WellKnownCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static WellKnownCase valueOf(int value) { - return forNumber(value); - } - - public static WellKnownCase forNumber(int value) { - switch (value) { - case 12: return EMAIL; - case 13: return HOSTNAME; - case 14: return IP; - case 15: return IPV4; - case 16: return IPV6; - case 17: return URI; - case 18: return URI_REF; - case 21: return ADDRESS; - case 22: return UUID; - case 33: return TUUID; - case 26: return IP_WITH_PREFIXLEN; - case 27: return IPV4_WITH_PREFIXLEN; - case 28: return IPV6_WITH_PREFIXLEN; - case 29: return IP_PREFIX; - case 30: return IPV4_PREFIX; - case 31: return IPV6_PREFIX; - case 32: return HOST_AND_PORT; - case 24: return WELL_KNOWN_REGEX; - case 0: return WELLKNOWN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public WellKnownCase - getWellKnownCase() { - return WellKnownCase.forNumber( - wellKnownCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object const_ = ""; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must equal `hello`
-   * string value = 1 [(buf.validate.field).string.const = "hello"];
-   * }
-   * ```
-   * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must equal `hello`
-   * string value = 1 [(buf.validate.field).string.const = "hello"];
-   * }
-   * ```
-   * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public java.lang.String getConst() { - java.lang.Object ref = const_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - const_ = s; - } - return s; - } - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must equal `hello`
-   * string value = 1 [(buf.validate.field).string.const = "hello"];
-   * }
-   * ```
-   * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The bytes for const. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstBytes() { - java.lang.Object ref = const_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - const_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LEN_FIELD_NUMBER = 19; - private long len_ = 0L; - /** - *
-   * `len` dictates that the field value must have the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value does not meet the specified
-   * length, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 5 characters
-   * string value = 1 [(buf.validate.field).string.len = 5];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return Whether the len field is set. - */ - @java.lang.Override - public boolean hasLen() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `len` dictates that the field value must have the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value does not meet the specified
-   * length, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 5 characters
-   * string value = 1 [(buf.validate.field).string.len = 5];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return The len. - */ - @java.lang.Override - public long getLen() { - return len_; - } - - public static final int MIN_LEN_FIELD_NUMBER = 2; - private long minLen_ = 0L; - /** - *
-   * `min_len` specifies that the field value must have at least the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value contains fewer characters, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 3 characters
-   * string value = 1 [(buf.validate.field).string.min_len = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return Whether the minLen field is set. - */ - @java.lang.Override - public boolean hasMinLen() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * `min_len` specifies that the field value must have at least the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value contains fewer characters, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 3 characters
-   * string value = 1 [(buf.validate.field).string.min_len = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return The minLen. - */ - @java.lang.Override - public long getMinLen() { - return minLen_; - } - - public static final int MAX_LEN_FIELD_NUMBER = 3; - private long maxLen_ = 0L; - /** - *
-   * `max_len` specifies that the field value must have no more than the specified
-   * number of characters (Unicode code points), which may differ from the
-   * number of bytes in the string. If the field value contains more characters,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 10 characters
-   * string value = 1 [(buf.validate.field).string.max_len = 10];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return Whether the maxLen field is set. - */ - @java.lang.Override - public boolean hasMaxLen() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-   * `max_len` specifies that the field value must have no more than the specified
-   * number of characters (Unicode code points), which may differ from the
-   * number of bytes in the string. If the field value contains more characters,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 10 characters
-   * string value = 1 [(buf.validate.field).string.max_len = 10];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return The maxLen. - */ - @java.lang.Override - public long getMaxLen() { - return maxLen_; - } - - public static final int LEN_BYTES_FIELD_NUMBER = 20; - private long lenBytes_ = 0L; - /** - *
-   * `len_bytes` dictates that the field value must have the specified number of
-   * bytes. If the field value does not match the specified length in bytes,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 6 bytes
-   * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return Whether the lenBytes field is set. - */ - @java.lang.Override - public boolean hasLenBytes() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-   * `len_bytes` dictates that the field value must have the specified number of
-   * bytes. If the field value does not match the specified length in bytes,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 6 bytes
-   * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return The lenBytes. - */ - @java.lang.Override - public long getLenBytes() { - return lenBytes_; - } - - public static final int MIN_BYTES_FIELD_NUMBER = 4; - private long minBytes_ = 0L; - /** - *
-   * `min_bytes` specifies that the field value must have at least the specified
-   * number of bytes. If the field value contains fewer bytes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 4 bytes
-   * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-   * }
-   *
-   * ```
-   * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return Whether the minBytes field is set. - */ - @java.lang.Override - public boolean hasMinBytes() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-   * `min_bytes` specifies that the field value must have at least the specified
-   * number of bytes. If the field value contains fewer bytes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 4 bytes
-   * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-   * }
-   *
-   * ```
-   * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return The minBytes. - */ - @java.lang.Override - public long getMinBytes() { - return minBytes_; - } - - public static final int MAX_BYTES_FIELD_NUMBER = 5; - private long maxBytes_ = 0L; - /** - *
-   * `max_bytes` specifies that the field value must have no more than the
-   * specified number of bytes. If the field value contains more bytes, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 8 bytes
-   * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return Whether the maxBytes field is set. - */ - @java.lang.Override - public boolean hasMaxBytes() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-   * `max_bytes` specifies that the field value must have no more than the
-   * specified number of bytes. If the field value contains more bytes, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 8 bytes
-   * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return The maxBytes. - */ - @java.lang.Override - public long getMaxBytes() { - return maxBytes_; - } - - public static final int PATTERN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object pattern_ = ""; - /** - *
-   * `pattern` specifies that the field value must match the specified
-   * regular expression (RE2 syntax), with the expression provided without any
-   * delimiters. If the field value doesn't match the regular expression, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not match regex pattern `^[a-zA-Z]//$`
-   * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return Whether the pattern field is set. - */ - @java.lang.Override - public boolean hasPattern() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-   * `pattern` specifies that the field value must match the specified
-   * regular expression (RE2 syntax), with the expression provided without any
-   * delimiters. If the field value doesn't match the regular expression, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not match regex pattern `^[a-zA-Z]//$`
-   * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The pattern. - */ - @java.lang.Override - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - pattern_ = s; - } - return s; - } - } - /** - *
-   * `pattern` specifies that the field value must match the specified
-   * regular expression (RE2 syntax), with the expression provided without any
-   * delimiters. If the field value doesn't match the regular expression, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not match regex pattern `^[a-zA-Z]//$`
-   * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The bytes for pattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PREFIX_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private volatile java.lang.Object prefix_ = ""; - /** - *
-   * `prefix` specifies that the field value must have the
-   * specified substring at the beginning of the string. If the field value
-   * doesn't start with the specified prefix, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have prefix `pre`
-   * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-   * }
-   * ```
-   * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return Whether the prefix field is set. - */ - @java.lang.Override - public boolean hasPrefix() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-   * `prefix` specifies that the field value must have the
-   * specified substring at the beginning of the string. If the field value
-   * doesn't start with the specified prefix, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have prefix `pre`
-   * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-   * }
-   * ```
-   * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The prefix. - */ - @java.lang.Override - public java.lang.String getPrefix() { - java.lang.Object ref = prefix_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - prefix_ = s; - } - return s; - } - } - /** - *
-   * `prefix` specifies that the field value must have the
-   * specified substring at the beginning of the string. If the field value
-   * doesn't start with the specified prefix, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have prefix `pre`
-   * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-   * }
-   * ```
-   * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The bytes for prefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPrefixBytes() { - java.lang.Object ref = prefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - prefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUFFIX_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private volatile java.lang.Object suffix_ = ""; - /** - *
-   * `suffix` specifies that the field value must have the
-   * specified substring at the end of the string. If the field value doesn't
-   * end with the specified suffix, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have suffix `post`
-   * string value = 1 [(buf.validate.field).string.suffix = "post"];
-   * }
-   * ```
-   * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return Whether the suffix field is set. - */ - @java.lang.Override - public boolean hasSuffix() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-   * `suffix` specifies that the field value must have the
-   * specified substring at the end of the string. If the field value doesn't
-   * end with the specified suffix, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have suffix `post`
-   * string value = 1 [(buf.validate.field).string.suffix = "post"];
-   * }
-   * ```
-   * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The suffix. - */ - @java.lang.Override - public java.lang.String getSuffix() { - java.lang.Object ref = suffix_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - suffix_ = s; - } - return s; - } - } - /** - *
-   * `suffix` specifies that the field value must have the
-   * specified substring at the end of the string. If the field value doesn't
-   * end with the specified suffix, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have suffix `post`
-   * string value = 1 [(buf.validate.field).string.suffix = "post"];
-   * }
-   * ```
-   * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The bytes for suffix. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSuffixBytes() { - java.lang.Object ref = suffix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - suffix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTAINS_FIELD_NUMBER = 9; - @SuppressWarnings("serial") - private volatile java.lang.Object contains_ = ""; - /** - *
-   * `contains` specifies that the field value must have the
-   * specified substring anywhere in the string. If the field value doesn't
-   * contain the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not contain substring `inside`.
-   * string value = 1 [(buf.validate.field).string.contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return Whether the contains field is set. - */ - @java.lang.Override - public boolean hasContains() { - return ((bitField0_ & 0x00000400) != 0); - } - /** - *
-   * `contains` specifies that the field value must have the
-   * specified substring anywhere in the string. If the field value doesn't
-   * contain the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not contain substring `inside`.
-   * string value = 1 [(buf.validate.field).string.contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The contains. - */ - @java.lang.Override - public java.lang.String getContains() { - java.lang.Object ref = contains_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - contains_ = s; - } - return s; - } - } - /** - *
-   * `contains` specifies that the field value must have the
-   * specified substring anywhere in the string. If the field value doesn't
-   * contain the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not contain substring `inside`.
-   * string value = 1 [(buf.validate.field).string.contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The bytes for contains. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getContainsBytes() { - java.lang.Object ref = contains_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - contains_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOT_CONTAINS_FIELD_NUMBER = 23; - @SuppressWarnings("serial") - private volatile java.lang.Object notContains_ = ""; - /** - *
-   * `not_contains` specifies that the field value must not have the
-   * specified substring anywhere in the string. If the field value contains
-   * the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value contains substring `inside`.
-   * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return Whether the notContains field is set. - */ - @java.lang.Override - public boolean hasNotContains() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-   * `not_contains` specifies that the field value must not have the
-   * specified substring anywhere in the string. If the field value contains
-   * the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value contains substring `inside`.
-   * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return The notContains. - */ - @java.lang.Override - public java.lang.String getNotContains() { - java.lang.Object ref = notContains_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - notContains_ = s; - } - return s; - } - } - /** - *
-   * `not_contains` specifies that the field value must not have the
-   * specified substring anywhere in the string. If the field value contains
-   * the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value contains substring `inside`.
-   * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return The bytes for notContains. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNotContainsBytes() { - java.lang.Object ref = notContains_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - notContains_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IN_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public com.google.protobuf.ProtocolStringList - getInList() { - return in_; - } - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public java.lang.String getIn(int index) { - return in_.get(index); - } - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the in at the given index. - */ - public com.google.protobuf.ByteString - getInBytes(int index) { - return in_.getByteString(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 11; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public com.google.protobuf.ProtocolStringList - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public java.lang.String getNotIn(int index) { - return notIn_.get(index); - } - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the notIn at the given index. - */ - public com.google.protobuf.ByteString - getNotInBytes(int index) { - return notIn_.getByteString(index); - } - - public static final int EMAIL_FIELD_NUMBER = 12; - /** - *
-   * `email` specifies that the field value must be a valid email address
-   * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-   * If the field value isn't a valid email address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid email address
-   * string value = 1 [(buf.validate.field).string.email = true];
-   * }
-   * ```
-   * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return Whether the email field is set. - */ - @java.lang.Override - public boolean hasEmail() { - return wellKnownCase_ == 12; - } - /** - *
-   * `email` specifies that the field value must be a valid email address
-   * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-   * If the field value isn't a valid email address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid email address
-   * string value = 1 [(buf.validate.field).string.email = true];
-   * }
-   * ```
-   * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return The email. - */ - @java.lang.Override - public boolean getEmail() { - if (wellKnownCase_ == 12) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int HOSTNAME_FIELD_NUMBER = 13; - /** - *
-   * `hostname` specifies that the field value must be a valid
-   * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-   * internationalized domain names (IDNs). If the field value isn't a
-   * valid hostname, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname
-   * string value = 1 [(buf.validate.field).string.hostname = true];
-   * }
-   * ```
-   * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return Whether the hostname field is set. - */ - @java.lang.Override - public boolean hasHostname() { - return wellKnownCase_ == 13; - } - /** - *
-   * `hostname` specifies that the field value must be a valid
-   * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-   * internationalized domain names (IDNs). If the field value isn't a
-   * valid hostname, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname
-   * string value = 1 [(buf.validate.field).string.hostname = true];
-   * }
-   * ```
-   * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return The hostname. - */ - @java.lang.Override - public boolean getHostname() { - if (wellKnownCase_ == 13) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IP_FIELD_NUMBER = 14; - /** - *
-   * `ip` specifies that the field value must be a valid IP
-   * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-   * If the field value isn't a valid IP address, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP address
-   * string value = 1 [(buf.validate.field).string.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return Whether the ip field is set. - */ - @java.lang.Override - public boolean hasIp() { - return wellKnownCase_ == 14; - } - /** - *
-   * `ip` specifies that the field value must be a valid IP
-   * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-   * If the field value isn't a valid IP address, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP address
-   * string value = 1 [(buf.validate.field).string.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return The ip. - */ - @java.lang.Override - public boolean getIp() { - if (wellKnownCase_ == 14) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV4_FIELD_NUMBER = 15; - /** - *
-   * `ipv4` specifies that the field value must be a valid IPv4
-   * address. If the field value isn't a valid IPv4 address, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address
-   * string value = 1 [(buf.validate.field).string.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4 field is set. - */ - @java.lang.Override - public boolean hasIpv4() { - return wellKnownCase_ == 15; - } - /** - *
-   * `ipv4` specifies that the field value must be a valid IPv4
-   * address. If the field value isn't a valid IPv4 address, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address
-   * string value = 1 [(buf.validate.field).string.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return The ipv4. - */ - @java.lang.Override - public boolean getIpv4() { - if (wellKnownCase_ == 15) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV6_FIELD_NUMBER = 16; - /** - *
-   * `ipv6` specifies that the field value must be a valid
-   * IPv6 address, without surrounding square brackets. If the field value is
-   * not a valid IPv6 address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address
-   * string value = 1 [(buf.validate.field).string.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6 field is set. - */ - @java.lang.Override - public boolean hasIpv6() { - return wellKnownCase_ == 16; - } - /** - *
-   * `ipv6` specifies that the field value must be a valid
-   * IPv6 address, without surrounding square brackets. If the field value is
-   * not a valid IPv6 address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address
-   * string value = 1 [(buf.validate.field).string.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return The ipv6. - */ - @java.lang.Override - public boolean getIpv6() { - if (wellKnownCase_ == 16) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int URI_FIELD_NUMBER = 17; - /** - *
-   * `uri` specifies that the field value must be a valid,
-   * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-   * absolute URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri = true];
-   * }
-   * ```
-   * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return wellKnownCase_ == 17; - } - /** - *
-   * `uri` specifies that the field value must be a valid,
-   * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-   * absolute URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri = true];
-   * }
-   * ```
-   * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return The uri. - */ - @java.lang.Override - public boolean getUri() { - if (wellKnownCase_ == 17) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int URI_REF_FIELD_NUMBER = 18; - /** - *
-   * `uri_ref` specifies that the field value must be a valid URI
-   * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-   * field value isn't a valid URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri_ref = true];
-   * }
-   * ```
-   * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return Whether the uriRef field is set. - */ - @java.lang.Override - public boolean hasUriRef() { - return wellKnownCase_ == 18; - } - /** - *
-   * `uri_ref` specifies that the field value must be a valid URI
-   * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-   * field value isn't a valid URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri_ref = true];
-   * }
-   * ```
-   * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return The uriRef. - */ - @java.lang.Override - public boolean getUriRef() { - if (wellKnownCase_ == 18) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int ADDRESS_FIELD_NUMBER = 21; - /** - *
-   * `address` specifies that the field value must be either a valid hostname
-   * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-   * (which doesn't support internationalized domain names or IDNs) or a valid
-   * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname, or ip address
-   * string value = 1 [(buf.validate.field).string.address = true];
-   * }
-   * ```
-   * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return Whether the address field is set. - */ - @java.lang.Override - public boolean hasAddress() { - return wellKnownCase_ == 21; - } - /** - *
-   * `address` specifies that the field value must be either a valid hostname
-   * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-   * (which doesn't support internationalized domain names or IDNs) or a valid
-   * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname, or ip address
-   * string value = 1 [(buf.validate.field).string.address = true];
-   * }
-   * ```
-   * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return The address. - */ - @java.lang.Override - public boolean getAddress() { - if (wellKnownCase_ == 21) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int UUID_FIELD_NUMBER = 22; - /** - *
-   * `uuid` specifies that the field value must be a valid UUID as defined by
-   * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-   * field value isn't a valid UUID, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid UUID
-   * string value = 1 [(buf.validate.field).string.uuid = true];
-   * }
-   * ```
-   * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return Whether the uuid field is set. - */ - @java.lang.Override - public boolean hasUuid() { - return wellKnownCase_ == 22; - } - /** - *
-   * `uuid` specifies that the field value must be a valid UUID as defined by
-   * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-   * field value isn't a valid UUID, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid UUID
-   * string value = 1 [(buf.validate.field).string.uuid = true];
-   * }
-   * ```
-   * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return The uuid. - */ - @java.lang.Override - public boolean getUuid() { - if (wellKnownCase_ == 22) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int TUUID_FIELD_NUMBER = 33; - /** - *
-   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-   * omitted. If the field value isn't a valid UUID without dashes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid trimmed UUID
-   * string value = 1 [(buf.validate.field).string.tuuid = true];
-   * }
-   * ```
-   * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return Whether the tuuid field is set. - */ - @java.lang.Override - public boolean hasTuuid() { - return wellKnownCase_ == 33; - } - /** - *
-   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-   * omitted. If the field value isn't a valid UUID without dashes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid trimmed UUID
-   * string value = 1 [(buf.validate.field).string.tuuid = true];
-   * }
-   * ```
-   * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return The tuuid. - */ - @java.lang.Override - public boolean getTuuid() { - if (wellKnownCase_ == 33) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IP_WITH_PREFIXLEN_FIELD_NUMBER = 26; - /** - *
-   * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-   * address with prefix length. If the field value isn't a valid IP with prefix
-   * length, an error message will be generated.
-   *
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP with prefix length
-   * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipWithPrefixlen field is set. - */ - @java.lang.Override - public boolean hasIpWithPrefixlen() { - return wellKnownCase_ == 26; - } - /** - *
-   * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-   * address with prefix length. If the field value isn't a valid IP with prefix
-   * length, an error message will be generated.
-   *
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP with prefix length
-   * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipWithPrefixlen. - */ - @java.lang.Override - public boolean getIpWithPrefixlen() { - if (wellKnownCase_ == 26) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV4_WITH_PREFIXLEN_FIELD_NUMBER = 27; - /** - *
-   * `ipv4_with_prefixlen` specifies that the field value must be a valid
-   * IPv4 address with prefix.
-   * If the field value isn't a valid IPv4 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address with prefix length
-   * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4WithPrefixlen field is set. - */ - @java.lang.Override - public boolean hasIpv4WithPrefixlen() { - return wellKnownCase_ == 27; - } - /** - *
-   * `ipv4_with_prefixlen` specifies that the field value must be a valid
-   * IPv4 address with prefix.
-   * If the field value isn't a valid IPv4 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address with prefix length
-   * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipv4WithPrefixlen. - */ - @java.lang.Override - public boolean getIpv4WithPrefixlen() { - if (wellKnownCase_ == 27) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV6_WITH_PREFIXLEN_FIELD_NUMBER = 28; - /** - *
-   * `ipv6_with_prefixlen` specifies that the field value must be a valid
-   * IPv6 address with prefix length.
-   * If the field value is not a valid IPv6 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address prefix length
-   * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6WithPrefixlen field is set. - */ - @java.lang.Override - public boolean hasIpv6WithPrefixlen() { - return wellKnownCase_ == 28; - } - /** - *
-   * `ipv6_with_prefixlen` specifies that the field value must be a valid
-   * IPv6 address with prefix length.
-   * If the field value is not a valid IPv6 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address prefix length
-   * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipv6WithPrefixlen. - */ - @java.lang.Override - public boolean getIpv6WithPrefixlen() { - if (wellKnownCase_ == 28) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IP_PREFIX_FIELD_NUMBER = 29; - /** - *
-   * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-   * If the field value isn't a valid IP prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-   * `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP prefix
-   * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipPrefix field is set. - */ - @java.lang.Override - public boolean hasIpPrefix() { - return wellKnownCase_ == 29; - } - /** - *
-   * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-   * If the field value isn't a valid IP prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-   * `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP prefix
-   * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return The ipPrefix. - */ - @java.lang.Override - public boolean getIpPrefix() { - if (wellKnownCase_ == 29) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV4_PREFIX_FIELD_NUMBER = 30; - /** - *
-   * `ipv4_prefix` specifies that the field value must be a valid IPv4
-   * prefix. If the field value isn't a valid IPv4 prefix, an error message
-   * will be generated. The prefix must have all zeros for the masked bits of
-   * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 prefix
-   * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4Prefix field is set. - */ - @java.lang.Override - public boolean hasIpv4Prefix() { - return wellKnownCase_ == 30; - } - /** - *
-   * `ipv4_prefix` specifies that the field value must be a valid IPv4
-   * prefix. If the field value isn't a valid IPv4 prefix, an error message
-   * will be generated. The prefix must have all zeros for the masked bits of
-   * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 prefix
-   * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return The ipv4Prefix. - */ - @java.lang.Override - public boolean getIpv4Prefix() { - if (wellKnownCase_ == 30) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int IPV6_PREFIX_FIELD_NUMBER = 31; - /** - *
-   * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-   * If the field value is not a valid IPv6 prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix
-   * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 prefix
-   * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6Prefix field is set. - */ - @java.lang.Override - public boolean hasIpv6Prefix() { - return wellKnownCase_ == 31; - } - /** - *
-   * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-   * If the field value is not a valid IPv6 prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix
-   * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 prefix
-   * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return The ipv6Prefix. - */ - @java.lang.Override - public boolean getIpv6Prefix() { - if (wellKnownCase_ == 31) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int HOST_AND_PORT_FIELD_NUMBER = 32; - /** - *
-   * `host_and_port` specifies the field value must be a valid host and port
-   * pair. The host must be a valid hostname or IP address while the port
-   * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-   * with square brackets (e.g., `[::1]:1234`).
-   * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return Whether the hostAndPort field is set. - */ - @java.lang.Override - public boolean hasHostAndPort() { - return wellKnownCase_ == 32; - } - /** - *
-   * `host_and_port` specifies the field value must be a valid host and port
-   * pair. The host must be a valid hostname or IP address while the port
-   * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-   * with square brackets (e.g., `[::1]:1234`).
-   * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return The hostAndPort. - */ - @java.lang.Override - public boolean getHostAndPort() { - if (wellKnownCase_ == 32) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - - public static final int WELL_KNOWN_REGEX_FIELD_NUMBER = 24; - /** - *
-   * `well_known_regex` specifies a common well-known pattern
-   * defined as a regex. If the field value doesn't match the well-known
-   * regex, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid HTTP header value
-   * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-   * }
-   * ```
-   *
-   * #### KnownRegex
-   *
-   * `well_known_regex` contains some well-known patterns.
-   *
-   * | Name                          | Number | Description                               |
-   * |-------------------------------|--------|-------------------------------------------|
-   * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-   * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-   * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-   * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return Whether the wellKnownRegex field is set. - */ - public boolean hasWellKnownRegex() { - return wellKnownCase_ == 24; - } - /** - *
-   * `well_known_regex` specifies a common well-known pattern
-   * defined as a regex. If the field value doesn't match the well-known
-   * regex, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid HTTP header value
-   * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-   * }
-   * ```
-   *
-   * #### KnownRegex
-   *
-   * `well_known_regex` contains some well-known patterns.
-   *
-   * | Name                          | Number | Description                               |
-   * |-------------------------------|--------|-------------------------------------------|
-   * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-   * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-   * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-   * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return The wellKnownRegex. - */ - public build.buf.validate.KnownRegex getWellKnownRegex() { - if (wellKnownCase_ == 24) { - build.buf.validate.KnownRegex result = build.buf.validate.KnownRegex.forNumber( - (java.lang.Integer) wellKnown_); - return result == null ? build.buf.validate.KnownRegex.KNOWN_REGEX_UNSPECIFIED : result; - } - return build.buf.validate.KnownRegex.KNOWN_REGEX_UNSPECIFIED; - } - - public static final int STRICT_FIELD_NUMBER = 25; - private boolean strict_ = false; - /** - *
-   * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-   * enable strict header validation. By default, this is true, and HTTP header
-   * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-   * validations that only disallow `\r\n\0` characters, which can be used to
-   * bypass header matching rules.
-   *
-   * ```proto
-   * message MyString {
-   * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-   * string value = 1 [(buf.validate.field).string.strict = false];
-   * }
-   * ```
-   * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return Whether the strict field is set. - */ - @java.lang.Override - public boolean hasStrict() { - return ((bitField0_ & 0x00001000) != 0); - } - /** - *
-   * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-   * enable strict header validation. By default, this is true, and HTTP header
-   * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-   * validations that only disallow `\r\n\0` characters, which can be used to
-   * bypass header matching rules.
-   *
-   * ```proto
-   * message MyString {
-   * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-   * string value = 1 [(buf.validate.field).string.strict = false];
-   * }
-   * ```
-   * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return The strict. - */ - @java.lang.Override - public boolean getStrict() { - return strict_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 34; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList example_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public com.google.protobuf.ProtocolStringList - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public java.lang.String getExample(int index) { - return example_.get(index); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the example at the given index. - */ - public com.google.protobuf.ByteString - getExampleBytes(int index) { - return example_.getByteString(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, const_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt64(2, minLen_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeUInt64(3, maxLen_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeUInt64(4, minBytes_); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeUInt64(5, maxBytes_); - } - if (((bitField0_ & 0x00000080) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, pattern_); - } - if (((bitField0_ & 0x00000100) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, prefix_); - } - if (((bitField0_ & 0x00000200) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, suffix_); - } - if (((bitField0_ & 0x00000400) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 9, contains_); - } - for (int i = 0; i < in_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 10, in_.getRaw(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 11, notIn_.getRaw(i)); - } - if (wellKnownCase_ == 12) { - output.writeBool( - 12, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 13) { - output.writeBool( - 13, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 14) { - output.writeBool( - 14, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 15) { - output.writeBool( - 15, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 16) { - output.writeBool( - 16, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 17) { - output.writeBool( - 17, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 18) { - output.writeBool( - 18, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt64(19, len_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeUInt64(20, lenBytes_); - } - if (wellKnownCase_ == 21) { - output.writeBool( - 21, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 22) { - output.writeBool( - 22, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (((bitField0_ & 0x00000800) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 23, notContains_); - } - if (wellKnownCase_ == 24) { - output.writeEnum(24, ((java.lang.Integer) wellKnown_)); - } - if (((bitField0_ & 0x00001000) != 0)) { - output.writeBool(25, strict_); - } - if (wellKnownCase_ == 26) { - output.writeBool( - 26, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 27) { - output.writeBool( - 27, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 28) { - output.writeBool( - 28, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 29) { - output.writeBool( - 29, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 30) { - output.writeBool( - 30, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 31) { - output.writeBool( - 31, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 32) { - output.writeBool( - 32, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 33) { - output.writeBool( - 33, (boolean)((java.lang.Boolean) wellKnown_)); - } - for (int i = 0; i < example_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 34, example_.getRaw(i)); - } - extensionWriter.writeUntil(536870912, output); - 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.GeneratedMessage.computeStringSize(1, const_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, minLen_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, maxLen_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(4, minBytes_); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(5, maxBytes_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pattern_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, prefix_); - } - if (((bitField0_ & 0x00000200) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(8, suffix_); - } - if (((bitField0_ & 0x00000400) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(9, contains_); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += computeStringSizeNoTag(in_.getRaw(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += computeStringSizeNoTag(notIn_.getRaw(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - if (wellKnownCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 12, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 13, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 14) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 14, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 15) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 15, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 16) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 16, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 17) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 17, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 18) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 18, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(19, len_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(20, lenBytes_); - } - if (wellKnownCase_ == 21) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 21, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 22) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 22, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (((bitField0_ & 0x00000800) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(23, notContains_); - } - if (wellKnownCase_ == 24) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(24, ((java.lang.Integer) wellKnown_)); - } - if (((bitField0_ & 0x00001000) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(25, strict_); - } - if (wellKnownCase_ == 26) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 26, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 27) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 27, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 28) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 28, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 29) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 29, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 30) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 30, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 31) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 31, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 32) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 32, (boolean)((java.lang.Boolean) wellKnown_)); - } - if (wellKnownCase_ == 33) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 33, (boolean)((java.lang.Boolean) wellKnown_)); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += computeStringSizeNoTag(example_.getRaw(i)); - } - size += dataSize; - size += 2 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.StringRules)) { - return super.equals(obj); - } - build.buf.validate.StringRules other = (build.buf.validate.StringRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (!getConst() - .equals(other.getConst())) return false; - } - if (hasLen() != other.hasLen()) return false; - if (hasLen()) { - if (getLen() - != other.getLen()) return false; - } - if (hasMinLen() != other.hasMinLen()) return false; - if (hasMinLen()) { - if (getMinLen() - != other.getMinLen()) return false; - } - if (hasMaxLen() != other.hasMaxLen()) return false; - if (hasMaxLen()) { - if (getMaxLen() - != other.getMaxLen()) return false; - } - if (hasLenBytes() != other.hasLenBytes()) return false; - if (hasLenBytes()) { - if (getLenBytes() - != other.getLenBytes()) return false; - } - if (hasMinBytes() != other.hasMinBytes()) return false; - if (hasMinBytes()) { - if (getMinBytes() - != other.getMinBytes()) return false; - } - if (hasMaxBytes() != other.hasMaxBytes()) return false; - if (hasMaxBytes()) { - if (getMaxBytes() - != other.getMaxBytes()) return false; - } - if (hasPattern() != other.hasPattern()) return false; - if (hasPattern()) { - if (!getPattern() - .equals(other.getPattern())) return false; - } - if (hasPrefix() != other.hasPrefix()) return false; - if (hasPrefix()) { - if (!getPrefix() - .equals(other.getPrefix())) return false; - } - if (hasSuffix() != other.hasSuffix()) return false; - if (hasSuffix()) { - if (!getSuffix() - .equals(other.getSuffix())) return false; - } - if (hasContains() != other.hasContains()) return false; - if (hasContains()) { - if (!getContains() - .equals(other.getContains())) return false; - } - if (hasNotContains() != other.hasNotContains()) return false; - if (hasNotContains()) { - if (!getNotContains() - .equals(other.getNotContains())) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (hasStrict() != other.hasStrict()) return false; - if (hasStrict()) { - if (getStrict() - != other.getStrict()) return false; - } - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getWellKnownCase().equals(other.getWellKnownCase())) return false; - switch (wellKnownCase_) { - case 12: - if (getEmail() - != other.getEmail()) return false; - break; - case 13: - if (getHostname() - != other.getHostname()) return false; - break; - case 14: - if (getIp() - != other.getIp()) return false; - break; - case 15: - if (getIpv4() - != other.getIpv4()) return false; - break; - case 16: - if (getIpv6() - != other.getIpv6()) return false; - break; - case 17: - if (getUri() - != other.getUri()) return false; - break; - case 18: - if (getUriRef() - != other.getUriRef()) return false; - break; - case 21: - if (getAddress() - != other.getAddress()) return false; - break; - case 22: - if (getUuid() - != other.getUuid()) return false; - break; - case 33: - if (getTuuid() - != other.getTuuid()) return false; - break; - case 26: - if (getIpWithPrefixlen() - != other.getIpWithPrefixlen()) return false; - break; - case 27: - if (getIpv4WithPrefixlen() - != other.getIpv4WithPrefixlen()) return false; - break; - case 28: - if (getIpv6WithPrefixlen() - != other.getIpv6WithPrefixlen()) return false; - break; - case 29: - if (getIpPrefix() - != other.getIpPrefix()) return false; - break; - case 30: - if (getIpv4Prefix() - != other.getIpv4Prefix()) return false; - break; - case 31: - if (getIpv6Prefix() - != other.getIpv6Prefix()) return false; - break; - case 32: - if (getHostAndPort() - != other.getHostAndPort()) return false; - break; - case 24: - if (!getWellKnownRegex() - .equals(other.getWellKnownRegex())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst().hashCode(); - } - if (hasLen()) { - hash = (37 * hash) + LEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLen()); - } - if (hasMinLen()) { - hash = (37 * hash) + MIN_LEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinLen()); - } - if (hasMaxLen()) { - hash = (37 * hash) + MAX_LEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxLen()); - } - if (hasLenBytes()) { - hash = (37 * hash) + LEN_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLenBytes()); - } - if (hasMinBytes()) { - hash = (37 * hash) + MIN_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinBytes()); - } - if (hasMaxBytes()) { - hash = (37 * hash) + MAX_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxBytes()); - } - if (hasPattern()) { - hash = (37 * hash) + PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getPattern().hashCode(); - } - if (hasPrefix()) { - hash = (37 * hash) + PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getPrefix().hashCode(); - } - if (hasSuffix()) { - hash = (37 * hash) + SUFFIX_FIELD_NUMBER; - hash = (53 * hash) + getSuffix().hashCode(); - } - if (hasContains()) { - hash = (37 * hash) + CONTAINS_FIELD_NUMBER; - hash = (53 * hash) + getContains().hashCode(); - } - if (hasNotContains()) { - hash = (37 * hash) + NOT_CONTAINS_FIELD_NUMBER; - hash = (53 * hash) + getNotContains().hashCode(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (hasStrict()) { - hash = (37 * hash) + STRICT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getStrict()); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (wellKnownCase_) { - case 12: - hash = (37 * hash) + EMAIL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEmail()); - break; - case 13: - hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getHostname()); - break; - case 14: - hash = (37 * hash) + IP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIp()); - break; - case 15: - hash = (37 * hash) + IPV4_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv4()); - break; - case 16: - hash = (37 * hash) + IPV6_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv6()); - break; - case 17: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getUri()); - break; - case 18: - hash = (37 * hash) + URI_REF_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getUriRef()); - break; - case 21: - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAddress()); - break; - case 22: - hash = (37 * hash) + UUID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getUuid()); - break; - case 33: - hash = (37 * hash) + TUUID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getTuuid()); - break; - case 26: - hash = (37 * hash) + IP_WITH_PREFIXLEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpWithPrefixlen()); - break; - case 27: - hash = (37 * hash) + IPV4_WITH_PREFIXLEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv4WithPrefixlen()); - break; - case 28: - hash = (37 * hash) + IPV6_WITH_PREFIXLEN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv6WithPrefixlen()); - break; - case 29: - hash = (37 * hash) + IP_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpPrefix()); - break; - case 30: - hash = (37 * hash) + IPV4_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv4Prefix()); - break; - case 31: - hash = (37 * hash) + IPV6_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIpv6Prefix()); - break; - case 32: - hash = (37 * hash) + HOST_AND_PORT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getHostAndPort()); - break; - case 24: - hash = (37 * hash) + WELL_KNOWN_REGEX_FIELD_NUMBER; - hash = (53 * hash) + getWellKnownRegex().getNumber(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.StringRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.StringRules 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.StringRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.StringRules 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.StringRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.StringRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.StringRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.StringRules 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.StringRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.StringRules 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.StringRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.StringRules 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.StringRules 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; - } - /** - *
-   * StringRules describes the constraints applied to `string` values These
-   * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.StringRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.StringRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.StringRules) - build.buf.validate.StringRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_StringRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_StringRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.StringRules.class, build.buf.validate.StringRules.Builder.class); - } - - // Construct using build.buf.validate.StringRules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - bitField1_ = 0; - const_ = ""; - len_ = 0L; - minLen_ = 0L; - maxLen_ = 0L; - lenBytes_ = 0L; - minBytes_ = 0L; - maxBytes_ = 0L; - pattern_ = ""; - prefix_ = ""; - suffix_ = ""; - contains_ = ""; - notContains_ = ""; - in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - strict_ = false; - example_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - wellKnownCase_ = 0; - wellKnown_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_StringRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.StringRules getDefaultInstanceForType() { - return build.buf.validate.StringRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.StringRules build() { - build.buf.validate.StringRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.StringRules buildPartial() { - build.buf.validate.StringRules result = new build.buf.validate.StringRules(this); - if (bitField0_ != 0) { buildPartial0(result); } - if (bitField1_ != 0) { buildPartial1(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.StringRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.len_ = len_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.minLen_ = minLen_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.maxLen_ = maxLen_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.lenBytes_ = lenBytes_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.minBytes_ = minBytes_; - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.maxBytes_ = maxBytes_; - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.pattern_ = pattern_; - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.prefix_ = prefix_; - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.suffix_ = suffix_; - to_bitField0_ |= 0x00000200; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.contains_ = contains_; - to_bitField0_ |= 0x00000400; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.notContains_ = notContains_; - to_bitField0_ |= 0x00000800; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartial1(build.buf.validate.StringRules result) { - int from_bitField1_ = bitField1_; - int to_bitField0_ = 0; - if (((from_bitField1_ & 0x00000001) != 0)) { - result.strict_ = strict_; - to_bitField0_ |= 0x00001000; - } - if (((from_bitField1_ & 0x00000002) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.StringRules result) { - result.wellKnownCase_ = wellKnownCase_; - result.wellKnown_ = this.wellKnown_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.StringRules) { - return mergeFrom((build.buf.validate.StringRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.StringRules other) { - if (other == build.buf.validate.StringRules.getDefaultInstance()) return this; - if (other.hasConst()) { - const_ = other.const_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasLen()) { - setLen(other.getLen()); - } - if (other.hasMinLen()) { - setMinLen(other.getMinLen()); - } - if (other.hasMaxLen()) { - setMaxLen(other.getMaxLen()); - } - if (other.hasLenBytes()) { - setLenBytes(other.getLenBytes()); - } - if (other.hasMinBytes()) { - setMinBytes(other.getMinBytes()); - } - if (other.hasMaxBytes()) { - setMaxBytes(other.getMaxBytes()); - } - if (other.hasPattern()) { - pattern_ = other.pattern_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (other.hasPrefix()) { - prefix_ = other.prefix_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasSuffix()) { - suffix_ = other.suffix_; - bitField0_ |= 0x00000200; - onChanged(); - } - if (other.hasContains()) { - contains_ = other.contains_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (other.hasNotContains()) { - notContains_ = other.notContains_; - bitField0_ |= 0x00000800; - onChanged(); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - bitField0_ |= 0x00001000; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - bitField0_ |= 0x00002000; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (other.hasStrict()) { - setStrict(other.getStrict()); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - bitField1_ |= 0x00000002; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getWellKnownCase()) { - case EMAIL: { - setEmail(other.getEmail()); - break; - } - case HOSTNAME: { - setHostname(other.getHostname()); - break; - } - case IP: { - setIp(other.getIp()); - break; - } - case IPV4: { - setIpv4(other.getIpv4()); - break; - } - case IPV6: { - setIpv6(other.getIpv6()); - break; - } - case URI: { - setUri(other.getUri()); - break; - } - case URI_REF: { - setUriRef(other.getUriRef()); - break; - } - case ADDRESS: { - setAddress(other.getAddress()); - break; - } - case UUID: { - setUuid(other.getUuid()); - break; - } - case TUUID: { - setTuuid(other.getTuuid()); - break; - } - case IP_WITH_PREFIXLEN: { - setIpWithPrefixlen(other.getIpWithPrefixlen()); - break; - } - case IPV4_WITH_PREFIXLEN: { - setIpv4WithPrefixlen(other.getIpv4WithPrefixlen()); - break; - } - case IPV6_WITH_PREFIXLEN: { - setIpv6WithPrefixlen(other.getIpv6WithPrefixlen()); - break; - } - case IP_PREFIX: { - setIpPrefix(other.getIpPrefix()); - break; - } - case IPV4_PREFIX: { - setIpv4Prefix(other.getIpv4Prefix()); - break; - } - case IPV6_PREFIX: { - setIpv6Prefix(other.getIpv6Prefix()); - break; - } - case HOST_AND_PORT: { - setHostAndPort(other.getHostAndPort()); - break; - } - case WELL_KNOWN_REGEX: { - setWellKnownRegex(other.getWellKnownRegex()); - break; - } - case WELLKNOWN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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: { - const_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - minLen_ = input.readUInt64(); - bitField0_ |= 0x00000004; - break; - } // case 16 - case 24: { - maxLen_ = input.readUInt64(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 32: { - minBytes_ = input.readUInt64(); - bitField0_ |= 0x00000020; - break; - } // case 32 - case 40: { - maxBytes_ = input.readUInt64(); - bitField0_ |= 0x00000040; - break; - } // case 40 - case 50: { - pattern_ = input.readBytes(); - bitField0_ |= 0x00000080; - break; - } // case 50 - case 58: { - prefix_ = input.readBytes(); - bitField0_ |= 0x00000100; - break; - } // case 58 - case 66: { - suffix_ = input.readBytes(); - bitField0_ |= 0x00000200; - break; - } // case 66 - case 74: { - contains_ = input.readBytes(); - bitField0_ |= 0x00000400; - break; - } // case 74 - case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); - ensureInIsMutable(); - in_.add(bs); - break; - } // case 82 - case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); - ensureNotInIsMutable(); - notIn_.add(bs); - break; - } // case 90 - case 96: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 12; - break; - } // case 96 - case 104: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 13; - break; - } // case 104 - case 112: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 14; - break; - } // case 112 - case 120: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 15; - break; - } // case 120 - case 128: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 16; - break; - } // case 128 - case 136: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 17; - break; - } // case 136 - case 144: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 18; - break; - } // case 144 - case 152: { - len_ = input.readUInt64(); - bitField0_ |= 0x00000002; - break; - } // case 152 - case 160: { - lenBytes_ = input.readUInt64(); - bitField0_ |= 0x00000010; - break; - } // case 160 - case 168: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 21; - break; - } // case 168 - case 176: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 22; - break; - } // case 176 - case 186: { - notContains_ = input.readBytes(); - bitField0_ |= 0x00000800; - break; - } // case 186 - case 192: { - int rawValue = input.readEnum(); - build.buf.validate.KnownRegex value = - build.buf.validate.KnownRegex.forNumber(rawValue); - if (value == null) { - mergeUnknownVarintField(24, rawValue); - } else { - wellKnownCase_ = 24; - wellKnown_ = rawValue; - } - break; - } // case 192 - case 200: { - strict_ = input.readBool(); - bitField1_ |= 0x00000001; - break; - } // case 200 - case 208: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 26; - break; - } // case 208 - case 216: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 27; - break; - } // case 216 - case 224: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 28; - break; - } // case 224 - case 232: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 29; - break; - } // case 232 - case 240: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 30; - break; - } // case 240 - case 248: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 31; - break; - } // case 248 - case 256: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 32; - break; - } // case 256 - case 264: { - wellKnown_ = input.readBool(); - wellKnownCase_ = 33; - break; - } // case 264 - case 274: { - com.google.protobuf.ByteString bs = input.readBytes(); - ensureExampleIsMutable(); - example_.add(bs); - break; - } // case 274 - 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 wellKnownCase_ = 0; - private java.lang.Object wellKnown_; - public WellKnownCase - getWellKnownCase() { - return WellKnownCase.forNumber( - wellKnownCase_); - } - - public Builder clearWellKnown() { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - return this; - } - - private int bitField0_; - private int bitField1_; - - private java.lang.Object const_ = ""; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must equal `hello`
-     * string value = 1 [(buf.validate.field).string.const = "hello"];
-     * }
-     * ```
-     * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must equal `hello`
-     * string value = 1 [(buf.validate.field).string.const = "hello"];
-     * }
-     * ```
-     * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - public java.lang.String getConst() { - java.lang.Object ref = const_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - const_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must equal `hello`
-     * string value = 1 [(buf.validate.field).string.const = "hello"];
-     * }
-     * ```
-     * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The bytes for const. - */ - public com.google.protobuf.ByteString - getConstBytes() { - java.lang.Object ref = const_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - const_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must equal `hello`
-     * string value = 1 [(buf.validate.field).string.const = "hello"];
-     * }
-     * ```
-     * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must equal `hello`
-     * string value = 1 [(buf.validate.field).string.const = "hello"];
-     * }
-     * ```
-     * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - const_ = getDefaultInstance().getConst(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must equal `hello`
-     * string value = 1 [(buf.validate.field).string.const = "hello"];
-     * }
-     * ```
-     * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The bytes for const to set. - * @return This builder for chaining. - */ - public Builder setConstBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private long len_ ; - /** - *
-     * `len` dictates that the field value must have the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value does not meet the specified
-     * length, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 5 characters
-     * string value = 1 [(buf.validate.field).string.len = 5];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return Whether the len field is set. - */ - @java.lang.Override - public boolean hasLen() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `len` dictates that the field value must have the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value does not meet the specified
-     * length, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 5 characters
-     * string value = 1 [(buf.validate.field).string.len = 5];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return The len. - */ - @java.lang.Override - public long getLen() { - return len_; - } - /** - *
-     * `len` dictates that the field value must have the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value does not meet the specified
-     * length, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 5 characters
-     * string value = 1 [(buf.validate.field).string.len = 5];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @param value The len to set. - * @return This builder for chaining. - */ - public Builder setLen(long value) { - - len_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `len` dictates that the field value must have the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value does not meet the specified
-     * length, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 5 characters
-     * string value = 1 [(buf.validate.field).string.len = 5];
-     * }
-     * ```
-     * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLen() { - bitField0_ = (bitField0_ & ~0x00000002); - len_ = 0L; - onChanged(); - return this; - } - - private long minLen_ ; - /** - *
-     * `min_len` specifies that the field value must have at least the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value contains fewer characters, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 3 characters
-     * string value = 1 [(buf.validate.field).string.min_len = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return Whether the minLen field is set. - */ - @java.lang.Override - public boolean hasMinLen() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * `min_len` specifies that the field value must have at least the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value contains fewer characters, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 3 characters
-     * string value = 1 [(buf.validate.field).string.min_len = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return The minLen. - */ - @java.lang.Override - public long getMinLen() { - return minLen_; - } - /** - *
-     * `min_len` specifies that the field value must have at least the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value contains fewer characters, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 3 characters
-     * string value = 1 [(buf.validate.field).string.min_len = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @param value The minLen to set. - * @return This builder for chaining. - */ - public Builder setMinLen(long value) { - - minLen_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `min_len` specifies that the field value must have at least the specified
-     * number of characters (Unicode code points), which may differ from the number
-     * of bytes in the string. If the field value contains fewer characters, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 3 characters
-     * string value = 1 [(buf.validate.field).string.min_len = 3];
-     * }
-     * ```
-     * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMinLen() { - bitField0_ = (bitField0_ & ~0x00000004); - minLen_ = 0L; - onChanged(); - return this; - } - - private long maxLen_ ; - /** - *
-     * `max_len` specifies that the field value must have no more than the specified
-     * number of characters (Unicode code points), which may differ from the
-     * number of bytes in the string. If the field value contains more characters,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 10 characters
-     * string value = 1 [(buf.validate.field).string.max_len = 10];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return Whether the maxLen field is set. - */ - @java.lang.Override - public boolean hasMaxLen() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * `max_len` specifies that the field value must have no more than the specified
-     * number of characters (Unicode code points), which may differ from the
-     * number of bytes in the string. If the field value contains more characters,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 10 characters
-     * string value = 1 [(buf.validate.field).string.max_len = 10];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return The maxLen. - */ - @java.lang.Override - public long getMaxLen() { - return maxLen_; - } - /** - *
-     * `max_len` specifies that the field value must have no more than the specified
-     * number of characters (Unicode code points), which may differ from the
-     * number of bytes in the string. If the field value contains more characters,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 10 characters
-     * string value = 1 [(buf.validate.field).string.max_len = 10];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @param value The maxLen to set. - * @return This builder for chaining. - */ - public Builder setMaxLen(long value) { - - maxLen_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `max_len` specifies that the field value must have no more than the specified
-     * number of characters (Unicode code points), which may differ from the
-     * number of bytes in the string. If the field value contains more characters,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 10 characters
-     * string value = 1 [(buf.validate.field).string.max_len = 10];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMaxLen() { - bitField0_ = (bitField0_ & ~0x00000008); - maxLen_ = 0L; - onChanged(); - return this; - } - - private long lenBytes_ ; - /** - *
-     * `len_bytes` dictates that the field value must have the specified number of
-     * bytes. If the field value does not match the specified length in bytes,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 6 bytes
-     * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return Whether the lenBytes field is set. - */ - @java.lang.Override - public boolean hasLenBytes() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * `len_bytes` dictates that the field value must have the specified number of
-     * bytes. If the field value does not match the specified length in bytes,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 6 bytes
-     * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return The lenBytes. - */ - @java.lang.Override - public long getLenBytes() { - return lenBytes_; - } - /** - *
-     * `len_bytes` dictates that the field value must have the specified number of
-     * bytes. If the field value does not match the specified length in bytes,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 6 bytes
-     * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @param value The lenBytes to set. - * @return This builder for chaining. - */ - public Builder setLenBytes(long value) { - - lenBytes_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - *
-     * `len_bytes` dictates that the field value must have the specified number of
-     * bytes. If the field value does not match the specified length in bytes,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be 6 bytes
-     * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-     * }
-     * ```
-     * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLenBytes() { - bitField0_ = (bitField0_ & ~0x00000010); - lenBytes_ = 0L; - onChanged(); - return this; - } - - private long minBytes_ ; - /** - *
-     * `min_bytes` specifies that the field value must have at least the specified
-     * number of bytes. If the field value contains fewer bytes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 4 bytes
-     * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-     * }
-     *
-     * ```
-     * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return Whether the minBytes field is set. - */ - @java.lang.Override - public boolean hasMinBytes() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * `min_bytes` specifies that the field value must have at least the specified
-     * number of bytes. If the field value contains fewer bytes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 4 bytes
-     * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-     * }
-     *
-     * ```
-     * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return The minBytes. - */ - @java.lang.Override - public long getMinBytes() { - return minBytes_; - } - /** - *
-     * `min_bytes` specifies that the field value must have at least the specified
-     * number of bytes. If the field value contains fewer bytes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 4 bytes
-     * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-     * }
-     *
-     * ```
-     * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @param value The minBytes to set. - * @return This builder for chaining. - */ - public Builder setMinBytes(long value) { - - minBytes_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `min_bytes` specifies that the field value must have at least the specified
-     * number of bytes. If the field value contains fewer bytes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at least 4 bytes
-     * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-     * }
-     *
-     * ```
-     * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMinBytes() { - bitField0_ = (bitField0_ & ~0x00000020); - minBytes_ = 0L; - onChanged(); - return this; - } - - private long maxBytes_ ; - /** - *
-     * `max_bytes` specifies that the field value must have no more than the
-     * specified number of bytes. If the field value contains more bytes, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 8 bytes
-     * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return Whether the maxBytes field is set. - */ - @java.lang.Override - public boolean hasMaxBytes() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - *
-     * `max_bytes` specifies that the field value must have no more than the
-     * specified number of bytes. If the field value contains more bytes, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 8 bytes
-     * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return The maxBytes. - */ - @java.lang.Override - public long getMaxBytes() { - return maxBytes_; - } - /** - *
-     * `max_bytes` specifies that the field value must have no more than the
-     * specified number of bytes. If the field value contains more bytes, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 8 bytes
-     * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @param value The maxBytes to set. - * @return This builder for chaining. - */ - public Builder setMaxBytes(long value) { - - maxBytes_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `max_bytes` specifies that the field value must have no more than the
-     * specified number of bytes. If the field value contains more bytes, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value length must be at most 8 bytes
-     * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-     * }
-     * ```
-     * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearMaxBytes() { - bitField0_ = (bitField0_ & ~0x00000040); - maxBytes_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object pattern_ = ""; - /** - *
-     * `pattern` specifies that the field value must match the specified
-     * regular expression (RE2 syntax), with the expression provided without any
-     * delimiters. If the field value doesn't match the regular expression, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not match regex pattern `^[a-zA-Z]//$`
-     * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return Whether the pattern field is set. - */ - public boolean hasPattern() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * `pattern` specifies that the field value must match the specified
-     * regular expression (RE2 syntax), with the expression provided without any
-     * delimiters. If the field value doesn't match the regular expression, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not match regex pattern `^[a-zA-Z]//$`
-     * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The pattern. - */ - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `pattern` specifies that the field value must match the specified
-     * regular expression (RE2 syntax), with the expression provided without any
-     * delimiters. If the field value doesn't match the regular expression, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not match regex pattern `^[a-zA-Z]//$`
-     * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The bytes for pattern. - */ - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `pattern` specifies that the field value must match the specified
-     * regular expression (RE2 syntax), with the expression provided without any
-     * delimiters. If the field value doesn't match the regular expression, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not match regex pattern `^[a-zA-Z]//$`
-     * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @param value The pattern to set. - * @return This builder for chaining. - */ - public Builder setPattern( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - pattern_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `pattern` specifies that the field value must match the specified
-     * regular expression (RE2 syntax), with the expression provided without any
-     * delimiters. If the field value doesn't match the regular expression, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not match regex pattern `^[a-zA-Z]//$`
-     * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearPattern() { - pattern_ = getDefaultInstance().getPattern(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-     * `pattern` specifies that the field value must match the specified
-     * regular expression (RE2 syntax), with the expression provided without any
-     * delimiters. If the field value doesn't match the regular expression, an
-     * error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not match regex pattern `^[a-zA-Z]//$`
-     * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-     * }
-     * ```
-     * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @param value The bytes for pattern to set. - * @return This builder for chaining. - */ - public Builder setPatternBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - pattern_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object prefix_ = ""; - /** - *
-     * `prefix` specifies that the field value must have the
-     * specified substring at the beginning of the string. If the field value
-     * doesn't start with the specified prefix, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have prefix `pre`
-     * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-     * }
-     * ```
-     * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return Whether the prefix field is set. - */ - public boolean hasPrefix() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * `prefix` specifies that the field value must have the
-     * specified substring at the beginning of the string. If the field value
-     * doesn't start with the specified prefix, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have prefix `pre`
-     * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-     * }
-     * ```
-     * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The prefix. - */ - public java.lang.String getPrefix() { - java.lang.Object ref = prefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - prefix_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `prefix` specifies that the field value must have the
-     * specified substring at the beginning of the string. If the field value
-     * doesn't start with the specified prefix, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have prefix `pre`
-     * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-     * }
-     * ```
-     * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The bytes for prefix. - */ - public com.google.protobuf.ByteString - getPrefixBytes() { - java.lang.Object ref = prefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - prefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `prefix` specifies that the field value must have the
-     * specified substring at the beginning of the string. If the field value
-     * doesn't start with the specified prefix, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have prefix `pre`
-     * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-     * }
-     * ```
-     * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @param value The prefix to set. - * @return This builder for chaining. - */ - public Builder setPrefix( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - prefix_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - /** - *
-     * `prefix` specifies that the field value must have the
-     * specified substring at the beginning of the string. If the field value
-     * doesn't start with the specified prefix, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have prefix `pre`
-     * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-     * }
-     * ```
-     * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearPrefix() { - prefix_ = getDefaultInstance().getPrefix(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * `prefix` specifies that the field value must have the
-     * specified substring at the beginning of the string. If the field value
-     * doesn't start with the specified prefix, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have prefix `pre`
-     * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-     * }
-     * ```
-     * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @param value The bytes for prefix to set. - * @return This builder for chaining. - */ - public Builder setPrefixBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - prefix_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private java.lang.Object suffix_ = ""; - /** - *
-     * `suffix` specifies that the field value must have the
-     * specified substring at the end of the string. If the field value doesn't
-     * end with the specified suffix, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have suffix `post`
-     * string value = 1 [(buf.validate.field).string.suffix = "post"];
-     * }
-     * ```
-     * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return Whether the suffix field is set. - */ - public boolean hasSuffix() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * `suffix` specifies that the field value must have the
-     * specified substring at the end of the string. If the field value doesn't
-     * end with the specified suffix, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have suffix `post`
-     * string value = 1 [(buf.validate.field).string.suffix = "post"];
-     * }
-     * ```
-     * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The suffix. - */ - public java.lang.String getSuffix() { - java.lang.Object ref = suffix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - suffix_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `suffix` specifies that the field value must have the
-     * specified substring at the end of the string. If the field value doesn't
-     * end with the specified suffix, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have suffix `post`
-     * string value = 1 [(buf.validate.field).string.suffix = "post"];
-     * }
-     * ```
-     * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The bytes for suffix. - */ - public com.google.protobuf.ByteString - getSuffixBytes() { - java.lang.Object ref = suffix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - suffix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `suffix` specifies that the field value must have the
-     * specified substring at the end of the string. If the field value doesn't
-     * end with the specified suffix, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have suffix `post`
-     * string value = 1 [(buf.validate.field).string.suffix = "post"];
-     * }
-     * ```
-     * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @param value The suffix to set. - * @return This builder for chaining. - */ - public Builder setSuffix( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - suffix_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - /** - *
-     * `suffix` specifies that the field value must have the
-     * specified substring at the end of the string. If the field value doesn't
-     * end with the specified suffix, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have suffix `post`
-     * string value = 1 [(buf.validate.field).string.suffix = "post"];
-     * }
-     * ```
-     * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearSuffix() { - suffix_ = getDefaultInstance().getSuffix(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - /** - *
-     * `suffix` specifies that the field value must have the
-     * specified substring at the end of the string. If the field value doesn't
-     * end with the specified suffix, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not have suffix `post`
-     * string value = 1 [(buf.validate.field).string.suffix = "post"];
-     * }
-     * ```
-     * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @param value The bytes for suffix to set. - * @return This builder for chaining. - */ - public Builder setSuffixBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - suffix_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - private java.lang.Object contains_ = ""; - /** - *
-     * `contains` specifies that the field value must have the
-     * specified substring anywhere in the string. If the field value doesn't
-     * contain the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not contain substring `inside`.
-     * string value = 1 [(buf.validate.field).string.contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return Whether the contains field is set. - */ - public boolean hasContains() { - return ((bitField0_ & 0x00000400) != 0); - } - /** - *
-     * `contains` specifies that the field value must have the
-     * specified substring anywhere in the string. If the field value doesn't
-     * contain the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not contain substring `inside`.
-     * string value = 1 [(buf.validate.field).string.contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The contains. - */ - public java.lang.String getContains() { - java.lang.Object ref = contains_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - contains_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `contains` specifies that the field value must have the
-     * specified substring anywhere in the string. If the field value doesn't
-     * contain the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not contain substring `inside`.
-     * string value = 1 [(buf.validate.field).string.contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The bytes for contains. - */ - public com.google.protobuf.ByteString - getContainsBytes() { - java.lang.Object ref = contains_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - contains_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `contains` specifies that the field value must have the
-     * specified substring anywhere in the string. If the field value doesn't
-     * contain the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not contain substring `inside`.
-     * string value = 1 [(buf.validate.field).string.contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @param value The contains to set. - * @return This builder for chaining. - */ - public Builder setContains( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - contains_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - /** - *
-     * `contains` specifies that the field value must have the
-     * specified substring anywhere in the string. If the field value doesn't
-     * contain the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not contain substring `inside`.
-     * string value = 1 [(buf.validate.field).string.contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearContains() { - contains_ = getDefaultInstance().getContains(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - /** - *
-     * `contains` specifies that the field value must have the
-     * specified substring anywhere in the string. If the field value doesn't
-     * contain the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value does not contain substring `inside`.
-     * string value = 1 [(buf.validate.field).string.contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @param value The bytes for contains to set. - * @return This builder for chaining. - */ - public Builder setContainsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - contains_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private java.lang.Object notContains_ = ""; - /** - *
-     * `not_contains` specifies that the field value must not have the
-     * specified substring anywhere in the string. If the field value contains
-     * the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value contains substring `inside`.
-     * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return Whether the notContains field is set. - */ - public boolean hasNotContains() { - return ((bitField0_ & 0x00000800) != 0); - } - /** - *
-     * `not_contains` specifies that the field value must not have the
-     * specified substring anywhere in the string. If the field value contains
-     * the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value contains substring `inside`.
-     * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return The notContains. - */ - public java.lang.String getNotContains() { - java.lang.Object ref = notContains_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - notContains_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `not_contains` specifies that the field value must not have the
-     * specified substring anywhere in the string. If the field value contains
-     * the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value contains substring `inside`.
-     * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return The bytes for notContains. - */ - public com.google.protobuf.ByteString - getNotContainsBytes() { - java.lang.Object ref = notContains_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - notContains_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `not_contains` specifies that the field value must not have the
-     * specified substring anywhere in the string. If the field value contains
-     * the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value contains substring `inside`.
-     * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @param value The notContains to set. - * @return This builder for chaining. - */ - public Builder setNotContains( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - notContains_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - /** - *
-     * `not_contains` specifies that the field value must not have the
-     * specified substring anywhere in the string. If the field value contains
-     * the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value contains substring `inside`.
-     * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotContains() { - notContains_ = getDefaultInstance().getNotContains(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - return this; - } - /** - *
-     * `not_contains` specifies that the field value must not have the
-     * specified substring anywhere in the string. If the field value contains
-     * the specified substring, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value contains substring `inside`.
-     * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-     * }
-     * ```
-     * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @param value The bytes for notContains to set. - * @return This builder for chaining. - */ - public Builder setNotContainsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - notContains_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = new com.google.protobuf.LazyStringArrayList(in_); - } - bitField0_ |= 0x00001000; - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public com.google.protobuf.ProtocolStringList - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public java.lang.String getIn(int index) { - return in_.get(index); - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the in at the given index. - */ - public com.google.protobuf.ByteString - getInBytes(int index) { - return in_.getByteString(index); - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.set(index, value); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.add(value); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000);; - onChanged(); - return this; - } - /** - *
-     * `in` specifies that the field value must be equal to one of the specified
-     * values. If the field value isn't one of the specified values, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be in list ["apple", "banana"]
-     * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-     * }
-     * ```
-     * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The bytes of the in to add. - * @return This builder for chaining. - */ - public Builder addInBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureInIsMutable(); - in_.add(value); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = new com.google.protobuf.LazyStringArrayList(notIn_); - } - bitField0_ |= 0x00002000; - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public com.google.protobuf.ProtocolStringList - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public java.lang.String getNotIn(int index) { - return notIn_.get(index); - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the notIn at the given index. - */ - public com.google.protobuf.ByteString - getNotInBytes(int index) { - return notIn_.getByteString(index); - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.set(index, value); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.add(value); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000);; - onChanged(); - return this; - } - /** - *
-     * `not_in` specifies that the field value cannot be equal to any
-     * of the specified values. If the field value is one of the specified values,
-     * an error message will be generated.
-     * ```proto
-     * message MyString {
-     * // value must not be in list ["orange", "grape"]
-     * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-     * }
-     * ```
-     * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The bytes of the notIn to add. - * @return This builder for chaining. - */ - public Builder addNotInBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureNotInIsMutable(); - notIn_.add(value); - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - *
-     * `email` specifies that the field value must be a valid email address
-     * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-     * If the field value isn't a valid email address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid email address
-     * string value = 1 [(buf.validate.field).string.email = true];
-     * }
-     * ```
-     * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return Whether the email field is set. - */ - public boolean hasEmail() { - return wellKnownCase_ == 12; - } - /** - *
-     * `email` specifies that the field value must be a valid email address
-     * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-     * If the field value isn't a valid email address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid email address
-     * string value = 1 [(buf.validate.field).string.email = true];
-     * }
-     * ```
-     * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return The email. - */ - public boolean getEmail() { - if (wellKnownCase_ == 12) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `email` specifies that the field value must be a valid email address
-     * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-     * If the field value isn't a valid email address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid email address
-     * string value = 1 [(buf.validate.field).string.email = true];
-     * }
-     * ```
-     * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @param value The email to set. - * @return This builder for chaining. - */ - public Builder setEmail(boolean value) { - - wellKnownCase_ = 12; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `email` specifies that the field value must be a valid email address
-     * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-     * If the field value isn't a valid email address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid email address
-     * string value = 1 [(buf.validate.field).string.email = true];
-     * }
-     * ```
-     * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearEmail() { - if (wellKnownCase_ == 12) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `hostname` specifies that the field value must be a valid
-     * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-     * internationalized domain names (IDNs). If the field value isn't a
-     * valid hostname, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname
-     * string value = 1 [(buf.validate.field).string.hostname = true];
-     * }
-     * ```
-     * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return Whether the hostname field is set. - */ - public boolean hasHostname() { - return wellKnownCase_ == 13; - } - /** - *
-     * `hostname` specifies that the field value must be a valid
-     * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-     * internationalized domain names (IDNs). If the field value isn't a
-     * valid hostname, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname
-     * string value = 1 [(buf.validate.field).string.hostname = true];
-     * }
-     * ```
-     * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return The hostname. - */ - public boolean getHostname() { - if (wellKnownCase_ == 13) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `hostname` specifies that the field value must be a valid
-     * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-     * internationalized domain names (IDNs). If the field value isn't a
-     * valid hostname, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname
-     * string value = 1 [(buf.validate.field).string.hostname = true];
-     * }
-     * ```
-     * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @param value The hostname to set. - * @return This builder for chaining. - */ - public Builder setHostname(boolean value) { - - wellKnownCase_ = 13; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `hostname` specifies that the field value must be a valid
-     * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-     * internationalized domain names (IDNs). If the field value isn't a
-     * valid hostname, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname
-     * string value = 1 [(buf.validate.field).string.hostname = true];
-     * }
-     * ```
-     * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearHostname() { - if (wellKnownCase_ == 13) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ip` specifies that the field value must be a valid IP
-     * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-     * If the field value isn't a valid IP address, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP address
-     * string value = 1 [(buf.validate.field).string.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return Whether the ip field is set. - */ - public boolean hasIp() { - return wellKnownCase_ == 14; - } - /** - *
-     * `ip` specifies that the field value must be a valid IP
-     * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-     * If the field value isn't a valid IP address, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP address
-     * string value = 1 [(buf.validate.field).string.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return The ip. - */ - public boolean getIp() { - if (wellKnownCase_ == 14) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ip` specifies that the field value must be a valid IP
-     * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-     * If the field value isn't a valid IP address, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP address
-     * string value = 1 [(buf.validate.field).string.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @param value The ip to set. - * @return This builder for chaining. - */ - public Builder setIp(boolean value) { - - wellKnownCase_ = 14; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ip` specifies that the field value must be a valid IP
-     * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-     * If the field value isn't a valid IP address, an error message will be
-     * generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP address
-     * string value = 1 [(buf.validate.field).string.ip = true];
-     * }
-     * ```
-     * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIp() { - if (wellKnownCase_ == 14) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv4` specifies that the field value must be a valid IPv4
-     * address. If the field value isn't a valid IPv4 address, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address
-     * string value = 1 [(buf.validate.field).string.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4 field is set. - */ - public boolean hasIpv4() { - return wellKnownCase_ == 15; - } - /** - *
-     * `ipv4` specifies that the field value must be a valid IPv4
-     * address. If the field value isn't a valid IPv4 address, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address
-     * string value = 1 [(buf.validate.field).string.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return The ipv4. - */ - public boolean getIpv4() { - if (wellKnownCase_ == 15) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv4` specifies that the field value must be a valid IPv4
-     * address. If the field value isn't a valid IPv4 address, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address
-     * string value = 1 [(buf.validate.field).string.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @param value The ipv4 to set. - * @return This builder for chaining. - */ - public Builder setIpv4(boolean value) { - - wellKnownCase_ = 15; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv4` specifies that the field value must be a valid IPv4
-     * address. If the field value isn't a valid IPv4 address, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address
-     * string value = 1 [(buf.validate.field).string.ipv4 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv4() { - if (wellKnownCase_ == 15) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv6` specifies that the field value must be a valid
-     * IPv6 address, without surrounding square brackets. If the field value is
-     * not a valid IPv6 address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address
-     * string value = 1 [(buf.validate.field).string.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6 field is set. - */ - public boolean hasIpv6() { - return wellKnownCase_ == 16; - } - /** - *
-     * `ipv6` specifies that the field value must be a valid
-     * IPv6 address, without surrounding square brackets. If the field value is
-     * not a valid IPv6 address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address
-     * string value = 1 [(buf.validate.field).string.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return The ipv6. - */ - public boolean getIpv6() { - if (wellKnownCase_ == 16) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv6` specifies that the field value must be a valid
-     * IPv6 address, without surrounding square brackets. If the field value is
-     * not a valid IPv6 address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address
-     * string value = 1 [(buf.validate.field).string.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @param value The ipv6 to set. - * @return This builder for chaining. - */ - public Builder setIpv6(boolean value) { - - wellKnownCase_ = 16; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv6` specifies that the field value must be a valid
-     * IPv6 address, without surrounding square brackets. If the field value is
-     * not a valid IPv6 address, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address
-     * string value = 1 [(buf.validate.field).string.ipv6 = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv6() { - if (wellKnownCase_ == 16) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `uri` specifies that the field value must be a valid,
-     * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-     * absolute URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri = true];
-     * }
-     * ```
-     * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return wellKnownCase_ == 17; - } - /** - *
-     * `uri` specifies that the field value must be a valid,
-     * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-     * absolute URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri = true];
-     * }
-     * ```
-     * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return The uri. - */ - public boolean getUri() { - if (wellKnownCase_ == 17) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `uri` specifies that the field value must be a valid,
-     * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-     * absolute URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri = true];
-     * }
-     * ```
-     * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(boolean value) { - - wellKnownCase_ = 17; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `uri` specifies that the field value must be a valid,
-     * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-     * absolute URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri = true];
-     * }
-     * ```
-     * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearUri() { - if (wellKnownCase_ == 17) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `uri_ref` specifies that the field value must be a valid URI
-     * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-     * field value isn't a valid URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri_ref = true];
-     * }
-     * ```
-     * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return Whether the uriRef field is set. - */ - public boolean hasUriRef() { - return wellKnownCase_ == 18; - } - /** - *
-     * `uri_ref` specifies that the field value must be a valid URI
-     * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-     * field value isn't a valid URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri_ref = true];
-     * }
-     * ```
-     * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return The uriRef. - */ - public boolean getUriRef() { - if (wellKnownCase_ == 18) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `uri_ref` specifies that the field value must be a valid URI
-     * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-     * field value isn't a valid URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri_ref = true];
-     * }
-     * ```
-     * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @param value The uriRef to set. - * @return This builder for chaining. - */ - public Builder setUriRef(boolean value) { - - wellKnownCase_ = 18; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `uri_ref` specifies that the field value must be a valid URI
-     * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-     * field value isn't a valid URI, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid URI
-     * string value = 1 [(buf.validate.field).string.uri_ref = true];
-     * }
-     * ```
-     * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearUriRef() { - if (wellKnownCase_ == 18) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `address` specifies that the field value must be either a valid hostname
-     * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-     * (which doesn't support internationalized domain names or IDNs) or a valid
-     * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname, or ip address
-     * string value = 1 [(buf.validate.field).string.address = true];
-     * }
-     * ```
-     * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return Whether the address field is set. - */ - public boolean hasAddress() { - return wellKnownCase_ == 21; - } - /** - *
-     * `address` specifies that the field value must be either a valid hostname
-     * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-     * (which doesn't support internationalized domain names or IDNs) or a valid
-     * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname, or ip address
-     * string value = 1 [(buf.validate.field).string.address = true];
-     * }
-     * ```
-     * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return The address. - */ - public boolean getAddress() { - if (wellKnownCase_ == 21) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `address` specifies that the field value must be either a valid hostname
-     * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-     * (which doesn't support internationalized domain names or IDNs) or a valid
-     * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname, or ip address
-     * string value = 1 [(buf.validate.field).string.address = true];
-     * }
-     * ```
-     * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress(boolean value) { - - wellKnownCase_ = 21; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `address` specifies that the field value must be either a valid hostname
-     * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-     * (which doesn't support internationalized domain names or IDNs) or a valid
-     * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-     * message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid hostname, or ip address
-     * string value = 1 [(buf.validate.field).string.address = true];
-     * }
-     * ```
-     * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearAddress() { - if (wellKnownCase_ == 21) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `uuid` specifies that the field value must be a valid UUID as defined by
-     * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-     * field value isn't a valid UUID, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid UUID
-     * string value = 1 [(buf.validate.field).string.uuid = true];
-     * }
-     * ```
-     * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return Whether the uuid field is set. - */ - public boolean hasUuid() { - return wellKnownCase_ == 22; - } - /** - *
-     * `uuid` specifies that the field value must be a valid UUID as defined by
-     * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-     * field value isn't a valid UUID, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid UUID
-     * string value = 1 [(buf.validate.field).string.uuid = true];
-     * }
-     * ```
-     * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return The uuid. - */ - public boolean getUuid() { - if (wellKnownCase_ == 22) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `uuid` specifies that the field value must be a valid UUID as defined by
-     * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-     * field value isn't a valid UUID, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid UUID
-     * string value = 1 [(buf.validate.field).string.uuid = true];
-     * }
-     * ```
-     * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @param value The uuid to set. - * @return This builder for chaining. - */ - public Builder setUuid(boolean value) { - - wellKnownCase_ = 22; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `uuid` specifies that the field value must be a valid UUID as defined by
-     * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-     * field value isn't a valid UUID, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid UUID
-     * string value = 1 [(buf.validate.field).string.uuid = true];
-     * }
-     * ```
-     * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearUuid() { - if (wellKnownCase_ == 22) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-     * omitted. If the field value isn't a valid UUID without dashes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid trimmed UUID
-     * string value = 1 [(buf.validate.field).string.tuuid = true];
-     * }
-     * ```
-     * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return Whether the tuuid field is set. - */ - public boolean hasTuuid() { - return wellKnownCase_ == 33; - } - /** - *
-     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-     * omitted. If the field value isn't a valid UUID without dashes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid trimmed UUID
-     * string value = 1 [(buf.validate.field).string.tuuid = true];
-     * }
-     * ```
-     * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return The tuuid. - */ - public boolean getTuuid() { - if (wellKnownCase_ == 33) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-     * omitted. If the field value isn't a valid UUID without dashes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid trimmed UUID
-     * string value = 1 [(buf.validate.field).string.tuuid = true];
-     * }
-     * ```
-     * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @param value The tuuid to set. - * @return This builder for chaining. - */ - public Builder setTuuid(boolean value) { - - wellKnownCase_ = 33; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-     * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-     * omitted. If the field value isn't a valid UUID without dashes, an error message
-     * will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid trimmed UUID
-     * string value = 1 [(buf.validate.field).string.tuuid = true];
-     * }
-     * ```
-     * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearTuuid() { - if (wellKnownCase_ == 33) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-     * address with prefix length. If the field value isn't a valid IP with prefix
-     * length, an error message will be generated.
-     *
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP with prefix length
-     * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipWithPrefixlen field is set. - */ - public boolean hasIpWithPrefixlen() { - return wellKnownCase_ == 26; - } - /** - *
-     * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-     * address with prefix length. If the field value isn't a valid IP with prefix
-     * length, an error message will be generated.
-     *
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP with prefix length
-     * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipWithPrefixlen. - */ - public boolean getIpWithPrefixlen() { - if (wellKnownCase_ == 26) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-     * address with prefix length. If the field value isn't a valid IP with prefix
-     * length, an error message will be generated.
-     *
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP with prefix length
-     * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @param value The ipWithPrefixlen to set. - * @return This builder for chaining. - */ - public Builder setIpWithPrefixlen(boolean value) { - - wellKnownCase_ = 26; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-     * address with prefix length. If the field value isn't a valid IP with prefix
-     * length, an error message will be generated.
-     *
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP with prefix length
-     * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpWithPrefixlen() { - if (wellKnownCase_ == 26) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv4_with_prefixlen` specifies that the field value must be a valid
-     * IPv4 address with prefix.
-     * If the field value isn't a valid IPv4 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address with prefix length
-     * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4WithPrefixlen field is set. - */ - public boolean hasIpv4WithPrefixlen() { - return wellKnownCase_ == 27; - } - /** - *
-     * `ipv4_with_prefixlen` specifies that the field value must be a valid
-     * IPv4 address with prefix.
-     * If the field value isn't a valid IPv4 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address with prefix length
-     * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipv4WithPrefixlen. - */ - public boolean getIpv4WithPrefixlen() { - if (wellKnownCase_ == 27) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv4_with_prefixlen` specifies that the field value must be a valid
-     * IPv4 address with prefix.
-     * If the field value isn't a valid IPv4 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address with prefix length
-     * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @param value The ipv4WithPrefixlen to set. - * @return This builder for chaining. - */ - public Builder setIpv4WithPrefixlen(boolean value) { - - wellKnownCase_ = 27; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv4_with_prefixlen` specifies that the field value must be a valid
-     * IPv4 address with prefix.
-     * If the field value isn't a valid IPv4 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 address with prefix length
-     * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv4WithPrefixlen() { - if (wellKnownCase_ == 27) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv6_with_prefixlen` specifies that the field value must be a valid
-     * IPv6 address with prefix length.
-     * If the field value is not a valid IPv6 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address prefix length
-     * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6WithPrefixlen field is set. - */ - public boolean hasIpv6WithPrefixlen() { - return wellKnownCase_ == 28; - } - /** - *
-     * `ipv6_with_prefixlen` specifies that the field value must be a valid
-     * IPv6 address with prefix length.
-     * If the field value is not a valid IPv6 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address prefix length
-     * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipv6WithPrefixlen. - */ - public boolean getIpv6WithPrefixlen() { - if (wellKnownCase_ == 28) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv6_with_prefixlen` specifies that the field value must be a valid
-     * IPv6 address with prefix length.
-     * If the field value is not a valid IPv6 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address prefix length
-     * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @param value The ipv6WithPrefixlen to set. - * @return This builder for chaining. - */ - public Builder setIpv6WithPrefixlen(boolean value) { - - wellKnownCase_ = 28; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv6_with_prefixlen` specifies that the field value must be a valid
-     * IPv6 address with prefix length.
-     * If the field value is not a valid IPv6 address with prefix length,
-     * an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 address prefix length
-     * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv6WithPrefixlen() { - if (wellKnownCase_ == 28) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-     * If the field value isn't a valid IP prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-     * `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP prefix
-     * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipPrefix field is set. - */ - public boolean hasIpPrefix() { - return wellKnownCase_ == 29; - } - /** - *
-     * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-     * If the field value isn't a valid IP prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-     * `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP prefix
-     * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return The ipPrefix. - */ - public boolean getIpPrefix() { - if (wellKnownCase_ == 29) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-     * If the field value isn't a valid IP prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-     * `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP prefix
-     * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @param value The ipPrefix to set. - * @return This builder for chaining. - */ - public Builder setIpPrefix(boolean value) { - - wellKnownCase_ = 29; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-     * If the field value isn't a valid IP prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-     * `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IP prefix
-     * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpPrefix() { - if (wellKnownCase_ == 29) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv4_prefix` specifies that the field value must be a valid IPv4
-     * prefix. If the field value isn't a valid IPv4 prefix, an error message
-     * will be generated. The prefix must have all zeros for the masked bits of
-     * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 prefix
-     * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4Prefix field is set. - */ - public boolean hasIpv4Prefix() { - return wellKnownCase_ == 30; - } - /** - *
-     * `ipv4_prefix` specifies that the field value must be a valid IPv4
-     * prefix. If the field value isn't a valid IPv4 prefix, an error message
-     * will be generated. The prefix must have all zeros for the masked bits of
-     * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 prefix
-     * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return The ipv4Prefix. - */ - public boolean getIpv4Prefix() { - if (wellKnownCase_ == 30) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv4_prefix` specifies that the field value must be a valid IPv4
-     * prefix. If the field value isn't a valid IPv4 prefix, an error message
-     * will be generated. The prefix must have all zeros for the masked bits of
-     * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 prefix
-     * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @param value The ipv4Prefix to set. - * @return This builder for chaining. - */ - public Builder setIpv4Prefix(boolean value) { - - wellKnownCase_ = 30; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv4_prefix` specifies that the field value must be a valid IPv4
-     * prefix. If the field value isn't a valid IPv4 prefix, an error message
-     * will be generated. The prefix must have all zeros for the masked bits of
-     * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv4 prefix
-     * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv4Prefix() { - if (wellKnownCase_ == 30) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-     * If the field value is not a valid IPv6 prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix
-     * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 prefix
-     * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6Prefix field is set. - */ - public boolean hasIpv6Prefix() { - return wellKnownCase_ == 31; - } - /** - *
-     * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-     * If the field value is not a valid IPv6 prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix
-     * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 prefix
-     * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return The ipv6Prefix. - */ - public boolean getIpv6Prefix() { - if (wellKnownCase_ == 31) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-     * If the field value is not a valid IPv6 prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix
-     * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 prefix
-     * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @param value The ipv6Prefix to set. - * @return This builder for chaining. - */ - public Builder setIpv6Prefix(boolean value) { - - wellKnownCase_ = 31; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-     * If the field value is not a valid IPv6 prefix, an error message will be
-     * generated. The prefix must have all zeros for the masked bits of the prefix
-     * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid IPv6 prefix
-     * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-     * }
-     * ```
-     * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIpv6Prefix() { - if (wellKnownCase_ == 31) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `host_and_port` specifies the field value must be a valid host and port
-     * pair. The host must be a valid hostname or IP address while the port
-     * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-     * with square brackets (e.g., `[::1]:1234`).
-     * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return Whether the hostAndPort field is set. - */ - public boolean hasHostAndPort() { - return wellKnownCase_ == 32; - } - /** - *
-     * `host_and_port` specifies the field value must be a valid host and port
-     * pair. The host must be a valid hostname or IP address while the port
-     * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-     * with square brackets (e.g., `[::1]:1234`).
-     * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return The hostAndPort. - */ - public boolean getHostAndPort() { - if (wellKnownCase_ == 32) { - return (java.lang.Boolean) wellKnown_; - } - return false; - } - /** - *
-     * `host_and_port` specifies the field value must be a valid host and port
-     * pair. The host must be a valid hostname or IP address while the port
-     * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-     * with square brackets (e.g., `[::1]:1234`).
-     * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @param value The hostAndPort to set. - * @return This builder for chaining. - */ - public Builder setHostAndPort(boolean value) { - - wellKnownCase_ = 32; - wellKnown_ = value; - onChanged(); - return this; - } - /** - *
-     * `host_and_port` specifies the field value must be a valid host and port
-     * pair. The host must be a valid hostname or IP address while the port
-     * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-     * with square brackets (e.g., `[::1]:1234`).
-     * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearHostAndPort() { - if (wellKnownCase_ == 32) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `well_known_regex` specifies a common well-known pattern
-     * defined as a regex. If the field value doesn't match the well-known
-     * regex, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid HTTP header value
-     * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-     * }
-     * ```
-     *
-     * #### KnownRegex
-     *
-     * `well_known_regex` contains some well-known patterns.
-     *
-     * | Name                          | Number | Description                               |
-     * |-------------------------------|--------|-------------------------------------------|
-     * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-     * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-     * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-     * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return Whether the wellKnownRegex field is set. - */ - @java.lang.Override - public boolean hasWellKnownRegex() { - return wellKnownCase_ == 24; - } - /** - *
-     * `well_known_regex` specifies a common well-known pattern
-     * defined as a regex. If the field value doesn't match the well-known
-     * regex, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid HTTP header value
-     * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-     * }
-     * ```
-     *
-     * #### KnownRegex
-     *
-     * `well_known_regex` contains some well-known patterns.
-     *
-     * | Name                          | Number | Description                               |
-     * |-------------------------------|--------|-------------------------------------------|
-     * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-     * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-     * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-     * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return The wellKnownRegex. - */ - @java.lang.Override - public build.buf.validate.KnownRegex getWellKnownRegex() { - if (wellKnownCase_ == 24) { - build.buf.validate.KnownRegex result = build.buf.validate.KnownRegex.forNumber( - (java.lang.Integer) wellKnown_); - return result == null ? build.buf.validate.KnownRegex.KNOWN_REGEX_UNSPECIFIED : result; - } - return build.buf.validate.KnownRegex.KNOWN_REGEX_UNSPECIFIED; - } - /** - *
-     * `well_known_regex` specifies a common well-known pattern
-     * defined as a regex. If the field value doesn't match the well-known
-     * regex, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid HTTP header value
-     * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-     * }
-     * ```
-     *
-     * #### KnownRegex
-     *
-     * `well_known_regex` contains some well-known patterns.
-     *
-     * | Name                          | Number | Description                               |
-     * |-------------------------------|--------|-------------------------------------------|
-     * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-     * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-     * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-     * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @param value The wellKnownRegex to set. - * @return This builder for chaining. - */ - public Builder setWellKnownRegex(build.buf.validate.KnownRegex value) { - if (value == null) { - throw new NullPointerException(); - } - wellKnownCase_ = 24; - wellKnown_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * `well_known_regex` specifies a common well-known pattern
-     * defined as a regex. If the field value doesn't match the well-known
-     * regex, an error message will be generated.
-     *
-     * ```proto
-     * message MyString {
-     * // value must be a valid HTTP header value
-     * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-     * }
-     * ```
-     *
-     * #### KnownRegex
-     *
-     * `well_known_regex` contains some well-known patterns.
-     *
-     * | Name                          | Number | Description                               |
-     * |-------------------------------|--------|-------------------------------------------|
-     * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-     * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-     * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-     * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearWellKnownRegex() { - if (wellKnownCase_ == 24) { - wellKnownCase_ = 0; - wellKnown_ = null; - onChanged(); - } - return this; - } - - private boolean strict_ ; - /** - *
-     * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-     * enable strict header validation. By default, this is true, and HTTP header
-     * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-     * validations that only disallow `\r\n\0` characters, which can be used to
-     * bypass header matching rules.
-     *
-     * ```proto
-     * message MyString {
-     * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-     * string value = 1 [(buf.validate.field).string.strict = false];
-     * }
-     * ```
-     * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return Whether the strict field is set. - */ - @java.lang.Override - public boolean hasStrict() { - return ((bitField1_ & 0x00000001) != 0); - } - /** - *
-     * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-     * enable strict header validation. By default, this is true, and HTTP header
-     * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-     * validations that only disallow `\r\n\0` characters, which can be used to
-     * bypass header matching rules.
-     *
-     * ```proto
-     * message MyString {
-     * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-     * string value = 1 [(buf.validate.field).string.strict = false];
-     * }
-     * ```
-     * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return The strict. - */ - @java.lang.Override - public boolean getStrict() { - return strict_; - } - /** - *
-     * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-     * enable strict header validation. By default, this is true, and HTTP header
-     * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-     * validations that only disallow `\r\n\0` characters, which can be used to
-     * bypass header matching rules.
-     *
-     * ```proto
-     * message MyString {
-     * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-     * string value = 1 [(buf.validate.field).string.strict = false];
-     * }
-     * ```
-     * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @param value The strict to set. - * @return This builder for chaining. - */ - public Builder setStrict(boolean value) { - - strict_ = value; - bitField1_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-     * enable strict header validation. By default, this is true, and HTTP header
-     * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-     * validations that only disallow `\r\n\0` characters, which can be used to
-     * bypass header matching rules.
-     *
-     * ```proto
-     * message MyString {
-     * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-     * string value = 1 [(buf.validate.field).string.strict = false];
-     * }
-     * ```
-     * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return This builder for chaining. - */ - public Builder clearStrict() { - bitField1_ = (bitField1_ & ~0x00000001); - strict_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList example_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = new com.google.protobuf.LazyStringArrayList(example_); - } - bitField1_ |= 0x00000002; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public com.google.protobuf.ProtocolStringList - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public java.lang.String getExample(int index) { - return example_.get(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the example at the given index. - */ - public com.google.protobuf.ByteString - getExampleBytes(int index) { - return example_.getByteString(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureExampleIsMutable(); - example_.set(index, value); - bitField1_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureExampleIsMutable(); - example_.add(value); - bitField1_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField1_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField1_ = (bitField1_ & ~0x00000002);; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyString {
-     * string value = 1 [
-     * (buf.validate.field).string.example = 1,
-     * (buf.validate.field).string.example = 2
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The bytes of the example to add. - * @return This builder for chaining. - */ - public Builder addExampleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureExampleIsMutable(); - example_.add(value); - bitField1_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.StringRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.StringRules) - private static final build.buf.validate.StringRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.StringRules(); - } - - public static build.buf.validate.StringRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringRules 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.StringRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/StringRulesOrBuilder.java b/src/main/java/build/buf/validate/StringRulesOrBuilder.java deleted file mode 100644 index 9b59f60a..00000000 --- a/src/main/java/build/buf/validate/StringRulesOrBuilder.java +++ /dev/null @@ -1,1555 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface StringRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.StringRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must equal `hello`
-   * string value = 1 [(buf.validate.field).string.const = "hello"];
-   * }
-   * ```
-   * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must equal `hello`
-   * string value = 1 [(buf.validate.field).string.const = "hello"];
-   * }
-   * ```
-   * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - java.lang.String getConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must equal `hello`
-   * string value = 1 [(buf.validate.field).string.const = "hello"];
-   * }
-   * ```
-   * 
- * - * optional string const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The bytes for const. - */ - com.google.protobuf.ByteString - getConstBytes(); - - /** - *
-   * `len` dictates that the field value must have the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value does not meet the specified
-   * length, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 5 characters
-   * string value = 1 [(buf.validate.field).string.len = 5];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return Whether the len field is set. - */ - boolean hasLen(); - /** - *
-   * `len` dictates that the field value must have the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value does not meet the specified
-   * length, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 5 characters
-   * string value = 1 [(buf.validate.field).string.len = 5];
-   * }
-   * ```
-   * 
- * - * optional uint64 len = 19 [json_name = "len", (.buf.validate.predefined) = { ... } - * @return The len. - */ - long getLen(); - - /** - *
-   * `min_len` specifies that the field value must have at least the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value contains fewer characters, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 3 characters
-   * string value = 1 [(buf.validate.field).string.min_len = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return Whether the minLen field is set. - */ - boolean hasMinLen(); - /** - *
-   * `min_len` specifies that the field value must have at least the specified
-   * number of characters (Unicode code points), which may differ from the number
-   * of bytes in the string. If the field value contains fewer characters, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 3 characters
-   * string value = 1 [(buf.validate.field).string.min_len = 3];
-   * }
-   * ```
-   * 
- * - * optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.predefined) = { ... } - * @return The minLen. - */ - long getMinLen(); - - /** - *
-   * `max_len` specifies that the field value must have no more than the specified
-   * number of characters (Unicode code points), which may differ from the
-   * number of bytes in the string. If the field value contains more characters,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 10 characters
-   * string value = 1 [(buf.validate.field).string.max_len = 10];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return Whether the maxLen field is set. - */ - boolean hasMaxLen(); - /** - *
-   * `max_len` specifies that the field value must have no more than the specified
-   * number of characters (Unicode code points), which may differ from the
-   * number of bytes in the string. If the field value contains more characters,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 10 characters
-   * string value = 1 [(buf.validate.field).string.max_len = 10];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.predefined) = { ... } - * @return The maxLen. - */ - long getMaxLen(); - - /** - *
-   * `len_bytes` dictates that the field value must have the specified number of
-   * bytes. If the field value does not match the specified length in bytes,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 6 bytes
-   * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return Whether the lenBytes field is set. - */ - boolean hasLenBytes(); - /** - *
-   * `len_bytes` dictates that the field value must have the specified number of
-   * bytes. If the field value does not match the specified length in bytes,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be 6 bytes
-   * string value = 1 [(buf.validate.field).string.len_bytes = 6];
-   * }
-   * ```
-   * 
- * - * optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.predefined) = { ... } - * @return The lenBytes. - */ - long getLenBytes(); - - /** - *
-   * `min_bytes` specifies that the field value must have at least the specified
-   * number of bytes. If the field value contains fewer bytes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 4 bytes
-   * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-   * }
-   *
-   * ```
-   * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return Whether the minBytes field is set. - */ - boolean hasMinBytes(); - /** - *
-   * `min_bytes` specifies that the field value must have at least the specified
-   * number of bytes. If the field value contains fewer bytes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at least 4 bytes
-   * string value = 1 [(buf.validate.field).string.min_bytes = 4];
-   * }
-   *
-   * ```
-   * 
- * - * optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.predefined) = { ... } - * @return The minBytes. - */ - long getMinBytes(); - - /** - *
-   * `max_bytes` specifies that the field value must have no more than the
-   * specified number of bytes. If the field value contains more bytes, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 8 bytes
-   * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return Whether the maxBytes field is set. - */ - boolean hasMaxBytes(); - /** - *
-   * `max_bytes` specifies that the field value must have no more than the
-   * specified number of bytes. If the field value contains more bytes, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value length must be at most 8 bytes
-   * string value = 1 [(buf.validate.field).string.max_bytes = 8];
-   * }
-   * ```
-   * 
- * - * optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.predefined) = { ... } - * @return The maxBytes. - */ - long getMaxBytes(); - - /** - *
-   * `pattern` specifies that the field value must match the specified
-   * regular expression (RE2 syntax), with the expression provided without any
-   * delimiters. If the field value doesn't match the regular expression, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not match regex pattern `^[a-zA-Z]//$`
-   * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return Whether the pattern field is set. - */ - boolean hasPattern(); - /** - *
-   * `pattern` specifies that the field value must match the specified
-   * regular expression (RE2 syntax), with the expression provided without any
-   * delimiters. If the field value doesn't match the regular expression, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not match regex pattern `^[a-zA-Z]//$`
-   * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The pattern. - */ - java.lang.String getPattern(); - /** - *
-   * `pattern` specifies that the field value must match the specified
-   * regular expression (RE2 syntax), with the expression provided without any
-   * delimiters. If the field value doesn't match the regular expression, an
-   * error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not match regex pattern `^[a-zA-Z]//$`
-   * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
-   * }
-   * ```
-   * 
- * - * optional string pattern = 6 [json_name = "pattern", (.buf.validate.predefined) = { ... } - * @return The bytes for pattern. - */ - com.google.protobuf.ByteString - getPatternBytes(); - - /** - *
-   * `prefix` specifies that the field value must have the
-   * specified substring at the beginning of the string. If the field value
-   * doesn't start with the specified prefix, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have prefix `pre`
-   * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-   * }
-   * ```
-   * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return Whether the prefix field is set. - */ - boolean hasPrefix(); - /** - *
-   * `prefix` specifies that the field value must have the
-   * specified substring at the beginning of the string. If the field value
-   * doesn't start with the specified prefix, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have prefix `pre`
-   * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-   * }
-   * ```
-   * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The prefix. - */ - java.lang.String getPrefix(); - /** - *
-   * `prefix` specifies that the field value must have the
-   * specified substring at the beginning of the string. If the field value
-   * doesn't start with the specified prefix, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have prefix `pre`
-   * string value = 1 [(buf.validate.field).string.prefix = "pre"];
-   * }
-   * ```
-   * 
- * - * optional string prefix = 7 [json_name = "prefix", (.buf.validate.predefined) = { ... } - * @return The bytes for prefix. - */ - com.google.protobuf.ByteString - getPrefixBytes(); - - /** - *
-   * `suffix` specifies that the field value must have the
-   * specified substring at the end of the string. If the field value doesn't
-   * end with the specified suffix, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have suffix `post`
-   * string value = 1 [(buf.validate.field).string.suffix = "post"];
-   * }
-   * ```
-   * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return Whether the suffix field is set. - */ - boolean hasSuffix(); - /** - *
-   * `suffix` specifies that the field value must have the
-   * specified substring at the end of the string. If the field value doesn't
-   * end with the specified suffix, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have suffix `post`
-   * string value = 1 [(buf.validate.field).string.suffix = "post"];
-   * }
-   * ```
-   * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The suffix. - */ - java.lang.String getSuffix(); - /** - *
-   * `suffix` specifies that the field value must have the
-   * specified substring at the end of the string. If the field value doesn't
-   * end with the specified suffix, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not have suffix `post`
-   * string value = 1 [(buf.validate.field).string.suffix = "post"];
-   * }
-   * ```
-   * 
- * - * optional string suffix = 8 [json_name = "suffix", (.buf.validate.predefined) = { ... } - * @return The bytes for suffix. - */ - com.google.protobuf.ByteString - getSuffixBytes(); - - /** - *
-   * `contains` specifies that the field value must have the
-   * specified substring anywhere in the string. If the field value doesn't
-   * contain the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not contain substring `inside`.
-   * string value = 1 [(buf.validate.field).string.contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return Whether the contains field is set. - */ - boolean hasContains(); - /** - *
-   * `contains` specifies that the field value must have the
-   * specified substring anywhere in the string. If the field value doesn't
-   * contain the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not contain substring `inside`.
-   * string value = 1 [(buf.validate.field).string.contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The contains. - */ - java.lang.String getContains(); - /** - *
-   * `contains` specifies that the field value must have the
-   * specified substring anywhere in the string. If the field value doesn't
-   * contain the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value does not contain substring `inside`.
-   * string value = 1 [(buf.validate.field).string.contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string contains = 9 [json_name = "contains", (.buf.validate.predefined) = { ... } - * @return The bytes for contains. - */ - com.google.protobuf.ByteString - getContainsBytes(); - - /** - *
-   * `not_contains` specifies that the field value must not have the
-   * specified substring anywhere in the string. If the field value contains
-   * the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value contains substring `inside`.
-   * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return Whether the notContains field is set. - */ - boolean hasNotContains(); - /** - *
-   * `not_contains` specifies that the field value must not have the
-   * specified substring anywhere in the string. If the field value contains
-   * the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value contains substring `inside`.
-   * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return The notContains. - */ - java.lang.String getNotContains(); - /** - *
-   * `not_contains` specifies that the field value must not have the
-   * specified substring anywhere in the string. If the field value contains
-   * the specified substring, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value contains substring `inside`.
-   * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
-   * }
-   * ```
-   * 
- * - * optional string not_contains = 23 [json_name = "notContains", (.buf.validate.predefined) = { ... } - * @return The bytes for notContains. - */ - com.google.protobuf.ByteString - getNotContainsBytes(); - - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List - getInList(); - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - java.lang.String getIn(int index); - /** - *
-   * `in` specifies that the field value must be equal to one of the specified
-   * values. If the field value isn't one of the specified values, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be in list ["apple", "banana"]
-   * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
-   * }
-   * ```
-   * 
- * - * repeated string in = 10 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the in at the given index. - */ - com.google.protobuf.ByteString - getInBytes(int index); - - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List - getNotInList(); - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - java.lang.String getNotIn(int index); - /** - *
-   * `not_in` specifies that the field value cannot be equal to any
-   * of the specified values. If the field value is one of the specified values,
-   * an error message will be generated.
-   * ```proto
-   * message MyString {
-   * // value must not be in list ["orange", "grape"]
-   * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
-   * }
-   * ```
-   * 
- * - * repeated string not_in = 11 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the notIn at the given index. - */ - com.google.protobuf.ByteString - getNotInBytes(int index); - - /** - *
-   * `email` specifies that the field value must be a valid email address
-   * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-   * If the field value isn't a valid email address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid email address
-   * string value = 1 [(buf.validate.field).string.email = true];
-   * }
-   * ```
-   * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return Whether the email field is set. - */ - boolean hasEmail(); - /** - *
-   * `email` specifies that the field value must be a valid email address
-   * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
-   * If the field value isn't a valid email address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid email address
-   * string value = 1 [(buf.validate.field).string.email = true];
-   * }
-   * ```
-   * 
- * - * bool email = 12 [json_name = "email", (.buf.validate.predefined) = { ... } - * @return The email. - */ - boolean getEmail(); - - /** - *
-   * `hostname` specifies that the field value must be a valid
-   * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-   * internationalized domain names (IDNs). If the field value isn't a
-   * valid hostname, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname
-   * string value = 1 [(buf.validate.field).string.hostname = true];
-   * }
-   * ```
-   * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return Whether the hostname field is set. - */ - boolean hasHostname(); - /** - *
-   * `hostname` specifies that the field value must be a valid
-   * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
-   * internationalized domain names (IDNs). If the field value isn't a
-   * valid hostname, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname
-   * string value = 1 [(buf.validate.field).string.hostname = true];
-   * }
-   * ```
-   * 
- * - * bool hostname = 13 [json_name = "hostname", (.buf.validate.predefined) = { ... } - * @return The hostname. - */ - boolean getHostname(); - - /** - *
-   * `ip` specifies that the field value must be a valid IP
-   * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-   * If the field value isn't a valid IP address, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP address
-   * string value = 1 [(buf.validate.field).string.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return Whether the ip field is set. - */ - boolean hasIp(); - /** - *
-   * `ip` specifies that the field value must be a valid IP
-   * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
-   * If the field value isn't a valid IP address, an error message will be
-   * generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP address
-   * string value = 1 [(buf.validate.field).string.ip = true];
-   * }
-   * ```
-   * 
- * - * bool ip = 14 [json_name = "ip", (.buf.validate.predefined) = { ... } - * @return The ip. - */ - boolean getIp(); - - /** - *
-   * `ipv4` specifies that the field value must be a valid IPv4
-   * address. If the field value isn't a valid IPv4 address, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address
-   * string value = 1 [(buf.validate.field).string.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4 field is set. - */ - boolean hasIpv4(); - /** - *
-   * `ipv4` specifies that the field value must be a valid IPv4
-   * address. If the field value isn't a valid IPv4 address, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address
-   * string value = 1 [(buf.validate.field).string.ipv4 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.predefined) = { ... } - * @return The ipv4. - */ - boolean getIpv4(); - - /** - *
-   * `ipv6` specifies that the field value must be a valid
-   * IPv6 address, without surrounding square brackets. If the field value is
-   * not a valid IPv6 address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address
-   * string value = 1 [(buf.validate.field).string.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6 field is set. - */ - boolean hasIpv6(); - /** - *
-   * `ipv6` specifies that the field value must be a valid
-   * IPv6 address, without surrounding square brackets. If the field value is
-   * not a valid IPv6 address, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address
-   * string value = 1 [(buf.validate.field).string.ipv6 = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.predefined) = { ... } - * @return The ipv6. - */ - boolean getIpv6(); - - /** - *
-   * `uri` specifies that the field value must be a valid,
-   * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-   * absolute URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri = true];
-   * }
-   * ```
-   * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return Whether the uri field is set. - */ - boolean hasUri(); - /** - *
-   * `uri` specifies that the field value must be a valid,
-   * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
-   * absolute URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri = true];
-   * }
-   * ```
-   * 
- * - * bool uri = 17 [json_name = "uri", (.buf.validate.predefined) = { ... } - * @return The uri. - */ - boolean getUri(); - - /** - *
-   * `uri_ref` specifies that the field value must be a valid URI
-   * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-   * field value isn't a valid URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri_ref = true];
-   * }
-   * ```
-   * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return Whether the uriRef field is set. - */ - boolean hasUriRef(); - /** - *
-   * `uri_ref` specifies that the field value must be a valid URI
-   * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
-   * field value isn't a valid URI, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid URI
-   * string value = 1 [(buf.validate.field).string.uri_ref = true];
-   * }
-   * ```
-   * 
- * - * bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.predefined) = { ... } - * @return The uriRef. - */ - boolean getUriRef(); - - /** - *
-   * `address` specifies that the field value must be either a valid hostname
-   * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-   * (which doesn't support internationalized domain names or IDNs) or a valid
-   * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname, or ip address
-   * string value = 1 [(buf.validate.field).string.address = true];
-   * }
-   * ```
-   * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return Whether the address field is set. - */ - boolean hasAddress(); - /** - *
-   * `address` specifies that the field value must be either a valid hostname
-   * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
-   * (which doesn't support internationalized domain names or IDNs) or a valid
-   * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
-   * message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid hostname, or ip address
-   * string value = 1 [(buf.validate.field).string.address = true];
-   * }
-   * ```
-   * 
- * - * bool address = 21 [json_name = "address", (.buf.validate.predefined) = { ... } - * @return The address. - */ - boolean getAddress(); - - /** - *
-   * `uuid` specifies that the field value must be a valid UUID as defined by
-   * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-   * field value isn't a valid UUID, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid UUID
-   * string value = 1 [(buf.validate.field).string.uuid = true];
-   * }
-   * ```
-   * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return Whether the uuid field is set. - */ - boolean hasUuid(); - /** - *
-   * `uuid` specifies that the field value must be a valid UUID as defined by
-   * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
-   * field value isn't a valid UUID, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid UUID
-   * string value = 1 [(buf.validate.field).string.uuid = true];
-   * }
-   * ```
-   * 
- * - * bool uuid = 22 [json_name = "uuid", (.buf.validate.predefined) = { ... } - * @return The uuid. - */ - boolean getUuid(); - - /** - *
-   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-   * omitted. If the field value isn't a valid UUID without dashes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid trimmed UUID
-   * string value = 1 [(buf.validate.field).string.tuuid = true];
-   * }
-   * ```
-   * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return Whether the tuuid field is set. - */ - boolean hasTuuid(); - /** - *
-   * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
-   * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
-   * omitted. If the field value isn't a valid UUID without dashes, an error message
-   * will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid trimmed UUID
-   * string value = 1 [(buf.validate.field).string.tuuid = true];
-   * }
-   * ```
-   * 
- * - * bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... } - * @return The tuuid. - */ - boolean getTuuid(); - - /** - *
-   * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-   * address with prefix length. If the field value isn't a valid IP with prefix
-   * length, an error message will be generated.
-   *
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP with prefix length
-   * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipWithPrefixlen field is set. - */ - boolean hasIpWithPrefixlen(); - /** - *
-   * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
-   * address with prefix length. If the field value isn't a valid IP with prefix
-   * length, an error message will be generated.
-   *
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP with prefix length
-   * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipWithPrefixlen. - */ - boolean getIpWithPrefixlen(); - - /** - *
-   * `ipv4_with_prefixlen` specifies that the field value must be a valid
-   * IPv4 address with prefix.
-   * If the field value isn't a valid IPv4 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address with prefix length
-   * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4WithPrefixlen field is set. - */ - boolean hasIpv4WithPrefixlen(); - /** - *
-   * `ipv4_with_prefixlen` specifies that the field value must be a valid
-   * IPv4 address with prefix.
-   * If the field value isn't a valid IPv4 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 address with prefix length
-   * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipv4WithPrefixlen. - */ - boolean getIpv4WithPrefixlen(); - - /** - *
-   * `ipv6_with_prefixlen` specifies that the field value must be a valid
-   * IPv6 address with prefix length.
-   * If the field value is not a valid IPv6 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address prefix length
-   * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6WithPrefixlen field is set. - */ - boolean hasIpv6WithPrefixlen(); - /** - *
-   * `ipv6_with_prefixlen` specifies that the field value must be a valid
-   * IPv6 address with prefix length.
-   * If the field value is not a valid IPv6 address with prefix length,
-   * an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 address prefix length
-   * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.predefined) = { ... } - * @return The ipv6WithPrefixlen. - */ - boolean getIpv6WithPrefixlen(); - - /** - *
-   * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-   * If the field value isn't a valid IP prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-   * `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP prefix
-   * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipPrefix field is set. - */ - boolean hasIpPrefix(); - /** - *
-   * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
-   * If the field value isn't a valid IP prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
-   * `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IP prefix
-   * string value = 1 [(buf.validate.field).string.ip_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.predefined) = { ... } - * @return The ipPrefix. - */ - boolean getIpPrefix(); - - /** - *
-   * `ipv4_prefix` specifies that the field value must be a valid IPv4
-   * prefix. If the field value isn't a valid IPv4 prefix, an error message
-   * will be generated. The prefix must have all zeros for the masked bits of
-   * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 prefix
-   * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipv4Prefix field is set. - */ - boolean hasIpv4Prefix(); - /** - *
-   * `ipv4_prefix` specifies that the field value must be a valid IPv4
-   * prefix. If the field value isn't a valid IPv4 prefix, an error message
-   * will be generated. The prefix must have all zeros for the masked bits of
-   * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv4 prefix
-   * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.predefined) = { ... } - * @return The ipv4Prefix. - */ - boolean getIpv4Prefix(); - - /** - *
-   * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-   * If the field value is not a valid IPv6 prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix
-   * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 prefix
-   * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return Whether the ipv6Prefix field is set. - */ - boolean hasIpv6Prefix(); - /** - *
-   * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
-   * If the field value is not a valid IPv6 prefix, an error message will be
-   * generated. The prefix must have all zeros for the masked bits of the prefix
-   * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid IPv6 prefix
-   * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
-   * }
-   * ```
-   * 
- * - * bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.predefined) = { ... } - * @return The ipv6Prefix. - */ - boolean getIpv6Prefix(); - - /** - *
-   * `host_and_port` specifies the field value must be a valid host and port
-   * pair. The host must be a valid hostname or IP address while the port
-   * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-   * with square brackets (e.g., `[::1]:1234`).
-   * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return Whether the hostAndPort field is set. - */ - boolean hasHostAndPort(); - /** - *
-   * `host_and_port` specifies the field value must be a valid host and port
-   * pair. The host must be a valid hostname or IP address while the port
-   * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
-   * with square brackets (e.g., `[::1]:1234`).
-   * 
- * - * bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... } - * @return The hostAndPort. - */ - boolean getHostAndPort(); - - /** - *
-   * `well_known_regex` specifies a common well-known pattern
-   * defined as a regex. If the field value doesn't match the well-known
-   * regex, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid HTTP header value
-   * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-   * }
-   * ```
-   *
-   * #### KnownRegex
-   *
-   * `well_known_regex` contains some well-known patterns.
-   *
-   * | Name                          | Number | Description                               |
-   * |-------------------------------|--------|-------------------------------------------|
-   * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-   * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-   * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-   * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return Whether the wellKnownRegex field is set. - */ - boolean hasWellKnownRegex(); - /** - *
-   * `well_known_regex` specifies a common well-known pattern
-   * defined as a regex. If the field value doesn't match the well-known
-   * regex, an error message will be generated.
-   *
-   * ```proto
-   * message MyString {
-   * // value must be a valid HTTP header value
-   * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
-   * }
-   * ```
-   *
-   * #### KnownRegex
-   *
-   * `well_known_regex` contains some well-known patterns.
-   *
-   * | Name                          | Number | Description                               |
-   * |-------------------------------|--------|-------------------------------------------|
-   * | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
-   * | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
-   * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
-   * 
- * - * .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.predefined) = { ... } - * @return The wellKnownRegex. - */ - build.buf.validate.KnownRegex getWellKnownRegex(); - - /** - *
-   * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-   * enable strict header validation. By default, this is true, and HTTP header
-   * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-   * validations that only disallow `\r\n\0` characters, which can be used to
-   * bypass header matching rules.
-   *
-   * ```proto
-   * message MyString {
-   * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-   * string value = 1 [(buf.validate.field).string.strict = false];
-   * }
-   * ```
-   * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return Whether the strict field is set. - */ - boolean hasStrict(); - /** - *
-   * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
-   * enable strict header validation. By default, this is true, and HTTP header
-   * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
-   * validations that only disallow `\r\n\0` characters, which can be used to
-   * bypass header matching rules.
-   *
-   * ```proto
-   * message MyString {
-   * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
-   * string value = 1 [(buf.validate.field).string.strict = false];
-   * }
-   * ```
-   * 
- * - * optional bool strict = 25 [json_name = "strict"]; - * @return The strict. - */ - boolean getStrict(); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List - getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - java.lang.String getExample(int index); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyString {
-   * string value = 1 [
-   * (buf.validate.field).string.example = 1,
-   * (buf.validate.field).string.example = 2
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the value to return. - * @return The bytes of the example at the given index. - */ - com.google.protobuf.ByteString - getExampleBytes(int index); - - build.buf.validate.StringRules.WellKnownCase getWellKnownCase(); -} diff --git a/src/main/java/build/buf/validate/TimestampRules.java b/src/main/java/build/buf/validate/TimestampRules.java deleted file mode 100644 index 22b5dc9e..00000000 --- a/src/main/java/build/buf/validate/TimestampRules.java +++ /dev/null @@ -1,3450 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
- * 
- * - * Protobuf type {@code buf.validate.TimestampRules} - */ -public final class TimestampRules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - TimestampRules> implements - // @@protoc_insertion_point(message_implements:buf.validate.TimestampRules) - TimestampRulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - TimestampRules.class.getName()); - } - // Use TimestampRules.newBuilder() to construct. - private TimestampRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private TimestampRules() { - example_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.TimestampRules.class, build.buf.validate.TimestampRules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(3), - LTE(4), - LT_NOW(7), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 3: return LT; - case 4: return LTE; - case 7: return LT_NOW; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(5), - GTE(6), - GT_NOW(8), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 5: return GT; - case 6: return GTE; - case 8: return GT_NOW; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp const_; - /** - *
-   * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must equal 2023-05-03T10:00:00Z
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must equal 2023-05-03T10:00:00Z
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getConst() { - return const_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : const_; - } - /** - *
-   * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must equal 2023-05-03T10:00:00Z
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() { - return const_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : const_; - } - - public static final int LT_FIELD_NUMBER = 3; - /** - *
-   * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be less than 'P3D' [duration.lt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 3; - } - /** - *
-   * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be less than 'P3D' [duration.lt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLt() { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-   * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be less than 'P3D' [duration.lt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int LTE_FIELD_NUMBER = 4; - /** - *
-   * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 4; - } - /** - *
-   * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLte() { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-   * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int LT_NOW_FIELD_NUMBER = 7; - /** - *
-   * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be less than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   * }
-   * ```
-   * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return Whether the ltNow field is set. - */ - @java.lang.Override - public boolean hasLtNow() { - return lessThanCase_ == 7; - } - /** - *
-   * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be less than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   * }
-   * ```
-   * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return The ltNow. - */ - @java.lang.Override - public boolean getLtNow() { - if (lessThanCase_ == 7) { - return (java.lang.Boolean) lessThan_; - } - return false; - } - - public static final int GT_FIELD_NUMBER = 5; - /** - *
-   * `gt` requires the timestamp field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gt` requires the timestamp field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getGt() { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-   * `gt` requires the timestamp field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int GTE_FIELD_NUMBER = 6; - /** - *
-   * `gte` requires the timestamp field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value
-   * must be outside the specified range. If the field value doesn't meet
-   * the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 6; - } - /** - *
-   * `gte` requires the timestamp field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value
-   * must be outside the specified range. If the field value doesn't meet
-   * the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getGte() { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-   * `gte` requires the timestamp field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value
-   * must be outside the specified range. If the field value doesn't meet
-   * the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int GT_NOW_FIELD_NUMBER = 8; - /** - *
-   * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be greater than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-   * }
-   * ```
-   * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return Whether the gtNow field is set. - */ - @java.lang.Override - public boolean hasGtNow() { - return greaterThanCase_ == 8; - } - /** - *
-   * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be greater than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-   * }
-   * ```
-   * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return The gtNow. - */ - @java.lang.Override - public boolean getGtNow() { - if (greaterThanCase_ == 8) { - return (java.lang.Boolean) greaterThan_; - } - return false; - } - - public static final int WITHIN_FIELD_NUMBER = 9; - private com.google.protobuf.Duration within_; - /** - *
-   * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be within 1 hour of now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - * @return Whether the within field is set. - */ - @java.lang.Override - public boolean hasWithin() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be within 1 hour of now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - * @return The within. - */ - @java.lang.Override - public com.google.protobuf.Duration getWithin() { - return within_ == null ? com.google.protobuf.Duration.getDefaultInstance() : within_; - } - /** - *
-   * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be within 1 hour of now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getWithinOrBuilder() { - return within_ == null ? com.google.protobuf.Duration.getDefaultInstance() : within_; - } - - public static final int EXAMPLE_FIELD_NUMBER = 10; - @SuppressWarnings("serial") - private java.util.List example_; - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List getExampleList() { - return example_; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public java.util.List - getExampleOrBuilderList() { - return example_; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public int getExampleCount() { - return example_.size(); - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExample(int index) { - return example_.get(index); - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExampleOrBuilder( - int index) { - return example_.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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getConst()); - } - if (lessThanCase_ == 3) { - output.writeMessage(3, (com.google.protobuf.Timestamp) lessThan_); - } - if (lessThanCase_ == 4) { - output.writeMessage(4, (com.google.protobuf.Timestamp) lessThan_); - } - if (greaterThanCase_ == 5) { - output.writeMessage(5, (com.google.protobuf.Timestamp) greaterThan_); - } - if (greaterThanCase_ == 6) { - output.writeMessage(6, (com.google.protobuf.Timestamp) greaterThan_); - } - if (lessThanCase_ == 7) { - output.writeBool( - 7, (boolean)((java.lang.Boolean) lessThan_)); - } - if (greaterThanCase_ == 8) { - output.writeBool( - 8, (boolean)((java.lang.Boolean) greaterThan_)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(9, getWithin()); - } - for (int i = 0; i < example_.size(); i++) { - output.writeMessage(10, example_.get(i)); - } - extensionWriter.writeUntil(536870912, output); - 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(2, getConst()); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.protobuf.Timestamp) lessThan_); - } - if (lessThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.protobuf.Timestamp) lessThan_); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.protobuf.Timestamp) greaterThan_); - } - if (greaterThanCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.protobuf.Timestamp) greaterThan_); - } - if (lessThanCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 7, (boolean)((java.lang.Boolean) lessThan_)); - } - if (greaterThanCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 8, (boolean)((java.lang.Boolean) greaterThan_)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getWithin()); - } - for (int i = 0; i < example_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, example_.get(i)); - } - size += extensionsSerializedSize(); - 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.TimestampRules)) { - return super.equals(obj); - } - build.buf.validate.TimestampRules other = (build.buf.validate.TimestampRules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (!getConst() - .equals(other.getConst())) return false; - } - if (hasWithin() != other.hasWithin()) return false; - if (hasWithin()) { - if (!getWithin() - .equals(other.getWithin())) return false; - } - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 3: - if (!getLt() - .equals(other.getLt())) return false; - break; - case 4: - if (!getLte() - .equals(other.getLte())) return false; - break; - case 7: - if (getLtNow() - != other.getLtNow()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 5: - if (!getGt() - .equals(other.getGt())) return false; - break; - case 6: - if (!getGte() - .equals(other.getGte())) return false; - break; - case 8: - if (getGtNow() - != other.getGtNow()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst().hashCode(); - } - if (hasWithin()) { - hash = (37 * hash) + WITHIN_FIELD_NUMBER; - hash = (53 * hash) + getWithin().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 3: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt().hashCode(); - break; - case 4: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte().hashCode(); - break; - case 7: - hash = (37 * hash) + LT_NOW_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getLtNow()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 5: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt().hashCode(); - break; - case 6: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte().hashCode(); - break; - case 8: - hash = (37 * hash) + GT_NOW_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getGtNow()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.TimestampRules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.TimestampRules 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.TimestampRules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.TimestampRules 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.TimestampRules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.TimestampRules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.TimestampRules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.TimestampRules 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.TimestampRules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.TimestampRules 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.TimestampRules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.TimestampRules 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.TimestampRules 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; - } - /** - *
-   * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
-   * 
- * - * Protobuf type {@code buf.validate.TimestampRules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.TimestampRules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.TimestampRules) - build.buf.validate.TimestampRulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.TimestampRules.class, build.buf.validate.TimestampRules.Builder.class); - } - - // Construct using build.buf.validate.TimestampRules.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - getConstFieldBuilder(); - getWithinFieldBuilder(); - getExampleFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = null; - if (constBuilder_ != null) { - constBuilder_.dispose(); - constBuilder_ = null; - } - if (ltBuilder_ != null) { - ltBuilder_.clear(); - } - if (lteBuilder_ != null) { - lteBuilder_.clear(); - } - if (gtBuilder_ != null) { - gtBuilder_.clear(); - } - if (gteBuilder_ != null) { - gteBuilder_.clear(); - } - within_ = null; - if (withinBuilder_ != null) { - withinBuilder_.dispose(); - withinBuilder_ = null; - } - if (exampleBuilder_ == null) { - example_ = java.util.Collections.emptyList(); - } else { - example_ = null; - exampleBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000100); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_descriptor; - } - - @java.lang.Override - public build.buf.validate.TimestampRules getDefaultInstanceForType() { - return build.buf.validate.TimestampRules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.TimestampRules build() { - build.buf.validate.TimestampRules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.TimestampRules buildPartial() { - build.buf.validate.TimestampRules result = new build.buf.validate.TimestampRules(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.TimestampRules result) { - if (exampleBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { - example_ = java.util.Collections.unmodifiableList(example_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.example_ = example_; - } else { - result.example_ = exampleBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.TimestampRules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = constBuilder_ == null - ? const_ - : constBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.within_ = withinBuilder_ == null - ? within_ - : withinBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.TimestampRules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - if (lessThanCase_ == 3 && - ltBuilder_ != null) { - result.lessThan_ = ltBuilder_.build(); - } - if (lessThanCase_ == 4 && - lteBuilder_ != null) { - result.lessThan_ = lteBuilder_.build(); - } - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - if (greaterThanCase_ == 5 && - gtBuilder_ != null) { - result.greaterThan_ = gtBuilder_.build(); - } - if (greaterThanCase_ == 6 && - gteBuilder_ != null) { - result.greaterThan_ = gteBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.TimestampRules) { - return mergeFrom((build.buf.validate.TimestampRules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.TimestampRules other) { - if (other == build.buf.validate.TimestampRules.getDefaultInstance()) return this; - if (other.hasConst()) { - mergeConst(other.getConst()); - } - if (other.hasWithin()) { - mergeWithin(other.getWithin()); - } - if (exampleBuilder_ == null) { - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - } else { - if (!other.example_.isEmpty()) { - if (exampleBuilder_.isEmpty()) { - exampleBuilder_.dispose(); - exampleBuilder_ = null; - example_ = other.example_; - bitField0_ = (bitField0_ & ~0x00000100); - exampleBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getExampleFieldBuilder() : null; - } else { - exampleBuilder_.addAllMessages(other.example_); - } - } - } - switch (other.getLessThanCase()) { - case LT: { - mergeLt(other.getLt()); - break; - } - case LTE: { - mergeLte(other.getLte()); - break; - } - case LT_NOW: { - setLtNow(other.getLtNow()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - mergeGt(other.getGt()); - break; - } - case GTE: { - mergeGte(other.getGte()); - break; - } - case GT_NOW: { - setGtNow(other.getGtNow()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 18: { - input.readMessage( - getConstFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 18 - case 26: { - input.readMessage( - getLtFieldBuilder().getBuilder(), - extensionRegistry); - lessThanCase_ = 3; - break; - } // case 26 - case 34: { - input.readMessage( - getLteFieldBuilder().getBuilder(), - extensionRegistry); - lessThanCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getGtFieldBuilder().getBuilder(), - extensionRegistry); - greaterThanCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getGteFieldBuilder().getBuilder(), - extensionRegistry); - greaterThanCase_ = 6; - break; - } // case 50 - case 56: { - lessThan_ = input.readBool(); - lessThanCase_ = 7; - break; - } // case 56 - case 64: { - greaterThan_ = input.readBool(); - greaterThanCase_ = 8; - break; - } // case 64 - case 74: { - input.readMessage( - getWithinFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 74 - case 82: { - com.google.protobuf.Timestamp m = - input.readMessage( - com.google.protobuf.Timestamp.parser(), - extensionRegistry); - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.add(m); - } else { - exampleBuilder_.addMessage(m); - } - break; - } // case 82 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp const_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> constBuilder_; - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - public com.google.protobuf.Timestamp getConst() { - if (constBuilder_ == null) { - return const_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : const_; - } else { - return constBuilder_.getMessage(); - } - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder setConst(com.google.protobuf.Timestamp value) { - if (constBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - const_ = value; - } else { - constBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder setConst( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (constBuilder_ == null) { - const_ = builderForValue.build(); - } else { - constBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder mergeConst(com.google.protobuf.Timestamp value) { - if (constBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - const_ != null && - const_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getConstBuilder().mergeFrom(value); - } else { - const_ = value; - } - } else { - constBuilder_.mergeFrom(value); - } - if (const_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = null; - if (constBuilder_ != null) { - constBuilder_.dispose(); - constBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getConstBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConstFieldBuilder().getBuilder(); - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() { - if (constBuilder_ != null) { - return constBuilder_.getMessageOrBuilder(); - } else { - return const_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : const_; - } - } - /** - *
-     * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must equal 2023-05-03T10:00:00Z
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getConstFieldBuilder() { - if (constBuilder_ == null) { - constBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getConst(), - getParentForChildren(), - isClean()); - const_ = null; - } - return constBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> ltBuilder_; - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 3; - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLt() { - if (ltBuilder_ == null) { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (lessThanCase_ == 3) { - return ltBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder setLt(com.google.protobuf.Timestamp value) { - if (ltBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lessThan_ = value; - onChanged(); - } else { - ltBuilder_.setMessage(value); - } - lessThanCase_ = 3; - return this; - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder setLt( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (ltBuilder_ == null) { - lessThan_ = builderForValue.build(); - onChanged(); - } else { - ltBuilder_.setMessage(builderForValue.build()); - } - lessThanCase_ = 3; - return this; - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder mergeLt(com.google.protobuf.Timestamp value) { - if (ltBuilder_ == null) { - if (lessThanCase_ == 3 && - lessThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - lessThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) lessThan_) - .mergeFrom(value).buildPartial(); - } else { - lessThan_ = value; - } - onChanged(); - } else { - if (lessThanCase_ == 3) { - ltBuilder_.mergeFrom(value); - } else { - ltBuilder_.setMessage(value); - } - } - lessThanCase_ = 3; - return this; - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public Builder clearLt() { - if (ltBuilder_ == null) { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - } else { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - } - ltBuilder_.clear(); - } - return this; - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getLtBuilder() { - return getLtFieldBuilder().getBuilder(); - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() { - if ((lessThanCase_ == 3) && (ltBuilder_ != null)) { - return ltBuilder_.getMessageOrBuilder(); - } else { - if (lessThanCase_ == 3) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyDuration {
-     * // duration must be less than 'P3D' [duration.lt]
-     * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLtFieldBuilder() { - if (ltBuilder_ == null) { - if (!(lessThanCase_ == 3)) { - lessThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - ltBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) lessThan_, - getParentForChildren(), - isClean()); - lessThan_ = null; - } - lessThanCase_ = 3; - onChanged(); - return ltBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lteBuilder_; - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 4; - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLte() { - if (lteBuilder_ == null) { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (lessThanCase_ == 4) { - return lteBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder setLte(com.google.protobuf.Timestamp value) { - if (lteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lessThan_ = value; - onChanged(); - } else { - lteBuilder_.setMessage(value); - } - lessThanCase_ = 4; - return this; - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder setLte( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lteBuilder_ == null) { - lessThan_ = builderForValue.build(); - onChanged(); - } else { - lteBuilder_.setMessage(builderForValue.build()); - } - lessThanCase_ = 4; - return this; - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder mergeLte(com.google.protobuf.Timestamp value) { - if (lteBuilder_ == null) { - if (lessThanCase_ == 4 && - lessThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - lessThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) lessThan_) - .mergeFrom(value).buildPartial(); - } else { - lessThan_ = value; - } - onChanged(); - } else { - if (lessThanCase_ == 4) { - lteBuilder_.mergeFrom(value); - } else { - lteBuilder_.setMessage(value); - } - } - lessThanCase_ = 4; - return this; - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public Builder clearLte() { - if (lteBuilder_ == null) { - if (lessThanCase_ == 4) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - } else { - if (lessThanCase_ == 4) { - lessThanCase_ = 0; - lessThan_ = null; - } - lteBuilder_.clear(); - } - return this; - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getLteBuilder() { - return getLteFieldBuilder().getBuilder(); - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() { - if ((lessThanCase_ == 4) && (lteBuilder_ != null)) { - return lteBuilder_.getMessageOrBuilder(); - } else { - if (lessThanCase_ == 4) { - return (com.google.protobuf.Timestamp) lessThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLteFieldBuilder() { - if (lteBuilder_ == null) { - if (!(lessThanCase_ == 4)) { - lessThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - lteBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) lessThan_, - getParentForChildren(), - isClean()); - lessThan_ = null; - } - lessThanCase_ = 4; - onChanged(); - return lteBuilder_; - } - - /** - *
-     * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be less than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     * }
-     * ```
-     * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return Whether the ltNow field is set. - */ - public boolean hasLtNow() { - return lessThanCase_ == 7; - } - /** - *
-     * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be less than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     * }
-     * ```
-     * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return The ltNow. - */ - public boolean getLtNow() { - if (lessThanCase_ == 7) { - return (java.lang.Boolean) lessThan_; - } - return false; - } - /** - *
-     * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be less than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     * }
-     * ```
-     * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @param value The ltNow to set. - * @return This builder for chaining. - */ - public Builder setLtNow(boolean value) { - - lessThanCase_ = 7; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be less than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     * }
-     * ```
-     * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLtNow() { - if (lessThanCase_ == 7) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> gtBuilder_; - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getGt() { - if (gtBuilder_ == null) { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (greaterThanCase_ == 5) { - return gtBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder setGt(com.google.protobuf.Timestamp value) { - if (gtBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - greaterThan_ = value; - onChanged(); - } else { - gtBuilder_.setMessage(value); - } - greaterThanCase_ = 5; - return this; - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder setGt( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (gtBuilder_ == null) { - greaterThan_ = builderForValue.build(); - onChanged(); - } else { - gtBuilder_.setMessage(builderForValue.build()); - } - greaterThanCase_ = 5; - return this; - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder mergeGt(com.google.protobuf.Timestamp value) { - if (gtBuilder_ == null) { - if (greaterThanCase_ == 5 && - greaterThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - greaterThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) greaterThan_) - .mergeFrom(value).buildPartial(); - } else { - greaterThan_ = value; - } - onChanged(); - } else { - if (greaterThanCase_ == 5) { - gtBuilder_.mergeFrom(value); - } else { - gtBuilder_.setMessage(value); - } - } - greaterThanCase_ = 5; - return this; - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public Builder clearGt() { - if (gtBuilder_ == null) { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - } else { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - } - gtBuilder_.clear(); - } - return this; - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getGtBuilder() { - return getGtFieldBuilder().getBuilder(); - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() { - if ((greaterThanCase_ == 5) && (gtBuilder_ != null)) { - return gtBuilder_.getMessageOrBuilder(); - } else { - if (greaterThanCase_ == 5) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * `gt` requires the timestamp field value to be greater than the specified
-     * value (exclusive). If the value of `gt` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getGtFieldBuilder() { - if (gtBuilder_ == null) { - if (!(greaterThanCase_ == 5)) { - greaterThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - gtBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) greaterThan_, - getParentForChildren(), - isClean()); - greaterThan_ = null; - } - greaterThanCase_ = 5; - onChanged(); - return gtBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> gteBuilder_; - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 6; - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getGte() { - if (gteBuilder_ == null) { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (greaterThanCase_ == 6) { - return gteBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder setGte(com.google.protobuf.Timestamp value) { - if (gteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - greaterThan_ = value; - onChanged(); - } else { - gteBuilder_.setMessage(value); - } - greaterThanCase_ = 6; - return this; - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder setGte( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (gteBuilder_ == null) { - greaterThan_ = builderForValue.build(); - onChanged(); - } else { - gteBuilder_.setMessage(builderForValue.build()); - } - greaterThanCase_ = 6; - return this; - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder mergeGte(com.google.protobuf.Timestamp value) { - if (gteBuilder_ == null) { - if (greaterThanCase_ == 6 && - greaterThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - greaterThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) greaterThan_) - .mergeFrom(value).buildPartial(); - } else { - greaterThan_ = value; - } - onChanged(); - } else { - if (greaterThanCase_ == 6) { - gteBuilder_.mergeFrom(value); - } else { - gteBuilder_.setMessage(value); - } - } - greaterThanCase_ = 6; - return this; - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public Builder clearGte() { - if (gteBuilder_ == null) { - if (greaterThanCase_ == 6) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - } else { - if (greaterThanCase_ == 6) { - greaterThanCase_ = 0; - greaterThan_ = null; - } - gteBuilder_.clear(); - } - return this; - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getGteBuilder() { - return getGteFieldBuilder().getBuilder(); - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() { - if ((greaterThanCase_ == 6) && (gteBuilder_ != null)) { - return gteBuilder_.getMessageOrBuilder(); - } else { - if (greaterThanCase_ == 6) { - return (com.google.protobuf.Timestamp) greaterThan_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * `gte` requires the timestamp field value to be greater than or equal to the
-     * specified value (exclusive). If the value of `gte` is larger than a
-     * specified `lt` or `lte`, the range is reversed, and the field value
-     * must be outside the specified range. If the field value doesn't meet
-     * the required conditions, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-     * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-     * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-     *
-     * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-     * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-     * }
-     * ```
-     * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getGteFieldBuilder() { - if (gteBuilder_ == null) { - if (!(greaterThanCase_ == 6)) { - greaterThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - gteBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) greaterThan_, - getParentForChildren(), - isClean()); - greaterThan_ = null; - } - greaterThanCase_ = 6; - onChanged(); - return gteBuilder_; - } - - /** - *
-     * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be greater than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-     * }
-     * ```
-     * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return Whether the gtNow field is set. - */ - public boolean hasGtNow() { - return greaterThanCase_ == 8; - } - /** - *
-     * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be greater than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-     * }
-     * ```
-     * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return The gtNow. - */ - public boolean getGtNow() { - if (greaterThanCase_ == 8) { - return (java.lang.Boolean) greaterThan_; - } - return false; - } - /** - *
-     * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be greater than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-     * }
-     * ```
-     * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @param value The gtNow to set. - * @return This builder for chaining. - */ - public Builder setGtNow(boolean value) { - - greaterThanCase_ = 8; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be greater than now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-     * }
-     * ```
-     * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGtNow() { - if (greaterThanCase_ == 8) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Duration within_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> withinBuilder_; - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - * @return Whether the within field is set. - */ - public boolean hasWithin() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - * @return The within. - */ - public com.google.protobuf.Duration getWithin() { - if (withinBuilder_ == null) { - return within_ == null ? com.google.protobuf.Duration.getDefaultInstance() : within_; - } else { - return withinBuilder_.getMessage(); - } - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - public Builder setWithin(com.google.protobuf.Duration value) { - if (withinBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - within_ = value; - } else { - withinBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - public Builder setWithin( - com.google.protobuf.Duration.Builder builderForValue) { - if (withinBuilder_ == null) { - within_ = builderForValue.build(); - } else { - withinBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - public Builder mergeWithin(com.google.protobuf.Duration value) { - if (withinBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) && - within_ != null && - within_ != com.google.protobuf.Duration.getDefaultInstance()) { - getWithinBuilder().mergeFrom(value); - } else { - within_ = value; - } - } else { - withinBuilder_.mergeFrom(value); - } - if (within_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - public Builder clearWithin() { - bitField0_ = (bitField0_ & ~0x00000080); - within_ = null; - if (withinBuilder_ != null) { - withinBuilder_.dispose(); - withinBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Duration.Builder getWithinBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getWithinFieldBuilder().getBuilder(); - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.DurationOrBuilder getWithinOrBuilder() { - if (withinBuilder_ != null) { - return withinBuilder_.getMessageOrBuilder(); - } else { - return within_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : within_; - } - } - /** - *
-     * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-     *
-     * ```proto
-     * message MyTimestamp {
-     * // value must be within 1 hour of now
-     * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-     * }
-     * ```
-     * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getWithinFieldBuilder() { - if (withinBuilder_ == null) { - withinBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getWithin(), - getParentForChildren(), - isClean()); - within_ = null; - } - return withinBuilder_; - } - - private java.util.List example_ = - java.util.Collections.emptyList(); - private void ensureExampleIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - example_ = new java.util.ArrayList(example_); - bitField0_ |= 0x00000100; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> exampleBuilder_; - - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public java.util.List getExampleList() { - if (exampleBuilder_ == null) { - return java.util.Collections.unmodifiableList(example_); - } else { - return exampleBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public int getExampleCount() { - if (exampleBuilder_ == null) { - return example_.size(); - } else { - return exampleBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp getExample(int index) { - if (exampleBuilder_ == null) { - return example_.get(index); - } else { - return exampleBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder setExample( - int index, com.google.protobuf.Timestamp value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExampleIsMutable(); - example_.set(index, value); - onChanged(); - } else { - exampleBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder setExample( - int index, com.google.protobuf.Timestamp.Builder builderForValue) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.set(index, builderForValue.build()); - onChanged(); - } else { - exampleBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample(com.google.protobuf.Timestamp value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExampleIsMutable(); - example_.add(value); - onChanged(); - } else { - exampleBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample( - int index, com.google.protobuf.Timestamp value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExampleIsMutable(); - example_.add(index, value); - onChanged(); - } else { - exampleBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.add(builderForValue.build()); - onChanged(); - } else { - exampleBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addExample( - int index, com.google.protobuf.Timestamp.Builder builderForValue) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.add(index, builderForValue.build()); - onChanged(); - } else { - exampleBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder addAllExample( - java.lang.Iterable values) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - onChanged(); - } else { - exampleBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder clearExample() { - if (exampleBuilder_ == null) { - example_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - } else { - exampleBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public Builder removeExample(int index) { - if (exampleBuilder_ == null) { - ensureExampleIsMutable(); - example_.remove(index); - onChanged(); - } else { - exampleBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder getExampleBuilder( - int index) { - return getExampleFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.TimestampOrBuilder getExampleOrBuilder( - int index) { - if (exampleBuilder_ == null) { - return example_.get(index); } else { - return exampleBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getExampleOrBuilderList() { - if (exampleBuilder_ != null) { - return exampleBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(example_); - } - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder addExampleBuilder() { - return getExampleFieldBuilder().addBuilder( - com.google.protobuf.Timestamp.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public com.google.protobuf.Timestamp.Builder addExampleBuilder( - int index) { - return getExampleFieldBuilder().addBuilder( - index, com.google.protobuf.Timestamp.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - public java.util.List - getExampleBuilderList() { - return getExampleFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExampleFieldBuilder() { - if (exampleBuilder_ == null) { - exampleBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - example_, - ((bitField0_ & 0x00000100) != 0), - getParentForChildren(), - isClean()); - example_ = null; - } - return exampleBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.TimestampRules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.TimestampRules) - private static final build.buf.validate.TimestampRules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.TimestampRules(); - } - - public static build.buf.validate.TimestampRules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampRules 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.TimestampRules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java b/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java deleted file mode 100644 index b823a191..00000000 --- a/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java +++ /dev/null @@ -1,454 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface TimestampRulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.TimestampRules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must equal 2023-05-03T10:00:00Z
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must equal 2023-05-03T10:00:00Z
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - com.google.protobuf.Timestamp getConst(); - /** - *
-   * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must equal 2023-05-03T10:00:00Z
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getConstOrBuilder(); - - /** - *
-   * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be less than 'P3D' [duration.lt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be less than 'P3D' [duration.lt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - com.google.protobuf.Timestamp getLt(); - /** - *
-   * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyDuration {
-   * // duration must be less than 'P3D' [duration.lt]
-   * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getLtOrBuilder(); - - /** - *
-   * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - com.google.protobuf.Timestamp getLte(); - /** - *
-   * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getLteOrBuilder(); - - /** - *
-   * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be less than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   * }
-   * ```
-   * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return Whether the ltNow field is set. - */ - boolean hasLtNow(); - /** - *
-   * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be less than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   * }
-   * ```
-   * 
- * - * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.predefined) = { ... } - * @return The ltNow. - */ - boolean getLtNow(); - - /** - *
-   * `gt` requires the timestamp field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the timestamp field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - com.google.protobuf.Timestamp getGt(); - /** - *
-   * `gt` requires the timestamp field value to be greater than the specified
-   * value (exclusive). If the value of `gt` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getGtOrBuilder(); - - /** - *
-   * `gte` requires the timestamp field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value
-   * must be outside the specified range. If the field value doesn't meet
-   * the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the timestamp field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value
-   * must be outside the specified range. If the field value doesn't meet
-   * the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - com.google.protobuf.Timestamp getGte(); - /** - *
-   * `gte` requires the timestamp field value to be greater than or equal to the
-   * specified value (exclusive). If the value of `gte` is larger than a
-   * specified `lt` or `lte`, the range is reversed, and the field value
-   * must be outside the specified range. If the field value doesn't meet
-   * the required conditions, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
-   * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
-   * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
-   *
-   * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
-   * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
-   * }
-   * ```
-   * 
- * - * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getGteOrBuilder(); - - /** - *
-   * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be greater than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-   * }
-   * ```
-   * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return Whether the gtNow field is set. - */ - boolean hasGtNow(); - /** - *
-   * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be greater than now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
-   * }
-   * ```
-   * 
- * - * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.predefined) = { ... } - * @return The gtNow. - */ - boolean getGtNow(); - - /** - *
-   * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be within 1 hour of now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - * @return Whether the within field is set. - */ - boolean hasWithin(); - /** - *
-   * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be within 1 hour of now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - * @return The within. - */ - com.google.protobuf.Duration getWithin(); - /** - *
-   * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
-   *
-   * ```proto
-   * message MyTimestamp {
-   * // value must be within 1 hour of now
-   * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
-   * }
-   * ```
-   * 
- * - * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.DurationOrBuilder getWithinOrBuilder(); - - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - java.util.List - getExampleList(); - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.Timestamp getExample(int index); - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - int getExampleCount(); - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - java.util.List - getExampleOrBuilderList(); - /** - * repeated .google.protobuf.Timestamp example = 10 [json_name = "example", (.buf.validate.predefined) = { ... } - */ - com.google.protobuf.TimestampOrBuilder getExampleOrBuilder( - int index); - - build.buf.validate.TimestampRules.LessThanCase getLessThanCase(); - - build.buf.validate.TimestampRules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/UInt32Rules.java b/src/main/java/build/buf/validate/UInt32Rules.java deleted file mode 100644 index d5881f98..00000000 --- a/src/main/java/build/buf/validate/UInt32Rules.java +++ /dev/null @@ -1,2376 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * UInt32Rules describes the constraints applied to `uint32` values. These
- * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.UInt32Rules} - */ -public final class UInt32Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - UInt32Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.UInt32Rules) - UInt32RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt32Rules.class.getName()); - } - // Use UInt32Rules.newBuilder() to construct. - private UInt32Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private UInt32Rules() { - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.UInt32Rules.class, build.buf.validate.UInt32Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private int const_ = 0; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must equal 42
-   * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must equal 42
-   * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than or equal to 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than or equal to 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than 5 [uint32.gt]
-   * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than 5 [uint32.gt]
-   * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than or equal to 5 [uint32.gte]
-   * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than or equal to 5 [uint32.gte]
-   * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList in_ = - emptyIntList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList notIn_ = - emptyIntList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList example_ = - emptyIntList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * uint32 value = 1 [
-   * (buf.validate.field).uint32.example = 1,
-   * (buf.validate.field).uint32.example = 10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * uint32 value = 1 [
-   * (buf.validate.field).uint32.example = 1,
-   * (buf.validate.field).uint32.example = 10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * uint32 value = 1 [
-   * (buf.validate.field).uint32.example = 1,
-   * (buf.validate.field).uint32.example = 10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, const_); - } - if (lessThanCase_ == 2) { - output.writeUInt32( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeUInt32( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeUInt32( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeUInt32( - 5, (int)((java.lang.Integer) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeUInt32(6, in_.getInt(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeUInt32(7, notIn_.getInt(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeUInt32(8, example_.getInt(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeUInt32Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size( - 2, (int)((java.lang.Integer) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size( - 3, (int)((java.lang.Integer) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size( - 4, (int)((java.lang.Integer) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size( - 5, (int)((java.lang.Integer) greaterThan_)); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(in_.getInt(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(notIn_.getInt(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(example_.getInt(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.UInt32Rules)) { - return super.equals(obj); - } - build.buf.validate.UInt32Rules other = (build.buf.validate.UInt32Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + getConst(); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.UInt32Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.UInt32Rules 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.UInt32Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.UInt32Rules 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.UInt32Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.UInt32Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.UInt32Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.UInt32Rules 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.UInt32Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.UInt32Rules 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.UInt32Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.UInt32Rules 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.UInt32Rules 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; - } - /** - *
-   * UInt32Rules describes the constraints applied to `uint32` values. These
-   * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.UInt32Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.UInt32Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.UInt32Rules) - build.buf.validate.UInt32RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt32Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt32Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.UInt32Rules.class, build.buf.validate.UInt32Rules.Builder.class); - } - - // Construct using build.buf.validate.UInt32Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0; - in_ = emptyIntList(); - notIn_ = emptyIntList(); - example_ = emptyIntList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt32Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.UInt32Rules getDefaultInstanceForType() { - return build.buf.validate.UInt32Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.UInt32Rules build() { - build.buf.validate.UInt32Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.UInt32Rules buildPartial() { - build.buf.validate.UInt32Rules result = new build.buf.validate.UInt32Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.UInt32Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.UInt32Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.UInt32Rules) { - return mergeFrom((build.buf.validate.UInt32Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.UInt32Rules other) { - if (other == build.buf.validate.UInt32Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - lessThan_ = input.readUInt32(); - lessThanCase_ = 2; - break; - } // case 16 - case 24: { - lessThan_ = input.readUInt32(); - lessThanCase_ = 3; - break; - } // case 24 - case 32: { - greaterThan_ = input.readUInt32(); - greaterThanCase_ = 4; - break; - } // case 32 - case 40: { - greaterThan_ = input.readUInt32(); - greaterThanCase_ = 5; - break; - } // case 40 - case 48: { - int v = input.readUInt32(); - ensureInIsMutable(); - in_.addInt(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - int v = input.readUInt32(); - ensureNotInIsMutable(); - notIn_.addInt(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - int v = input.readUInt32(); - ensureExampleIsMutable(); - example_.addInt(v); - break; - } // case 64 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private int const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must equal 42
-     * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must equal 42
-     * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public int getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must equal 42
-     * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(int value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must equal 42
-     * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public int getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(int value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than or equal to 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than or equal to 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public int getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Integer) lessThan_; - } - return 0; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than or equal to 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(int value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be less than or equal to 10
-     * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than 5 [uint32.gt]
-     * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than 5 [uint32.gt]
-     * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public int getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than 5 [uint32.gt]
-     * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(int value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than 5 [uint32.gt]
-     * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than or equal to 5 [uint32.gte]
-     * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than or equal to 5 [uint32.gte]
-     * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public int getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Integer) greaterThan_; - } - return 0; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than or equal to 5 [uint32.gte]
-     * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(int value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be greater than or equal to 5 [uint32.gte]
-     * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-     * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-     * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.IntList in_ = emptyIntList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public int getIn(int index) { - return in_.getInt(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, int value) { - - ensureInIsMutable(); - in_.setInt(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(int value) { - - ensureInIsMutable(); - in_.addInt(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList notIn_ = emptyIntList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public int getNotIn(int index) { - return notIn_.getInt(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, int value) { - - ensureNotInIsMutable(); - notIn_.setInt(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(int value) { - - ensureNotInIsMutable(); - notIn_.addInt(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList example_ = emptyIntList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public int getExample(int index) { - return example_.getInt(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, int value) { - - ensureExampleIsMutable(); - example_.setInt(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(int value) { - - ensureExampleIsMutable(); - example_.addInt(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt32 {
-     * uint32 value = 1 [
-     * (buf.validate.field).uint32.example = 1,
-     * (buf.validate.field).uint32.example = 10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.UInt32Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.UInt32Rules) - private static final build.buf.validate.UInt32Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.UInt32Rules(); - } - - public static build.buf.validate.UInt32Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt32Rules 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.UInt32Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java b/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java deleted file mode 100644 index a47043b9..00000000 --- a/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface UInt32RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.UInt32Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must equal 42
-   * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must equal 42
-   * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint32 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - int getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - int getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than or equal to 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be less than or equal to 10
-   * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint32 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - int getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than 5 [uint32.gt]
-   * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than 5 [uint32.gt]
-   * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint32.gt_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - int getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than or equal to 5 [uint32.gte]
-   * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be greater than or equal to 5 [uint32.gte]
-   * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
-   * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
-   * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint32 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - int getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - int getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint32 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - int getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * uint32 value = 1 [
-   * (buf.validate.field).uint32.example = 1,
-   * (buf.validate.field).uint32.example = 10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * uint32 value = 1 [
-   * (buf.validate.field).uint32.example = 1,
-   * (buf.validate.field).uint32.example = 10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt32 {
-   * uint32 value = 1 [
-   * (buf.validate.field).uint32.example = 1,
-   * (buf.validate.field).uint32.example = 10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint32 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - int getExample(int index); - - build.buf.validate.UInt32Rules.LessThanCase getLessThanCase(); - - build.buf.validate.UInt32Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/UInt64Rules.java b/src/main/java/build/buf/validate/UInt64Rules.java deleted file mode 100644 index 1ae57ea6..00000000 --- a/src/main/java/build/buf/validate/UInt64Rules.java +++ /dev/null @@ -1,2381 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * UInt64Rules describes the constraints applied to `uint64` values. These
- * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
- * 
- * - * Protobuf type {@code buf.validate.UInt64Rules} - */ -public final class UInt64Rules extends - com.google.protobuf.GeneratedMessage.ExtendableMessage< - UInt64Rules> implements - // @@protoc_insertion_point(message_implements:buf.validate.UInt64Rules) - UInt64RulesOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - UInt64Rules.class.getName()); - } - // Use UInt64Rules.newBuilder() to construct. - private UInt64Rules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { - super(builder); - } - private UInt64Rules() { - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.UInt64Rules.class, build.buf.validate.UInt64Rules.Builder.class); - } - - private int bitField0_; - private int lessThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object lessThan_; - public enum LessThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LT(2), - LTE(3), - LESSTHAN_NOT_SET(0); - private final int value; - private LessThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LessThanCase valueOf(int value) { - return forNumber(value); - } - - public static LessThanCase forNumber(int value) { - switch (value) { - case 2: return LT; - case 3: return LTE; - case 0: return LESSTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - private int greaterThanCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object greaterThan_; - public enum GreaterThanCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GT(4), - GTE(5), - GREATERTHAN_NOT_SET(0); - private final int value; - private GreaterThanCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GreaterThanCase valueOf(int value) { - return forNumber(value); - } - - public static GreaterThanCase forNumber(int value) { - switch (value) { - case 4: return GT; - case 5: return GTE; - case 0: return GREATERTHAN_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public static final int CONST_FIELD_NUMBER = 1; - private long const_ = 0L; - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must equal 42
-   * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must equal 42
-   * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - - public static final int LT_FIELD_NUMBER = 2; - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - @java.lang.Override - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - @java.lang.Override - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int LTE_FIELD_NUMBER = 3; - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than or equal to 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - @java.lang.Override - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than or equal to 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - @java.lang.Override - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - - public static final int GT_FIELD_NUMBER = 4; - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than 5 [uint64.gt]
-   * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - @java.lang.Override - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than 5 [uint64.gt]
-   * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - @java.lang.Override - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int GTE_FIELD_NUMBER = 5; - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than or equal to 5 [uint64.gte]
-   * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - @java.lang.Override - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than or equal to 5 [uint64.gte]
-   * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - @java.lang.Override - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - - public static final int IN_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList in_ = - emptyLongList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - @java.lang.Override - public java.util.List - getInList() { - return in_; - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - - public static final int NOT_IN_FIELD_NUMBER = 7; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList notIn_ = - emptyLongList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - @java.lang.Override - public java.util.List - getNotInList() { - return notIn_; - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - - public static final int EXAMPLE_FIELD_NUMBER = 8; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList example_ = - emptyLongList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * uint64 value = 1 [
-   * (buf.validate.field).uint64.example = 1,
-   * (buf.validate.field).uint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - @java.lang.Override - public java.util.List - getExampleList() { - return example_; - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * uint64 value = 1 [
-   * (buf.validate.field).uint64.example = 1,
-   * (buf.validate.field).uint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * uint64 value = 1 [
-   * (buf.validate.field).uint64.example = 1,
-   * (buf.validate.field).uint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(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; - - if (!extensionsAreInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessage - .ExtendableMessage.ExtensionSerializer - extensionWriter = newExtensionSerializer(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt64(1, const_); - } - if (lessThanCase_ == 2) { - output.writeUInt64( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - output.writeUInt64( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - output.writeUInt64( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - output.writeUInt64( - 5, (long)((java.lang.Long) greaterThan_)); - } - for (int i = 0; i < in_.size(); i++) { - output.writeUInt64(6, in_.getLong(i)); - } - for (int i = 0; i < notIn_.size(); i++) { - output.writeUInt64(7, notIn_.getLong(i)); - } - for (int i = 0; i < example_.size(); i++) { - output.writeUInt64(8, example_.getLong(i)); - } - extensionWriter.writeUntil(536870912, output); - 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 - .computeUInt64Size(1, const_); - } - if (lessThanCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size( - 2, (long)((java.lang.Long) lessThan_)); - } - if (lessThanCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size( - 3, (long)((java.lang.Long) lessThan_)); - } - if (greaterThanCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size( - 4, (long)((java.lang.Long) greaterThan_)); - } - if (greaterThanCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size( - 5, (long)((java.lang.Long) greaterThan_)); - } - { - int dataSize = 0; - for (int i = 0; i < in_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt64SizeNoTag(in_.getLong(i)); - } - size += dataSize; - size += 1 * getInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < notIn_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt64SizeNoTag(notIn_.getLong(i)); - } - size += dataSize; - size += 1 * getNotInList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < example_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt64SizeNoTag(example_.getLong(i)); - } - size += dataSize; - size += 1 * getExampleList().size(); - } - size += extensionsSerializedSize(); - 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.UInt64Rules)) { - return super.equals(obj); - } - build.buf.validate.UInt64Rules other = (build.buf.validate.UInt64Rules) obj; - - if (hasConst() != other.hasConst()) return false; - if (hasConst()) { - if (getConst() - != other.getConst()) return false; - } - if (!getInList() - .equals(other.getInList())) return false; - if (!getNotInList() - .equals(other.getNotInList())) return false; - if (!getExampleList() - .equals(other.getExampleList())) return false; - if (!getLessThanCase().equals(other.getLessThanCase())) return false; - switch (lessThanCase_) { - case 2: - if (getLt() - != other.getLt()) return false; - break; - case 3: - if (getLte() - != other.getLte()) return false; - break; - case 0: - default: - } - if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; - switch (greaterThanCase_) { - case 4: - if (getGt() - != other.getGt()) return false; - break; - case 5: - if (getGte() - != other.getGte()) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConst()) { - hash = (37 * hash) + CONST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConst()); - } - if (getInCount() > 0) { - hash = (37 * hash) + IN_FIELD_NUMBER; - hash = (53 * hash) + getInList().hashCode(); - } - if (getNotInCount() > 0) { - hash = (37 * hash) + NOT_IN_FIELD_NUMBER; - hash = (53 * hash) + getNotInList().hashCode(); - } - if (getExampleCount() > 0) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExampleList().hashCode(); - } - switch (lessThanCase_) { - case 2: - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - break; - case 3: - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - break; - case 0: - default: - } - switch (greaterThanCase_) { - case 4: - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - break; - case 5: - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - break; - case 0: - default: - } - hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.UInt64Rules parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.UInt64Rules 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.UInt64Rules parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.UInt64Rules 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.UInt64Rules parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.UInt64Rules parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.UInt64Rules parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.UInt64Rules 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.UInt64Rules parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.UInt64Rules 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.UInt64Rules parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.UInt64Rules 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.UInt64Rules 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; - } - /** - *
-   * UInt64Rules describes the constraints applied to `uint64` values. These
-   * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
-   * 
- * - * Protobuf type {@code buf.validate.UInt64Rules} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.ExtendableBuilder< - build.buf.validate.UInt64Rules, Builder> implements - // @@protoc_insertion_point(builder_implements:buf.validate.UInt64Rules) - build.buf.validate.UInt64RulesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt64Rules_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt64Rules_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.UInt64Rules.class, build.buf.validate.UInt64Rules.Builder.class); - } - - // Construct using build.buf.validate.UInt64Rules.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - const_ = 0L; - in_ = emptyLongList(); - notIn_ = emptyLongList(); - example_ = emptyLongList(); - lessThanCase_ = 0; - lessThan_ = null; - greaterThanCase_ = 0; - greaterThan_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_UInt64Rules_descriptor; - } - - @java.lang.Override - public build.buf.validate.UInt64Rules getDefaultInstanceForType() { - return build.buf.validate.UInt64Rules.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.UInt64Rules build() { - build.buf.validate.UInt64Rules result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.UInt64Rules buildPartial() { - build.buf.validate.UInt64Rules result = new build.buf.validate.UInt64Rules(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.UInt64Rules result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.const_ = const_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - in_.makeImmutable(); - result.in_ = in_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - notIn_.makeImmutable(); - result.notIn_ = notIn_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - example_.makeImmutable(); - result.example_ = example_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(build.buf.validate.UInt64Rules result) { - result.lessThanCase_ = lessThanCase_; - result.lessThan_ = this.lessThan_; - result.greaterThanCase_ = greaterThanCase_; - result.greaterThan_ = this.greaterThan_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.UInt64Rules) { - return mergeFrom((build.buf.validate.UInt64Rules)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.UInt64Rules other) { - if (other == build.buf.validate.UInt64Rules.getDefaultInstance()) return this; - if (other.hasConst()) { - setConst(other.getConst()); - } - if (!other.in_.isEmpty()) { - if (in_.isEmpty()) { - in_ = other.in_; - in_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureInIsMutable(); - in_.addAll(other.in_); - } - onChanged(); - } - if (!other.notIn_.isEmpty()) { - if (notIn_.isEmpty()) { - notIn_ = other.notIn_; - notIn_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureNotInIsMutable(); - notIn_.addAll(other.notIn_); - } - onChanged(); - } - if (!other.example_.isEmpty()) { - if (example_.isEmpty()) { - example_ = other.example_; - example_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureExampleIsMutable(); - example_.addAll(other.example_); - } - onChanged(); - } - switch (other.getLessThanCase()) { - case LT: { - setLt(other.getLt()); - break; - } - case LTE: { - setLte(other.getLte()); - break; - } - case LESSTHAN_NOT_SET: { - break; - } - } - switch (other.getGreaterThanCase()) { - case GT: { - setGt(other.getGt()); - break; - } - case GTE: { - setGte(other.getGte()); - break; - } - case GREATERTHAN_NOT_SET: { - break; - } - } - this.mergeExtensionFields(other); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!extensionsAreInitialized()) { - return false; - } - 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 8: { - const_ = input.readUInt64(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: { - lessThan_ = input.readUInt64(); - lessThanCase_ = 2; - break; - } // case 16 - case 24: { - lessThan_ = input.readUInt64(); - lessThanCase_ = 3; - break; - } // case 24 - case 32: { - greaterThan_ = input.readUInt64(); - greaterThanCase_ = 4; - break; - } // case 32 - case 40: { - greaterThan_ = input.readUInt64(); - greaterThanCase_ = 5; - break; - } // case 40 - case 48: { - long v = input.readUInt64(); - ensureInIsMutable(); - in_.addLong(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - in_.addLong(input.readUInt64()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - long v = input.readUInt64(); - ensureNotInIsMutable(); - notIn_.addLong(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureNotInIsMutable(); - while (input.getBytesUntilLimit() > 0) { - notIn_.addLong(input.readUInt64()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - long v = input.readUInt64(); - ensureExampleIsMutable(); - example_.addLong(v); - break; - } // case 64 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureExampleIsMutable(); - while (input.getBytesUntilLimit() > 0) { - example_.addLong(input.readUInt64()); - } - input.popLimit(limit); - break; - } // case 66 - 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 lessThanCase_ = 0; - private java.lang.Object lessThan_; - public LessThanCase - getLessThanCase() { - return LessThanCase.forNumber( - lessThanCase_); - } - - public Builder clearLessThan() { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - return this; - } - - private int greaterThanCase_ = 0; - private java.lang.Object greaterThan_; - public GreaterThanCase - getGreaterThanCase() { - return GreaterThanCase.forNumber( - greaterThanCase_); - } - - public Builder clearGreaterThan() { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private long const_ ; - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must equal 42
-     * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - @java.lang.Override - public boolean hasConst() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must equal 42
-     * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - @java.lang.Override - public long getConst() { - return const_; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must equal 42
-     * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @param value The const to set. - * @return This builder for chaining. - */ - public Builder setConst(long value) { - - const_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `const` requires the field value to exactly match the specified value. If
-     * the field value doesn't match, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must equal 42
-     * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-     * }
-     * ```
-     * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearConst() { - bitField0_ = (bitField0_ & ~0x00000001); - const_ = 0L; - onChanged(); - return this; - } - - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - public boolean hasLt() { - return lessThanCase_ == 2; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - public long getLt() { - if (lessThanCase_ == 2) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @param value The lt to set. - * @return This builder for chaining. - */ - public Builder setLt(long value) { - - lessThanCase_ = 2; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lt` requires the field value to be less than the specified value (field <
-     * value). If the field value is equal to or greater than the specified value,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLt() { - if (lessThanCase_ == 2) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than or equal to 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - public boolean hasLte() { - return lessThanCase_ == 3; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than or equal to 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - public long getLte() { - if (lessThanCase_ == 3) { - return (java.lang.Long) lessThan_; - } - return 0L; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than or equal to 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @param value The lte to set. - * @return This builder for chaining. - */ - public Builder setLte(long value) { - - lessThanCase_ = 3; - lessThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `lte` requires the field value to be less than or equal to the specified
-     * value (field <= value). If the field value is greater than the specified
-     * value, an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be less than or equal to 10
-     * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-     * }
-     * ```
-     * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearLte() { - if (lessThanCase_ == 3) { - lessThanCase_ = 0; - lessThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than 5 [uint64.gt]
-     * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - public boolean hasGt() { - return greaterThanCase_ == 4; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than 5 [uint64.gt]
-     * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - public long getGt() { - if (greaterThanCase_ == 4) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than 5 [uint64.gt]
-     * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @param value The gt to set. - * @return This builder for chaining. - */ - public Builder setGt(long value) { - - greaterThanCase_ = 4; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gt` requires the field value to be greater than the specified value
-     * (exclusive). If the value of `gt` is larger than a specified `lt` or
-     * `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than 5 [uint64.gt]
-     * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-     *
-     * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-     *
-     * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGt() { - if (greaterThanCase_ == 4) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than or equal to 5 [uint64.gte]
-     * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - public boolean hasGte() { - return greaterThanCase_ == 5; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than or equal to 5 [uint64.gte]
-     * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - public long getGte() { - if (greaterThanCase_ == 5) { - return (java.lang.Long) greaterThan_; - } - return 0L; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than or equal to 5 [uint64.gte]
-     * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @param value The gte to set. - * @return This builder for chaining. - */ - public Builder setGte(long value) { - - greaterThanCase_ = 5; - greaterThan_ = value; - onChanged(); - return this; - } - /** - *
-     * `gte` requires the field value to be greater than or equal to the specified
-     * value (exclusive). If the value of `gte` is larger than a specified `lt`
-     * or `lte`, the range is reversed, and the field value must be outside the
-     * specified range. If the field value doesn't meet the required conditions,
-     * an error message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be greater than or equal to 5 [uint64.gte]
-     * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-     *
-     * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-     * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-     *
-     * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-     * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-     * }
-     * ```
-     * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearGte() { - if (greaterThanCase_ == 5) { - greaterThanCase_ = 0; - greaterThan_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.Internal.LongList in_ = emptyLongList(); - private void ensureInIsMutable() { - if (!in_.isModifiable()) { - in_ = makeMutableCopy(in_); - } - bitField0_ |= 0x00000020; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - public java.util.List - getInList() { - in_.makeImmutable(); - return in_; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - public int getInCount() { - return in_.size(); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - public long getIn(int index) { - return in_.getLong(index); - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The in to set. - * @return This builder for chaining. - */ - public Builder setIn( - int index, long value) { - - ensureInIsMutable(); - in_.setLong(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param value The in to add. - * @return This builder for chaining. - */ - public Builder addIn(long value) { - - ensureInIsMutable(); - in_.addLong(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param values The in to add. - * @return This builder for chaining. - */ - public Builder addAllIn( - java.lang.Iterable values) { - ensureInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, in_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - *
-     * `in` requires the field value to be equal to one of the specified values.
-     * If the field value isn't one of the specified values, an error message is
-     * generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearIn() { - in_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList notIn_ = emptyLongList(); - private void ensureNotInIsMutable() { - if (!notIn_.isModifiable()) { - notIn_ = makeMutableCopy(notIn_); - } - bitField0_ |= 0x00000040; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - public java.util.List - getNotInList() { - notIn_.makeImmutable(); - return notIn_; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - public int getNotInCount() { - return notIn_.size(); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - public long getNotIn(int index) { - return notIn_.getLong(index); - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The notIn to set. - * @return This builder for chaining. - */ - public Builder setNotIn( - int index, long value) { - - ensureNotInIsMutable(); - notIn_.setLong(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param value The notIn to add. - * @return This builder for chaining. - */ - public Builder addNotIn(long value) { - - ensureNotInIsMutable(); - notIn_.addLong(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param values The notIn to add. - * @return This builder for chaining. - */ - public Builder addAllNotIn( - java.lang.Iterable values) { - ensureNotInIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, notIn_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - *
-     * `not_in` requires the field value to not be equal to any of the specified
-     * values. If the field value is one of the specified values, an error
-     * message is generated.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * // value must not be in list [1, 2, 3]
-     * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-     * }
-     * ```
-     * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearNotIn() { - notIn_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList example_ = emptyLongList(); - private void ensureExampleIsMutable() { - if (!example_.isModifiable()) { - example_ = makeMutableCopy(example_); - } - bitField0_ |= 0x00000080; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - public java.util.List - getExampleList() { - example_.makeImmutable(); - return example_; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - public int getExampleCount() { - return example_.size(); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - public long getExample(int index) { - return example_.getLong(index); - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index to set the value at. - * @param value The example to set. - * @return This builder for chaining. - */ - public Builder setExample( - int index, long value) { - - ensureExampleIsMutable(); - example_.setLong(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param value The example to add. - * @return This builder for chaining. - */ - public Builder addExample(long value) { - - ensureExampleIsMutable(); - example_.addLong(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param values The example to add. - * @return This builder for chaining. - */ - public Builder addAllExample( - java.lang.Iterable values) { - ensureExampleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, example_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - *
-     * `example` specifies values that the field may have. These values SHOULD
-     * conform to other constraints. `example` values will not impact validation
-     * but may be used as helpful guidance on how to populate the given field.
-     *
-     * ```proto
-     * message MyUInt64 {
-     * uint64 value = 1 [
-     * (buf.validate.field).uint64.example = 1,
-     * (buf.validate.field).uint64.example = -10
-     * ];
-     * }
-     * ```
-     * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return This builder for chaining. - */ - public Builder clearExample() { - example_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.UInt64Rules) - } - - // @@protoc_insertion_point(class_scope:buf.validate.UInt64Rules) - private static final build.buf.validate.UInt64Rules DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.UInt64Rules(); - } - - public static build.buf.validate.UInt64Rules getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UInt64Rules 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.UInt64Rules getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java b/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java deleted file mode 100644 index a6eb708b..00000000 --- a/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java +++ /dev/null @@ -1,405 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface UInt64RulesOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.UInt64Rules) - com.google.protobuf.GeneratedMessage. - ExtendableMessageOrBuilder { - - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must equal 42
-   * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return Whether the const field is set. - */ - boolean hasConst(); - /** - *
-   * `const` requires the field value to exactly match the specified value. If
-   * the field value doesn't match, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must equal 42
-   * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
-   * }
-   * ```
-   * 
- * - * optional uint64 const = 1 [json_name = "const", (.buf.validate.predefined) = { ... } - * @return The const. - */ - long getConst(); - - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return Whether the lt field is set. - */ - boolean hasLt(); - /** - *
-   * `lt` requires the field value to be less than the specified value (field <
-   * value). If the field value is equal to or greater than the specified value,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lt = 2 [json_name = "lt", (.buf.validate.predefined) = { ... } - * @return The lt. - */ - long getLt(); - - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than or equal to 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return Whether the lte field is set. - */ - boolean hasLte(); - /** - *
-   * `lte` requires the field value to be less than or equal to the specified
-   * value (field <= value). If the field value is greater than the specified
-   * value, an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be less than or equal to 10
-   * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
-   * }
-   * ```
-   * 
- * - * uint64 lte = 3 [json_name = "lte", (.buf.validate.predefined) = { ... } - * @return The lte. - */ - long getLte(); - - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than 5 [uint64.gt]
-   * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return Whether the gt field is set. - */ - boolean hasGt(); - /** - *
-   * `gt` requires the field value to be greater than the specified value
-   * (exclusive). If the value of `gt` is larger than a specified `lt` or
-   * `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than 5 [uint64.gt]
-   * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
-   *
-   * // value must be greater than 5 and less than 10 [uint64.gt_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
-   *
-   * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gt = 4 [json_name = "gt", (.buf.validate.predefined) = { ... } - * @return The gt. - */ - long getGt(); - - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than or equal to 5 [uint64.gte]
-   * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return Whether the gte field is set. - */ - boolean hasGte(); - /** - *
-   * `gte` requires the field value to be greater than or equal to the specified
-   * value (exclusive). If the value of `gte` is larger than a specified `lt`
-   * or `lte`, the range is reversed, and the field value must be outside the
-   * specified range. If the field value doesn't meet the required conditions,
-   * an error message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be greater than or equal to 5 [uint64.gte]
-   * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
-   *
-   * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
-   * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
-   *
-   * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
-   * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
-   * }
-   * ```
-   * 
- * - * uint64 gte = 5 [json_name = "gte", (.buf.validate.predefined) = { ... } - * @return The gte. - */ - long getGte(); - - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return A list containing the in. - */ - java.util.List getInList(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @return The count of in. - */ - int getInCount(); - /** - *
-   * `in` requires the field value to be equal to one of the specified values.
-   * If the field value isn't one of the specified values, an error message is
-   * generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 in = 6 [json_name = "in", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The in at the given index. - */ - long getIn(int index); - - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return A list containing the notIn. - */ - java.util.List getNotInList(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @return The count of notIn. - */ - int getNotInCount(); - /** - *
-   * `not_in` requires the field value to not be equal to any of the specified
-   * values. If the field value is one of the specified values, an error
-   * message is generated.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * // value must not be in list [1, 2, 3]
-   * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
-   * }
-   * ```
-   * 
- * - * repeated uint64 not_in = 7 [json_name = "notIn", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The notIn at the given index. - */ - long getNotIn(int index); - - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * uint64 value = 1 [
-   * (buf.validate.field).uint64.example = 1,
-   * (buf.validate.field).uint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return A list containing the example. - */ - java.util.List getExampleList(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * uint64 value = 1 [
-   * (buf.validate.field).uint64.example = 1,
-   * (buf.validate.field).uint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @return The count of example. - */ - int getExampleCount(); - /** - *
-   * `example` specifies values that the field may have. These values SHOULD
-   * conform to other constraints. `example` values will not impact validation
-   * but may be used as helpful guidance on how to populate the given field.
-   *
-   * ```proto
-   * message MyUInt64 {
-   * uint64 value = 1 [
-   * (buf.validate.field).uint64.example = 1,
-   * (buf.validate.field).uint64.example = -10
-   * ];
-   * }
-   * ```
-   * 
- * - * repeated uint64 example = 8 [json_name = "example", (.buf.validate.predefined) = { ... } - * @param index The index of the element to return. - * @return The example at the given index. - */ - long getExample(int index); - - build.buf.validate.UInt64Rules.LessThanCase getLessThanCase(); - - build.buf.validate.UInt64Rules.GreaterThanCase getGreaterThanCase(); -} diff --git a/src/main/java/build/buf/validate/ValidateProto.java b/src/main/java/build/buf/validate/ValidateProto.java deleted file mode 100644 index 4230433c..00000000 --- a/src/main/java/build/buf/validate/ValidateProto.java +++ /dev/null @@ -1,1790 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public final class ValidateProto { - private ValidateProto() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - ValidateProto.class.getName()); - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - registry.add(build.buf.validate.ValidateProto.message); - registry.add(build.buf.validate.ValidateProto.oneof); - registry.add(build.buf.validate.ValidateProto.field); - registry.add(build.buf.validate.ValidateProto.predefined); - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public static final int MESSAGE_FIELD_NUMBER = 1159; - /** - *
-   * Rules specify the validations to be performed on this message. By default,
-   * no validation is performed against a message.
-   * 
- * - * extend .google.protobuf.MessageOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, - build.buf.validate.MessageConstraints> message = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - build.buf.validate.MessageConstraints.class, - build.buf.validate.MessageConstraints.getDefaultInstance()); - public static final int ONEOF_FIELD_NUMBER = 1159; - /** - *
-   * Rules specify the validations to be performed on this oneof. By default,
-   * no validation is performed against a oneof.
-   * 
- * - * extend .google.protobuf.OneofOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.OneofOptions, - build.buf.validate.OneofConstraints> oneof = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - build.buf.validate.OneofConstraints.class, - build.buf.validate.OneofConstraints.getDefaultInstance()); - public static final int FIELD_FIELD_NUMBER = 1159; - /** - *
-   * Rules specify the validations to be performed on this field. By default,
-   * no validation is performed against a field.
-   * 
- * - * extend .google.protobuf.FieldOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, - build.buf.validate.FieldConstraints> field = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - build.buf.validate.FieldConstraints.class, - build.buf.validate.FieldConstraints.getDefaultInstance()); - public static final int PREDEFINED_FIELD_NUMBER = 1160; - /** - *
-   * Specifies predefined rules. When extending a standard constraint message,
-   * this adds additional CEL expressions that apply when the extension is used.
-   *
-   * ```proto
-   * extend buf.validate.Int32Rules {
-   * bool is_zero [(buf.validate.predefined).cel = {
-   * id: "int32.is_zero",
-   * message: "value must be zero",
-   * expression: "!rule || this == 0",
-   * }];
-   * }
-   *
-   * message Foo {
-   * int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true];
-   * }
-   * ```
-   * 
- * - * extend .google.protobuf.FieldOptions { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, - build.buf.validate.PredefinedConstraints> predefined = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - build.buf.validate.PredefinedConstraints.class, - build.buf.validate.PredefinedConstraints.getDefaultInstance()); - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Constraint_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Constraint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_MessageConstraints_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_MessageConstraints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_OneofConstraints_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_OneofConstraints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_FieldConstraints_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_FieldConstraints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_PredefinedConstraints_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_PredefinedConstraints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_FloatRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_FloatRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_DoubleRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_DoubleRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Int32Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Int32Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Int64Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Int64Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_UInt32Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_UInt32Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_UInt64Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_UInt64Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_SInt32Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_SInt32Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_SInt64Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_SInt64Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Fixed32Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Fixed32Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Fixed64Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Fixed64Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_SFixed32Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_SFixed32Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_SFixed64Rules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_SFixed64Rules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_BoolRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_BoolRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_StringRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_StringRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_BytesRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_BytesRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_EnumRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_EnumRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_RepeatedRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_RepeatedRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_MapRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_MapRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_AnyRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_AnyRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_DurationRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_DurationRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_TimestampRules_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_TimestampRules_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Violations_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Violations_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_buf_validate_Violation_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_buf_validate_Violation_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033buf/validate/validate.proto\022\014buf.valid" + - "ate\032 google/protobuf/descriptor.proto\032\036g" + - "oogle/protobuf/duration.proto\032\037google/pr" + - "otobuf/timestamp.proto\"V\n\nConstraint\022\016\n\002" + - "id\030\001 \001(\tR\002id\022\030\n\007message\030\002 \001(\tR\007message\022\036" + - "\n\nexpression\030\003 \001(\tR\nexpression\"\\\n\022Messag" + - "eConstraints\022\032\n\010disabled\030\001 \001(\010R\010disabled" + - "\022*\n\003cel\030\003 \003(\0132\030.buf.validate.ConstraintR" + - "\003cel\".\n\020OneofConstraints\022\032\n\010required\030\001 \001" + - "(\010R\010required\"\253\n\n\020FieldConstraints\022*\n\003cel" + - "\030\027 \003(\0132\030.buf.validate.ConstraintR\003cel\022\032\n" + - "\010required\030\031 \001(\010R\010required\022,\n\006ignore\030\033 \001(" + - "\0162\024.buf.validate.IgnoreR\006ignore\0220\n\005float" + - "\030\001 \001(\0132\030.buf.validate.FloatRulesH\000R\005floa" + - "t\0223\n\006double\030\002 \001(\0132\031.buf.validate.DoubleR" + - "ulesH\000R\006double\0220\n\005int32\030\003 \001(\0132\030.buf.vali" + - "date.Int32RulesH\000R\005int32\0220\n\005int64\030\004 \001(\0132" + - "\030.buf.validate.Int64RulesH\000R\005int64\0223\n\006ui" + - "nt32\030\005 \001(\0132\031.buf.validate.UInt32RulesH\000R" + - "\006uint32\0223\n\006uint64\030\006 \001(\0132\031.buf.validate.U" + - "Int64RulesH\000R\006uint64\0223\n\006sint32\030\007 \001(\0132\031.b" + - "uf.validate.SInt32RulesH\000R\006sint32\0223\n\006sin" + - "t64\030\010 \001(\0132\031.buf.validate.SInt64RulesH\000R\006" + - "sint64\0226\n\007fixed32\030\t \001(\0132\032.buf.validate.F" + - "ixed32RulesH\000R\007fixed32\0226\n\007fixed64\030\n \001(\0132" + - "\032.buf.validate.Fixed64RulesH\000R\007fixed64\0229" + - "\n\010sfixed32\030\013 \001(\0132\033.buf.validate.SFixed32" + - "RulesH\000R\010sfixed32\0229\n\010sfixed64\030\014 \001(\0132\033.bu" + - "f.validate.SFixed64RulesH\000R\010sfixed64\022-\n\004" + - "bool\030\r \001(\0132\027.buf.validate.BoolRulesH\000R\004b" + - "ool\0223\n\006string\030\016 \001(\0132\031.buf.validate.Strin" + - "gRulesH\000R\006string\0220\n\005bytes\030\017 \001(\0132\030.buf.va" + - "lidate.BytesRulesH\000R\005bytes\022-\n\004enum\030\020 \001(\013" + - "2\027.buf.validate.EnumRulesH\000R\004enum\0229\n\010rep" + - "eated\030\022 \001(\0132\033.buf.validate.RepeatedRules" + - "H\000R\010repeated\022*\n\003map\030\023 \001(\0132\026.buf.validate" + - ".MapRulesH\000R\003map\022*\n\003any\030\024 \001(\0132\026.buf.vali" + - "date.AnyRulesH\000R\003any\0229\n\010duration\030\025 \001(\0132\033" + - ".buf.validate.DurationRulesH\000R\010duration\022" + - "<\n\ttimestamp\030\026 \001(\0132\034.buf.validate.Timest" + - "ampRulesH\000R\ttimestamp\022\034\n\007skipped\030\030 \001(\010B\002" + - "\030\001R\007skipped\022%\n\014ignore_empty\030\032 \001(\010B\002\030\001R\013i" + - "gnoreEmptyB\006\n\004type\"C\n\025PredefinedConstrai" + - "nts\022*\n\003cel\030\001 \003(\0132\030.buf.validate.Constrai" + - "ntR\003cel\"\352\027\n\nFloatRules\022p\n\005const\030\001 \001(\002BZ\302" + - "HW\nU\n\013float.const\032Fthis != rules.const ?" + - " \'value must equal %s\'.format([rules.con" + - "st]) : \'\'R\005const\022\243\001\n\002lt\030\002 \001(\002B\220\001\302H\214\001\n\211\001\n" + - "\010float.lt\032}!has(rules.gte) && !has(rules" + - ".gt) && (this.isNan() || this >= rules.l" + - "t)? \'value must be less than %s\'.format(" + - "[rules.lt]) : \'\'H\000R\002lt\022\264\001\n\003lte\030\003 \001(\002B\237\001\302" + - "H\233\001\n\230\001\n\tfloat.lte\032\212\001!has(rules.gte) && !" + - "has(rules.gt) && (this.isNan() || this >" + - " rules.lte)? \'value must be less than or" + - " equal to %s\'.format([rules.lte]) : \'\'H\000" + - "R\003lte\022\363\007\n\002gt\030\004 \001(\002B\340\007\302H\334\007\n\215\001\n\010float.gt\032\200" + - "\001!has(rules.lt) && !has(rules.lte) && (t" + - "his.isNan() || this <= rules.gt)? \'value" + - " must be greater than %s\'.format([rules." + - "gt]) : \'\'\n\303\001\n\013float.gt_lt\032\263\001has(rules.lt" + - ") && rules.lt >= rules.gt && (this.isNan" + - "() || this >= rules.lt || this <= rules." + - "gt)? \'value must be greater than %s and " + - "less than %s\'.format([rules.gt, rules.lt" + - "]) : \'\'\n\315\001\n\025float.gt_lt_exclusive\032\263\001has(" + - "rules.lt) && rules.lt < rules.gt && (thi" + - "s.isNan() || (rules.lt <= this && this <" + - "= rules.gt))? \'value must be greater tha" + - "n %s or less than %s\'.format([rules.gt, " + - "rules.lt]) : \'\'\n\323\001\n\014float.gt_lte\032\302\001has(r" + - "ules.lte) && rules.lte >= rules.gt && (t" + - "his.isNan() || this > rules.lte || this " + - "<= rules.gt)? \'value must be greater tha" + - "n %s and less than or equal to %s\'.forma" + - "t([rules.gt, rules.lte]) : \'\'\n\335\001\n\026float." + - "gt_lte_exclusive\032\302\001has(rules.lte) && rul" + - "es.lte < rules.gt && (this.isNan() || (r" + - "ules.lte < this && this <= rules.gt))? \'" + - "value must be greater than %s or less th" + - "an or equal to %s\'.format([rules.gt, rul" + - "es.lte]) : \'\'H\001R\002gt\022\277\010\n\003gte\030\005 \001(\002B\252\010\302H\246\010" + - "\n\233\001\n\tfloat.gte\032\215\001!has(rules.lt) && !has(" + - "rules.lte) && (this.isNan() || this < ru" + - "les.gte)? \'value must be greater than or" + - " equal to %s\'.format([rules.gte]) : \'\'\n\322" + - "\001\n\014float.gte_lt\032\301\001has(rules.lt) && rules" + - ".lt >= rules.gte && (this.isNan() || thi" + - "s >= rules.lt || this < rules.gte)? \'val" + - "ue must be greater than or equal to %s a" + - "nd less than %s\'.format([rules.gte, rule" + - "s.lt]) : \'\'\n\334\001\n\026float.gte_lt_exclusive\032\301" + - "\001has(rules.lt) && rules.lt < rules.gte &" + - "& (this.isNan() || (rules.lt <= this && " + - "this < rules.gte))? \'value must be great" + - "er than or equal to %s or less than %s\'." + - "format([rules.gte, rules.lt]) : \'\'\n\342\001\n\rf" + - "loat.gte_lte\032\320\001has(rules.lte) && rules.l" + - "te >= rules.gte && (this.isNan() || this" + - " > rules.lte || this < rules.gte)? \'valu" + - "e must be greater than or equal to %s an" + - "d less than or equal to %s\'.format([rule" + - "s.gte, rules.lte]) : \'\'\n\354\001\n\027float.gte_lt" + - "e_exclusive\032\320\001has(rules.lte) && rules.lt" + - "e < rules.gte && (this.isNan() || (rules" + - ".lte < this && this < rules.gte))? \'valu" + - "e must be greater than or equal to %s or" + - " less than or equal to %s\'.format([rules" + - ".gte, rules.lte]) : \'\'H\001R\003gte\022y\n\002in\030\006 \003(" + - "\002Bi\302Hf\nd\n\010float.in\032X!(this in dyn(rules)" + - "[\'in\']) ? \'value must be in list %s\'.for" + - "mat([dyn(rules)[\'in\']]) : \'\'R\002in\022}\n\006not_" + - "in\030\007 \003(\002Bf\302Hc\na\n\014float.not_in\032Qthis in r" + - "ules.not_in ? \'value must not be in list" + - " %s\'.format([rules.not_in]) : \'\'R\005notIn\022" + - "}\n\006finite\030\010 \001(\010Be\302Hb\n`\n\014float.finite\032Pru" + - "les.finite ? (this.isNan() || this.isInf" + - "() ? \'value must be finite\' : \'\') : \'\'R\006" + - "finite\0224\n\007example\030\t \003(\002B\032\302H\027\n\025\n\rfloat.ex" + - "ample\032\004trueR\007example*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_" + - "thanB\016\n\014greater_than\"\374\027\n\013DoubleRules\022q\n\005" + - "const\030\001 \001(\001B[\302HX\nV\n\014double.const\032Fthis !" + - "= rules.const ? \'value must equal %s\'.fo" + - "rmat([rules.const]) : \'\'R\005const\022\244\001\n\002lt\030\002" + - " \001(\001B\221\001\302H\215\001\n\212\001\n\tdouble.lt\032}!has(rules.gt" + - "e) && !has(rules.gt) && (this.isNan() ||" + - " this >= rules.lt)? \'value must be less " + - "than %s\'.format([rules.lt]) : \'\'H\000R\002lt\022\265" + - "\001\n\003lte\030\003 \001(\001B\240\001\302H\234\001\n\231\001\n\ndouble.lte\032\212\001!ha" + - "s(rules.gte) && !has(rules.gt) && (this." + - "isNan() || this > rules.lte)? \'value mus" + - "t be less than or equal to %s\'.format([r" + - "ules.lte]) : \'\'H\000R\003lte\022\370\007\n\002gt\030\004 \001(\001B\345\007\302H" + - "\341\007\n\216\001\n\tdouble.gt\032\200\001!has(rules.lt) && !ha" + - "s(rules.lte) && (this.isNan() || this <=" + - " rules.gt)? \'value must be greater than " + - "%s\'.format([rules.gt]) : \'\'\n\304\001\n\014double.g" + - "t_lt\032\263\001has(rules.lt) && rules.lt >= rule" + - "s.gt && (this.isNan() || this >= rules.l" + - "t || this <= rules.gt)? \'value must be g" + - "reater than %s and less than %s\'.format(" + - "[rules.gt, rules.lt]) : \'\'\n\316\001\n\026double.gt" + - "_lt_exclusive\032\263\001has(rules.lt) && rules.l" + - "t < rules.gt && (this.isNan() || (rules." + - "lt <= this && this <= rules.gt))? \'value" + - " must be greater than %s or less than %s" + - "\'.format([rules.gt, rules.lt]) : \'\'\n\324\001\n\r" + - "double.gt_lte\032\302\001has(rules.lte) && rules." + - "lte >= rules.gt && (this.isNan() || this" + - " > rules.lte || this <= rules.gt)? \'valu" + - "e must be greater than %s and less than " + - "or equal to %s\'.format([rules.gt, rules." + - "lte]) : \'\'\n\336\001\n\027double.gt_lte_exclusive\032\302" + - "\001has(rules.lte) && rules.lte < rules.gt " + - "&& (this.isNan() || (rules.lte < this &&" + - " this <= rules.gt))? \'value must be grea" + - "ter than %s or less than or equal to %s\'" + - ".format([rules.gt, rules.lte]) : \'\'H\001R\002g" + - "t\022\304\010\n\003gte\030\005 \001(\001B\257\010\302H\253\010\n\234\001\n\ndouble.gte\032\215\001" + - "!has(rules.lt) && !has(rules.lte) && (th" + - "is.isNan() || this < rules.gte)? \'value " + - "must be greater than or equal to %s\'.for" + - "mat([rules.gte]) : \'\'\n\323\001\n\rdouble.gte_lt\032" + - "\301\001has(rules.lt) && rules.lt >= rules.gte" + - " && (this.isNan() || this >= rules.lt ||" + - " this < rules.gte)? \'value must be great" + - "er than or equal to %s and less than %s\'" + - ".format([rules.gte, rules.lt]) : \'\'\n\335\001\n\027" + - "double.gte_lt_exclusive\032\301\001has(rules.lt) " + - "&& rules.lt < rules.gte && (this.isNan()" + - " || (rules.lt <= this && this < rules.gt" + - "e))? \'value must be greater than or equa" + - "l to %s or less than %s\'.format([rules.g" + - "te, rules.lt]) : \'\'\n\343\001\n\016double.gte_lte\032\320" + - "\001has(rules.lte) && rules.lte >= rules.gt" + - "e && (this.isNan() || this > rules.lte |" + - "| this < rules.gte)? \'value must be grea" + - "ter than or equal to %s and less than or" + - " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'\n\355\001\n\030double.gte_lte_exclusive\032\320" + - "\001has(rules.lte) && rules.lte < rules.gte" + - " && (this.isNan() || (rules.lte < this &" + - "& this < rules.gte))? \'value must be gre" + - "ater than or equal to %s or less than or" + - " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'H\001R\003gte\022z\n\002in\030\006 \003(\001Bj\302Hg\ne\n\tdou" + - "ble.in\032X!(this in dyn(rules)[\'in\']) ? \'v" + - "alue must be in list %s\'.format([dyn(rul" + - "es)[\'in\']]) : \'\'R\002in\022~\n\006not_in\030\007 \003(\001Bg\302H" + - "d\nb\n\rdouble.not_in\032Qthis in rules.not_in" + - " ? \'value must not be in list %s\'.format" + - "([rules.not_in]) : \'\'R\005notIn\022~\n\006finite\030\010" + - " \001(\010Bf\302Hc\na\n\rdouble.finite\032Prules.finite" + - " ? (this.isNan() || this.isInf() ? \'valu" + - "e must be finite\' : \'\') : \'\'R\006finite\0225\n\007" + - "example\030\t \003(\001B\033\302H\030\n\026\n\016double.example\032\004tr" + - "ueR\007example*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014g" + - "reater_than\"\224\025\n\nInt32Rules\022p\n\005const\030\001 \001(" + - "\005BZ\302HW\nU\n\013int32.const\032Fthis != rules.con" + - "st ? \'value must equal %s\'.format([rules" + - ".const]) : \'\'R\005const\022\216\001\n\002lt\030\002 \001(\005B|\302Hy\nw" + - "\n\010int32.lt\032k!has(rules.gte) && !has(rule" + - "s.gt) && this >= rules.lt? \'value must b" + - "e less than %s\'.format([rules.lt]) : \'\'H" + - "\000R\002lt\022\241\001\n\003lte\030\003 \001(\005B\214\001\302H\210\001\n\205\001\n\tint32.lte" + - "\032x!has(rules.gte) && !has(rules.gt) && t" + - "his > rules.lte? \'value must be less tha" + - "n or equal to %s\'.format([rules.lte]) : " + - "\'\'H\000R\003lte\022\233\007\n\002gt\030\004 \001(\005B\210\007\302H\204\007\nz\n\010int32.g" + - "t\032n!has(rules.lt) && !has(rules.lte) && " + - "this <= rules.gt? \'value must be greater" + - " than %s\'.format([rules.gt]) : \'\'\n\263\001\n\013in" + - "t32.gt_lt\032\243\001has(rules.lt) && rules.lt >=" + - " rules.gt && (this >= rules.lt || this <" + - "= rules.gt)? \'value must be greater than" + - " %s and less than %s\'.format([rules.gt, " + - "rules.lt]) : \'\'\n\273\001\n\025int32.gt_lt_exclusiv" + - "e\032\241\001has(rules.lt) && rules.lt < rules.gt" + - " && (rules.lt <= this && this <= rules.g" + - "t)? \'value must be greater than %s or le" + - "ss than %s\'.format([rules.gt, rules.lt])" + - " : \'\'\n\303\001\n\014int32.gt_lte\032\262\001has(rules.lte) " + - "&& rules.lte >= rules.gt && (this > rule" + - "s.lte || this <= rules.gt)? \'value must " + - "be greater than %s and less than or equa" + - "l to %s\'.format([rules.gt, rules.lte]) :" + - " \'\'\n\313\001\n\026int32.gt_lte_exclusive\032\260\001has(rul" + - "es.lte) && rules.lte < rules.gt && (rule" + - "s.lte < this && this <= rules.gt)? \'valu" + - "e must be greater than %s or less than o" + - "r equal to %s\'.format([rules.gt, rules.l" + - "te]) : \'\'H\001R\002gt\022\350\007\n\003gte\030\005 \001(\005B\323\007\302H\317\007\n\210\001\n" + - "\tint32.gte\032{!has(rules.lt) && !has(rules" + - ".lte) && this < rules.gte? \'value must b" + - "e greater than or equal to %s\'.format([r" + - "ules.gte]) : \'\'\n\302\001\n\014int32.gte_lt\032\261\001has(r" + - "ules.lt) && rules.lt >= rules.gte && (th" + - "is >= rules.lt || this < rules.gte)? \'va" + - "lue must be greater than or equal to %s " + - "and less than %s\'.format([rules.gte, rul" + - "es.lt]) : \'\'\n\312\001\n\026int32.gte_lt_exclusive\032" + - "\257\001has(rules.lt) && rules.lt < rules.gte " + - "&& (rules.lt <= this && this < rules.gte" + - ")? \'value must be greater than or equal " + - "to %s or less than %s\'.format([rules.gte" + - ", rules.lt]) : \'\'\n\322\001\n\rint32.gte_lte\032\300\001ha" + - "s(rules.lte) && rules.lte >= rules.gte &" + - "& (this > rules.lte || this < rules.gte)" + - "? \'value must be greater than or equal t" + - "o %s and less than or equal to %s\'.forma" + - "t([rules.gte, rules.lte]) : \'\'\n\332\001\n\027int32" + - ".gte_lte_exclusive\032\276\001has(rules.lte) && r" + - "ules.lte < rules.gte && (rules.lte < thi" + - "s && this < rules.gte)? \'value must be g" + - "reater than or equal to %s or less than " + - "or equal to %s\'.format([rules.gte, rules" + - ".lte]) : \'\'H\001R\003gte\022y\n\002in\030\006 \003(\005Bi\302Hf\nd\n\010i" + - "nt32.in\032X!(this in dyn(rules)[\'in\']) ? \'" + - "value must be in list %s\'.format([dyn(ru" + - "les)[\'in\']]) : \'\'R\002in\022}\n\006not_in\030\007 \003(\005Bf\302" + - "Hc\na\n\014int32.not_in\032Qthis in rules.not_in" + - " ? \'value must not be in list %s\'.format" + - "([rules.not_in]) : \'\'R\005notIn\0224\n\007example\030" + - "\010 \003(\005B\032\302H\027\n\025\n\rint32.example\032\004trueR\007examp" + - "le*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_th" + - "an\"\224\025\n\nInt64Rules\022p\n\005const\030\001 \001(\003BZ\302HW\nU\n" + - "\013int64.const\032Fthis != rules.const ? \'val" + - "ue must equal %s\'.format([rules.const]) " + - ": \'\'R\005const\022\216\001\n\002lt\030\002 \001(\003B|\302Hy\nw\n\010int64.l" + - "t\032k!has(rules.gte) && !has(rules.gt) && " + - "this >= rules.lt? \'value must be less th" + - "an %s\'.format([rules.lt]) : \'\'H\000R\002lt\022\241\001\n" + - "\003lte\030\003 \001(\003B\214\001\302H\210\001\n\205\001\n\tint64.lte\032x!has(ru" + - "les.gte) && !has(rules.gt) && this > rul" + - "es.lte? \'value must be less than or equa" + - "l to %s\'.format([rules.lte]) : \'\'H\000R\003lte" + - "\022\233\007\n\002gt\030\004 \001(\003B\210\007\302H\204\007\nz\n\010int64.gt\032n!has(r" + - "ules.lt) && !has(rules.lte) && this <= r" + - "ules.gt? \'value must be greater than %s\'" + - ".format([rules.gt]) : \'\'\n\263\001\n\013int64.gt_lt" + - "\032\243\001has(rules.lt) && rules.lt >= rules.gt" + - " && (this >= rules.lt || this <= rules.g" + - "t)? \'value must be greater than %s and l" + - "ess than %s\'.format([rules.gt, rules.lt]" + - ") : \'\'\n\273\001\n\025int64.gt_lt_exclusive\032\241\001has(r" + - "ules.lt) && rules.lt < rules.gt && (rule" + - "s.lt <= this && this <= rules.gt)? \'valu" + - "e must be greater than %s or less than %" + - "s\'.format([rules.gt, rules.lt]) : \'\'\n\303\001\n" + - "\014int64.gt_lte\032\262\001has(rules.lte) && rules." + - "lte >= rules.gt && (this > rules.lte || " + - "this <= rules.gt)? \'value must be greate" + - "r than %s and less than or equal to %s\'." + - "format([rules.gt, rules.lte]) : \'\'\n\313\001\n\026i" + - "nt64.gt_lte_exclusive\032\260\001has(rules.lte) &" + - "& rules.lte < rules.gt && (rules.lte < t" + - "his && this <= rules.gt)? \'value must be" + - " greater than %s or less than or equal t" + - "o %s\'.format([rules.gt, rules.lte]) : \'\'" + - "H\001R\002gt\022\350\007\n\003gte\030\005 \001(\003B\323\007\302H\317\007\n\210\001\n\tint64.gt" + - "e\032{!has(rules.lt) && !has(rules.lte) && " + - "this < rules.gte? \'value must be greater" + - " than or equal to %s\'.format([rules.gte]" + - ") : \'\'\n\302\001\n\014int64.gte_lt\032\261\001has(rules.lt) " + - "&& rules.lt >= rules.gte && (this >= rul" + - "es.lt || this < rules.gte)? \'value must " + - "be greater than or equal to %s and less " + - "than %s\'.format([rules.gte, rules.lt]) :" + - " \'\'\n\312\001\n\026int64.gte_lt_exclusive\032\257\001has(rul" + - "es.lt) && rules.lt < rules.gte && (rules" + - ".lt <= this && this < rules.gte)? \'value" + - " must be greater than or equal to %s or " + - "less than %s\'.format([rules.gte, rules.l" + - "t]) : \'\'\n\322\001\n\rint64.gte_lte\032\300\001has(rules.l" + - "te) && rules.lte >= rules.gte && (this >" + - " rules.lte || this < rules.gte)? \'value " + - "must be greater than or equal to %s and " + - "less than or equal to %s\'.format([rules." + - "gte, rules.lte]) : \'\'\n\332\001\n\027int64.gte_lte_" + - "exclusive\032\276\001has(rules.lte) && rules.lte " + - "< rules.gte && (rules.lte < this && this" + - " < rules.gte)? \'value must be greater th" + - "an or equal to %s or less than or equal " + - "to %s\'.format([rules.gte, rules.lte]) : " + - "\'\'H\001R\003gte\022y\n\002in\030\006 \003(\003Bi\302Hf\nd\n\010int64.in\032X" + - "!(this in dyn(rules)[\'in\']) ? \'value mus" + - "t be in list %s\'.format([dyn(rules)[\'in\'" + - "]]) : \'\'R\002in\022}\n\006not_in\030\007 \003(\003Bf\302Hc\na\n\014int" + - "64.not_in\032Qthis in rules.not_in ? \'value" + - " must not be in list %s\'.format([rules.n" + - "ot_in]) : \'\'R\005notIn\0224\n\007example\030\t \003(\003B\032\302H" + - "\027\n\025\n\rint64.example\032\004trueR\007example*\t\010\350\007\020\200" + - "\200\200\200\002B\013\n\tless_thanB\016\n\014greater_than\"\245\025\n\013UI" + - "nt32Rules\022q\n\005const\030\001 \001(\rB[\302HX\nV\n\014uint32." + - "const\032Fthis != rules.const ? \'value must" + - " equal %s\'.format([rules.const]) : \'\'R\005c" + - "onst\022\217\001\n\002lt\030\002 \001(\rB}\302Hz\nx\n\tuint32.lt\032k!ha" + - "s(rules.gte) && !has(rules.gt) && this >" + - "= rules.lt? \'value must be less than %s\'" + - ".format([rules.lt]) : \'\'H\000R\002lt\022\242\001\n\003lte\030\003" + - " \001(\rB\215\001\302H\211\001\n\206\001\n\nuint32.lte\032x!has(rules.g" + - "te) && !has(rules.gt) && this > rules.lt" + - "e? \'value must be less than or equal to " + - "%s\'.format([rules.lte]) : \'\'H\000R\003lte\022\240\007\n\002" + - "gt\030\004 \001(\rB\215\007\302H\211\007\n{\n\tuint32.gt\032n!has(rules" + - ".lt) && !has(rules.lte) && this <= rules" + - ".gt? \'value must be greater than %s\'.for" + - "mat([rules.gt]) : \'\'\n\264\001\n\014uint32.gt_lt\032\243\001" + - "has(rules.lt) && rules.lt >= rules.gt &&" + - " (this >= rules.lt || this <= rules.gt)?" + - " \'value must be greater than %s and less" + - " than %s\'.format([rules.gt, rules.lt]) :" + - " \'\'\n\274\001\n\026uint32.gt_lt_exclusive\032\241\001has(rul" + - "es.lt) && rules.lt < rules.gt && (rules." + - "lt <= this && this <= rules.gt)? \'value " + - "must be greater than %s or less than %s\'" + - ".format([rules.gt, rules.lt]) : \'\'\n\304\001\n\ru" + - "int32.gt_lte\032\262\001has(rules.lte) && rules.l" + - "te >= rules.gt && (this > rules.lte || t" + - "his <= rules.gt)? \'value must be greater" + - " than %s and less than or equal to %s\'.f" + - "ormat([rules.gt, rules.lte]) : \'\'\n\314\001\n\027ui" + - "nt32.gt_lte_exclusive\032\260\001has(rules.lte) &" + - "& rules.lte < rules.gt && (rules.lte < t" + - "his && this <= rules.gt)? \'value must be" + - " greater than %s or less than or equal t" + - "o %s\'.format([rules.gt, rules.lte]) : \'\'" + - "H\001R\002gt\022\355\007\n\003gte\030\005 \001(\rB\330\007\302H\324\007\n\211\001\n\nuint32.g" + - "te\032{!has(rules.lt) && !has(rules.lte) &&" + - " this < rules.gte? \'value must be greate" + - "r than or equal to %s\'.format([rules.gte" + - "]) : \'\'\n\303\001\n\ruint32.gte_lt\032\261\001has(rules.lt" + - ") && rules.lt >= rules.gte && (this >= r" + - "ules.lt || this < rules.gte)? \'value mus" + - "t be greater than or equal to %s and les" + - "s than %s\'.format([rules.gte, rules.lt])" + - " : \'\'\n\313\001\n\027uint32.gte_lt_exclusive\032\257\001has(" + - "rules.lt) && rules.lt < rules.gte && (ru" + - "les.lt <= this && this < rules.gte)? \'va" + - "lue must be greater than or equal to %s " + - "or less than %s\'.format([rules.gte, rule" + - "s.lt]) : \'\'\n\323\001\n\016uint32.gte_lte\032\300\001has(rul" + - "es.lte) && rules.lte >= rules.gte && (th" + - "is > rules.lte || this < rules.gte)? \'va" + - "lue must be greater than or equal to %s " + - "and less than or equal to %s\'.format([ru" + - "les.gte, rules.lte]) : \'\'\n\333\001\n\030uint32.gte" + - "_lte_exclusive\032\276\001has(rules.lte) && rules" + - ".lte < rules.gte && (rules.lte < this &&" + - " this < rules.gte)? \'value must be great" + - "er than or equal to %s or less than or e" + - "qual to %s\'.format([rules.gte, rules.lte" + - "]) : \'\'H\001R\003gte\022z\n\002in\030\006 \003(\rBj\302Hg\ne\n\tuint3" + - "2.in\032X!(this in dyn(rules)[\'in\']) ? \'val" + - "ue must be in list %s\'.format([dyn(rules" + - ")[\'in\']]) : \'\'R\002in\022~\n\006not_in\030\007 \003(\rBg\302Hd\n" + - "b\n\ruint32.not_in\032Qthis in rules.not_in ?" + - " \'value must not be in list %s\'.format([" + - "rules.not_in]) : \'\'R\005notIn\0225\n\007example\030\010 " + - "\003(\rB\033\302H\030\n\026\n\016uint32.example\032\004trueR\007exampl", - "e*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_tha" + - "n\"\245\025\n\013UInt64Rules\022q\n\005const\030\001 \001(\004B[\302HX\nV\n" + - "\014uint64.const\032Fthis != rules.const ? \'va" + - "lue must equal %s\'.format([rules.const])" + - " : \'\'R\005const\022\217\001\n\002lt\030\002 \001(\004B}\302Hz\nx\n\tuint64" + - ".lt\032k!has(rules.gte) && !has(rules.gt) &" + - "& this >= rules.lt? \'value must be less " + - "than %s\'.format([rules.lt]) : \'\'H\000R\002lt\022\242" + - "\001\n\003lte\030\003 \001(\004B\215\001\302H\211\001\n\206\001\n\nuint64.lte\032x!has" + - "(rules.gte) && !has(rules.gt) && this > " + - "rules.lte? \'value must be less than or e" + - "qual to %s\'.format([rules.lte]) : \'\'H\000R\003" + - "lte\022\240\007\n\002gt\030\004 \001(\004B\215\007\302H\211\007\n{\n\tuint64.gt\032n!h" + - "as(rules.lt) && !has(rules.lte) && this " + - "<= rules.gt? \'value must be greater than" + - " %s\'.format([rules.gt]) : \'\'\n\264\001\n\014uint64." + - "gt_lt\032\243\001has(rules.lt) && rules.lt >= rul" + - "es.gt && (this >= rules.lt || this <= ru" + - "les.gt)? \'value must be greater than %s " + - "and less than %s\'.format([rules.gt, rule" + - "s.lt]) : \'\'\n\274\001\n\026uint64.gt_lt_exclusive\032\241" + - "\001has(rules.lt) && rules.lt < rules.gt &&" + - " (rules.lt <= this && this <= rules.gt)?" + - " \'value must be greater than %s or less " + - "than %s\'.format([rules.gt, rules.lt]) : " + - "\'\'\n\304\001\n\ruint64.gt_lte\032\262\001has(rules.lte) &&" + - " rules.lte >= rules.gt && (this > rules." + - "lte || this <= rules.gt)? \'value must be" + - " greater than %s and less than or equal " + - "to %s\'.format([rules.gt, rules.lte]) : \'" + - "\'\n\314\001\n\027uint64.gt_lte_exclusive\032\260\001has(rule" + - "s.lte) && rules.lte < rules.gt && (rules" + - ".lte < this && this <= rules.gt)? \'value" + - " must be greater than %s or less than or" + - " equal to %s\'.format([rules.gt, rules.lt" + - "e]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005 \001(\004B\330\007\302H\324\007\n\211\001\n\n" + - "uint64.gte\032{!has(rules.lt) && !has(rules" + - ".lte) && this < rules.gte? \'value must b" + - "e greater than or equal to %s\'.format([r" + - "ules.gte]) : \'\'\n\303\001\n\ruint64.gte_lt\032\261\001has(" + - "rules.lt) && rules.lt >= rules.gte && (t" + - "his >= rules.lt || this < rules.gte)? \'v" + - "alue must be greater than or equal to %s" + - " and less than %s\'.format([rules.gte, ru" + - "les.lt]) : \'\'\n\313\001\n\027uint64.gte_lt_exclusiv" + - "e\032\257\001has(rules.lt) && rules.lt < rules.gt" + - "e && (rules.lt <= this && this < rules.g" + - "te)? \'value must be greater than or equa" + - "l to %s or less than %s\'.format([rules.g" + - "te, rules.lt]) : \'\'\n\323\001\n\016uint64.gte_lte\032\300" + - "\001has(rules.lte) && rules.lte >= rules.gt" + - "e && (this > rules.lte || this < rules.g" + - "te)? \'value must be greater than or equa" + - "l to %s and less than or equal to %s\'.fo" + - "rmat([rules.gte, rules.lte]) : \'\'\n\333\001\n\030ui" + - "nt64.gte_lte_exclusive\032\276\001has(rules.lte) " + - "&& rules.lte < rules.gte && (rules.lte <" + - " this && this < rules.gte)? \'value must " + - "be greater than or equal to %s or less t" + - "han or equal to %s\'.format([rules.gte, r" + - "ules.lte]) : \'\'H\001R\003gte\022z\n\002in\030\006 \003(\004Bj\302Hg\n" + - "e\n\tuint64.in\032X!(this in dyn(rules)[\'in\']" + - ") ? \'value must be in list %s\'.format([d" + - "yn(rules)[\'in\']]) : \'\'R\002in\022~\n\006not_in\030\007 \003" + - "(\004Bg\302Hd\nb\n\ruint64.not_in\032Qthis in rules." + - "not_in ? \'value must not be in list %s\'." + - "format([rules.not_in]) : \'\'R\005notIn\0225\n\007ex" + - "ample\030\010 \003(\004B\033\302H\030\n\026\n\016uint64.example\032\004true" + - "R\007example*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014gre" + - "ater_than\"\245\025\n\013SInt32Rules\022q\n\005const\030\001 \001(\021" + - "B[\302HX\nV\n\014sint32.const\032Fthis != rules.con" + - "st ? \'value must equal %s\'.format([rules" + - ".const]) : \'\'R\005const\022\217\001\n\002lt\030\002 \001(\021B}\302Hz\nx" + - "\n\tsint32.lt\032k!has(rules.gte) && !has(rul" + - "es.gt) && this >= rules.lt? \'value must " + - "be less than %s\'.format([rules.lt]) : \'\'" + - "H\000R\002lt\022\242\001\n\003lte\030\003 \001(\021B\215\001\302H\211\001\n\206\001\n\nsint32.l" + - "te\032x!has(rules.gte) && !has(rules.gt) &&" + - " this > rules.lte? \'value must be less t" + - "han or equal to %s\'.format([rules.lte]) " + - ": \'\'H\000R\003lte\022\240\007\n\002gt\030\004 \001(\021B\215\007\302H\211\007\n{\n\tsint3" + - "2.gt\032n!has(rules.lt) && !has(rules.lte) " + - "&& this <= rules.gt? \'value must be grea" + - "ter than %s\'.format([rules.gt]) : \'\'\n\264\001\n" + - "\014sint32.gt_lt\032\243\001has(rules.lt) && rules.l" + - "t >= rules.gt && (this >= rules.lt || th" + - "is <= rules.gt)? \'value must be greater " + - "than %s and less than %s\'.format([rules." + - "gt, rules.lt]) : \'\'\n\274\001\n\026sint32.gt_lt_exc" + - "lusive\032\241\001has(rules.lt) && rules.lt < rul" + - "es.gt && (rules.lt <= this && this <= ru" + - "les.gt)? \'value must be greater than %s " + - "or less than %s\'.format([rules.gt, rules" + - ".lt]) : \'\'\n\304\001\n\rsint32.gt_lte\032\262\001has(rules" + - ".lte) && rules.lte >= rules.gt && (this " + - "> rules.lte || this <= rules.gt)? \'value" + - " must be greater than %s and less than o" + - "r equal to %s\'.format([rules.gt, rules.l" + - "te]) : \'\'\n\314\001\n\027sint32.gt_lte_exclusive\032\260\001" + - "has(rules.lte) && rules.lte < rules.gt &" + - "& (rules.lte < this && this <= rules.gt)" + - "? \'value must be greater than %s or less" + - " than or equal to %s\'.format([rules.gt, " + - "rules.lte]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005 \001(\021B\330\007\302" + - "H\324\007\n\211\001\n\nsint32.gte\032{!has(rules.lt) && !h" + - "as(rules.lte) && this < rules.gte? \'valu" + - "e must be greater than or equal to %s\'.f" + - "ormat([rules.gte]) : \'\'\n\303\001\n\rsint32.gte_l" + - "t\032\261\001has(rules.lt) && rules.lt >= rules.g" + - "te && (this >= rules.lt || this < rules." + - "gte)? \'value must be greater than or equ" + - "al to %s and less than %s\'.format([rules" + - ".gte, rules.lt]) : \'\'\n\313\001\n\027sint32.gte_lt_" + - "exclusive\032\257\001has(rules.lt) && rules.lt < " + - "rules.gte && (rules.lt <= this && this <" + - " rules.gte)? \'value must be greater than" + - " or equal to %s or less than %s\'.format(" + - "[rules.gte, rules.lt]) : \'\'\n\323\001\n\016sint32.g" + - "te_lte\032\300\001has(rules.lte) && rules.lte >= " + - "rules.gte && (this > rules.lte || this <" + - " rules.gte)? \'value must be greater than" + - " or equal to %s and less than or equal t" + - "o %s\'.format([rules.gte, rules.lte]) : \'" + - "\'\n\333\001\n\030sint32.gte_lte_exclusive\032\276\001has(rul" + - "es.lte) && rules.lte < rules.gte && (rul" + - "es.lte < this && this < rules.gte)? \'val" + - "ue must be greater than or equal to %s o" + - "r less than or equal to %s\'.format([rule" + - "s.gte, rules.lte]) : \'\'H\001R\003gte\022z\n\002in\030\006 \003" + - "(\021Bj\302Hg\ne\n\tsint32.in\032X!(this in dyn(rule" + - "s)[\'in\']) ? \'value must be in list %s\'.f" + - "ormat([dyn(rules)[\'in\']]) : \'\'R\002in\022~\n\006no" + - "t_in\030\007 \003(\021Bg\302Hd\nb\n\rsint32.not_in\032Qthis i" + - "n rules.not_in ? \'value must not be in l" + - "ist %s\'.format([rules.not_in]) : \'\'R\005not" + - "In\0225\n\007example\030\010 \003(\021B\033\302H\030\n\026\n\016sint32.examp" + - "le\032\004trueR\007example*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_tha" + - "nB\016\n\014greater_than\"\245\025\n\013SInt64Rules\022q\n\005con" + - "st\030\001 \001(\022B[\302HX\nV\n\014sint64.const\032Fthis != r" + - "ules.const ? \'value must equal %s\'.forma" + - "t([rules.const]) : \'\'R\005const\022\217\001\n\002lt\030\002 \001(" + - "\022B}\302Hz\nx\n\tsint64.lt\032k!has(rules.gte) && " + - "!has(rules.gt) && this >= rules.lt? \'val" + - "ue must be less than %s\'.format([rules.l" + - "t]) : \'\'H\000R\002lt\022\242\001\n\003lte\030\003 \001(\022B\215\001\302H\211\001\n\206\001\n\n" + - "sint64.lte\032x!has(rules.gte) && !has(rule" + - "s.gt) && this > rules.lte? \'value must b" + - "e less than or equal to %s\'.format([rule" + - "s.lte]) : \'\'H\000R\003lte\022\240\007\n\002gt\030\004 \001(\022B\215\007\302H\211\007\n" + - "{\n\tsint64.gt\032n!has(rules.lt) && !has(rul" + - "es.lte) && this <= rules.gt? \'value must" + - " be greater than %s\'.format([rules.gt]) " + - ": \'\'\n\264\001\n\014sint64.gt_lt\032\243\001has(rules.lt) &&" + - " rules.lt >= rules.gt && (this >= rules." + - "lt || this <= rules.gt)? \'value must be " + - "greater than %s and less than %s\'.format" + - "([rules.gt, rules.lt]) : \'\'\n\274\001\n\026sint64.g" + - "t_lt_exclusive\032\241\001has(rules.lt) && rules." + - "lt < rules.gt && (rules.lt <= this && th" + - "is <= rules.gt)? \'value must be greater " + - "than %s or less than %s\'.format([rules.g" + - "t, rules.lt]) : \'\'\n\304\001\n\rsint64.gt_lte\032\262\001h" + - "as(rules.lte) && rules.lte >= rules.gt &" + - "& (this > rules.lte || this <= rules.gt)" + - "? \'value must be greater than %s and les" + - "s than or equal to %s\'.format([rules.gt," + - " rules.lte]) : \'\'\n\314\001\n\027sint64.gt_lte_excl" + - "usive\032\260\001has(rules.lte) && rules.lte < ru" + - "les.gt && (rules.lte < this && this <= r" + - "ules.gt)? \'value must be greater than %s" + - " or less than or equal to %s\'.format([ru" + - "les.gt, rules.lte]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005" + - " \001(\022B\330\007\302H\324\007\n\211\001\n\nsint64.gte\032{!has(rules.l" + - "t) && !has(rules.lte) && this < rules.gt" + - "e? \'value must be greater than or equal " + - "to %s\'.format([rules.gte]) : \'\'\n\303\001\n\rsint" + - "64.gte_lt\032\261\001has(rules.lt) && rules.lt >=" + - " rules.gte && (this >= rules.lt || this " + - "< rules.gte)? \'value must be greater tha" + - "n or equal to %s and less than %s\'.forma" + - "t([rules.gte, rules.lt]) : \'\'\n\313\001\n\027sint64" + - ".gte_lt_exclusive\032\257\001has(rules.lt) && rul" + - "es.lt < rules.gte && (rules.lt <= this &" + - "& this < rules.gte)? \'value must be grea" + - "ter than or equal to %s or less than %s\'" + - ".format([rules.gte, rules.lt]) : \'\'\n\323\001\n\016" + - "sint64.gte_lte\032\300\001has(rules.lte) && rules" + - ".lte >= rules.gte && (this > rules.lte |" + - "| this < rules.gte)? \'value must be grea" + - "ter than or equal to %s and less than or" + - " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'\n\333\001\n\030sint64.gte_lte_exclusive\032\276" + - "\001has(rules.lte) && rules.lte < rules.gte" + - " && (rules.lte < this && this < rules.gt" + - "e)? \'value must be greater than or equal" + - " to %s or less than or equal to %s\'.form" + - "at([rules.gte, rules.lte]) : \'\'H\001R\003gte\022z" + - "\n\002in\030\006 \003(\022Bj\302Hg\ne\n\tsint64.in\032X!(this in " + - "dyn(rules)[\'in\']) ? \'value must be in li" + - "st %s\'.format([dyn(rules)[\'in\']]) : \'\'R\002" + - "in\022~\n\006not_in\030\007 \003(\022Bg\302Hd\nb\n\rsint64.not_in" + - "\032Qthis in rules.not_in ? \'value must not" + - " be in list %s\'.format([rules.not_in]) :" + - " \'\'R\005notIn\0225\n\007example\030\010 \003(\022B\033\302H\030\n\026\n\016sint" + - "64.example\032\004trueR\007example*\t\010\350\007\020\200\200\200\200\002B\013\n\t" + - "less_thanB\016\n\014greater_than\"\266\025\n\014Fixed32Rul" + - "es\022r\n\005const\030\001 \001(\007B\\\302HY\nW\n\rfixed32.const\032" + - "Fthis != rules.const ? \'value must equal" + - " %s\'.format([rules.const]) : \'\'R\005const\022\220" + - "\001\n\002lt\030\002 \001(\007B~\302H{\ny\n\nfixed32.lt\032k!has(rul" + - "es.gte) && !has(rules.gt) && this >= rul" + - "es.lt? \'value must be less than %s\'.form" + - "at([rules.lt]) : \'\'H\000R\002lt\022\243\001\n\003lte\030\003 \001(\007B" + - "\216\001\302H\212\001\n\207\001\n\013fixed32.lte\032x!has(rules.gte) " + - "&& !has(rules.gt) && this > rules.lte? \'" + - "value must be less than or equal to %s\'." + - "format([rules.lte]) : \'\'H\000R\003lte\022\245\007\n\002gt\030\004" + - " \001(\007B\222\007\302H\216\007\n|\n\nfixed32.gt\032n!has(rules.lt" + - ") && !has(rules.lte) && this <= rules.gt" + - "? \'value must be greater than %s\'.format" + - "([rules.gt]) : \'\'\n\265\001\n\rfixed32.gt_lt\032\243\001ha" + - "s(rules.lt) && rules.lt >= rules.gt && (" + - "this >= rules.lt || this <= rules.gt)? \'" + - "value must be greater than %s and less t" + - "han %s\'.format([rules.gt, rules.lt]) : \'" + - "\'\n\275\001\n\027fixed32.gt_lt_exclusive\032\241\001has(rule" + - "s.lt) && rules.lt < rules.gt && (rules.l" + - "t <= this && this <= rules.gt)? \'value m" + - "ust be greater than %s or less than %s\'." + - "format([rules.gt, rules.lt]) : \'\'\n\305\001\n\016fi" + - "xed32.gt_lte\032\262\001has(rules.lte) && rules.l" + - "te >= rules.gt && (this > rules.lte || t" + - "his <= rules.gt)? \'value must be greater" + - " than %s and less than or equal to %s\'.f" + - "ormat([rules.gt, rules.lte]) : \'\'\n\315\001\n\030fi" + - "xed32.gt_lte_exclusive\032\260\001has(rules.lte) " + - "&& rules.lte < rules.gt && (rules.lte < " + - "this && this <= rules.gt)? \'value must b" + - "e greater than %s or less than or equal " + - "to %s\'.format([rules.gt, rules.lte]) : \'" + - "\'H\001R\002gt\022\362\007\n\003gte\030\005 \001(\007B\335\007\302H\331\007\n\212\001\n\013fixed32" + - ".gte\032{!has(rules.lt) && !has(rules.lte) " + - "&& this < rules.gte? \'value must be grea" + - "ter than or equal to %s\'.format([rules.g" + - "te]) : \'\'\n\304\001\n\016fixed32.gte_lt\032\261\001has(rules" + - ".lt) && rules.lt >= rules.gte && (this >" + - "= rules.lt || this < rules.gte)? \'value " + - "must be greater than or equal to %s and " + - "less than %s\'.format([rules.gte, rules.l" + - "t]) : \'\'\n\314\001\n\030fixed32.gte_lt_exclusive\032\257\001" + - "has(rules.lt) && rules.lt < rules.gte &&" + - " (rules.lt <= this && this < rules.gte)?" + - " \'value must be greater than or equal to" + - " %s or less than %s\'.format([rules.gte, " + - "rules.lt]) : \'\'\n\324\001\n\017fixed32.gte_lte\032\300\001ha" + - "s(rules.lte) && rules.lte >= rules.gte &" + - "& (this > rules.lte || this < rules.gte)" + - "? \'value must be greater than or equal t" + - "o %s and less than or equal to %s\'.forma" + - "t([rules.gte, rules.lte]) : \'\'\n\334\001\n\031fixed" + - "32.gte_lte_exclusive\032\276\001has(rules.lte) &&" + - " rules.lte < rules.gte && (rules.lte < t" + - "his && this < rules.gte)? \'value must be" + - " greater than or equal to %s or less tha" + - "n or equal to %s\'.format([rules.gte, rul" + - "es.lte]) : \'\'H\001R\003gte\022{\n\002in\030\006 \003(\007Bk\302Hh\nf\n" + - "\nfixed32.in\032X!(this in dyn(rules)[\'in\'])" + - " ? \'value must be in list %s\'.format([dy" + - "n(rules)[\'in\']]) : \'\'R\002in\022\177\n\006not_in\030\007 \003(" + - "\007Bh\302He\nc\n\016fixed32.not_in\032Qthis in rules." + - "not_in ? \'value must not be in list %s\'." + - "format([rules.not_in]) : \'\'R\005notIn\0226\n\007ex" + - "ample\030\010 \003(\007B\034\302H\031\n\027\n\017fixed32.example\032\004tru" + - "eR\007example*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014gr" + - "eater_than\"\266\025\n\014Fixed64Rules\022r\n\005const\030\001 \001" + - "(\006B\\\302HY\nW\n\rfixed64.const\032Fthis != rules." + - "const ? \'value must equal %s\'.format([ru" + - "les.const]) : \'\'R\005const\022\220\001\n\002lt\030\002 \001(\006B~\302H" + - "{\ny\n\nfixed64.lt\032k!has(rules.gte) && !has" + - "(rules.gt) && this >= rules.lt? \'value m" + - "ust be less than %s\'.format([rules.lt]) " + - ": \'\'H\000R\002lt\022\243\001\n\003lte\030\003 \001(\006B\216\001\302H\212\001\n\207\001\n\013fixe" + - "d64.lte\032x!has(rules.gte) && !has(rules.g" + - "t) && this > rules.lte? \'value must be l" + - "ess than or equal to %s\'.format([rules.l" + - "te]) : \'\'H\000R\003lte\022\245\007\n\002gt\030\004 \001(\006B\222\007\302H\216\007\n|\n\n" + - "fixed64.gt\032n!has(rules.lt) && !has(rules" + - ".lte) && this <= rules.gt? \'value must b" + - "e greater than %s\'.format([rules.gt]) : " + - "\'\'\n\265\001\n\rfixed64.gt_lt\032\243\001has(rules.lt) && " + - "rules.lt >= rules.gt && (this >= rules.l" + - "t || this <= rules.gt)? \'value must be g" + - "reater than %s and less than %s\'.format(" + - "[rules.gt, rules.lt]) : \'\'\n\275\001\n\027fixed64.g" + - "t_lt_exclusive\032\241\001has(rules.lt) && rules." + - "lt < rules.gt && (rules.lt <= this && th" + - "is <= rules.gt)? \'value must be greater " + - "than %s or less than %s\'.format([rules.g" + - "t, rules.lt]) : \'\'\n\305\001\n\016fixed64.gt_lte\032\262\001" + - "has(rules.lte) && rules.lte >= rules.gt " + - "&& (this > rules.lte || this <= rules.gt" + - ")? \'value must be greater than %s and le" + - "ss than or equal to %s\'.format([rules.gt" + - ", rules.lte]) : \'\'\n\315\001\n\030fixed64.gt_lte_ex" + - "clusive\032\260\001has(rules.lte) && rules.lte < " + - "rules.gt && (rules.lte < this && this <=" + - " rules.gt)? \'value must be greater than " + - "%s or less than or equal to %s\'.format([" + - "rules.gt, rules.lte]) : \'\'H\001R\002gt\022\362\007\n\003gte" + - "\030\005 \001(\006B\335\007\302H\331\007\n\212\001\n\013fixed64.gte\032{!has(rule" + - "s.lt) && !has(rules.lte) && this < rules" + - ".gte? \'value must be greater than or equ" + - "al to %s\'.format([rules.gte]) : \'\'\n\304\001\n\016f" + - "ixed64.gte_lt\032\261\001has(rules.lt) && rules.l" + - "t >= rules.gte && (this >= rules.lt || t" + - "his < rules.gte)? \'value must be greater" + - " than or equal to %s and less than %s\'.f" + - "ormat([rules.gte, rules.lt]) : \'\'\n\314\001\n\030fi" + - "xed64.gte_lt_exclusive\032\257\001has(rules.lt) &" + - "& rules.lt < rules.gte && (rules.lt <= t" + - "his && this < rules.gte)? \'value must be" + - " greater than or equal to %s or less tha" + - "n %s\'.format([rules.gte, rules.lt]) : \'\'" + - "\n\324\001\n\017fixed64.gte_lte\032\300\001has(rules.lte) &&" + - " rules.lte >= rules.gte && (this > rules" + - ".lte || this < rules.gte)? \'value must b" + - "e greater than or equal to %s and less t" + - "han or equal to %s\'.format([rules.gte, r" + - "ules.lte]) : \'\'\n\334\001\n\031fixed64.gte_lte_excl" + - "usive\032\276\001has(rules.lte) && rules.lte < ru" + - "les.gte && (rules.lte < this && this < r" + - "ules.gte)? \'value must be greater than o" + - "r equal to %s or less than or equal to %" + - "s\'.format([rules.gte, rules.lte]) : \'\'H\001" + - "R\003gte\022{\n\002in\030\006 \003(\006Bk\302Hh\nf\n\nfixed64.in\032X!(" + - "this in dyn(rules)[\'in\']) ? \'value must " + - "be in list %s\'.format([dyn(rules)[\'in\']]" + - ") : \'\'R\002in\022\177\n\006not_in\030\007 \003(\006Bh\302He\nc\n\016fixed" + - "64.not_in\032Qthis in rules.not_in ? \'value" + - " must not be in list %s\'.format([rules.n" + - "ot_in]) : \'\'R\005notIn\0226\n\007example\030\010 \003(\006B\034\302H" + - "\031\n\027\n\017fixed64.example\032\004trueR\007example*\t\010\350\007" + - "\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_than\"\310\025\n\r" + - "SFixed32Rules\022s\n\005const\030\001 \001(\017B]\302HZ\nX\n\016sfi" + - "xed32.const\032Fthis != rules.const ? \'valu" + - "e must equal %s\'.format([rules.const]) :" + - " \'\'R\005const\022\221\001\n\002lt\030\002 \001(\017B\177\302H|\nz\n\013sfixed32" + - ".lt\032k!has(rules.gte) && !has(rules.gt) &" + - "& this >= rules.lt? \'value must be less " + - "than %s\'.format([rules.lt]) : \'\'H\000R\002lt\022\244" + - "\001\n\003lte\030\003 \001(\017B\217\001\302H\213\001\n\210\001\n\014sfixed32.lte\032x!h" + - "as(rules.gte) && !has(rules.gt) && this " + - "> rules.lte? \'value must be less than or" + - " equal to %s\'.format([rules.lte]) : \'\'H\000" + - "R\003lte\022\252\007\n\002gt\030\004 \001(\017B\227\007\302H\223\007\n}\n\013sfixed32.gt" + - "\032n!has(rules.lt) && !has(rules.lte) && t" + - "his <= rules.gt? \'value must be greater " + - "than %s\'.format([rules.gt]) : \'\'\n\266\001\n\016sfi" + - "xed32.gt_lt\032\243\001has(rules.lt) && rules.lt " + - ">= rules.gt && (this >= rules.lt || this" + - " <= rules.gt)? \'value must be greater th" + - "an %s and less than %s\'.format([rules.gt" + - ", rules.lt]) : \'\'\n\276\001\n\030sfixed32.gt_lt_exc" + - "lusive\032\241\001has(rules.lt) && rules.lt < rul" + - "es.gt && (rules.lt <= this && this <= ru" + - "les.gt)? \'value must be greater than %s " + - "or less than %s\'.format([rules.gt, rules" + - ".lt]) : \'\'\n\306\001\n\017sfixed32.gt_lte\032\262\001has(rul" + - "es.lte) && rules.lte >= rules.gt && (thi" + - "s > rules.lte || this <= rules.gt)? \'val" + - "ue must be greater than %s and less than" + - " or equal to %s\'.format([rules.gt, rules" + - ".lte]) : \'\'\n\316\001\n\031sfixed32.gt_lte_exclusiv" + - "e\032\260\001has(rules.lte) && rules.lte < rules." + - "gt && (rules.lte < this && this <= rules" + - ".gt)? \'value must be greater than %s or " + - "less than or equal to %s\'.format([rules." + - "gt, rules.lte]) : \'\'H\001R\002gt\022\367\007\n\003gte\030\005 \001(\017" + - "B\342\007\302H\336\007\n\213\001\n\014sfixed32.gte\032{!has(rules.lt)" + - " && !has(rules.lte) && this < rules.gte?" + - " \'value must be greater than or equal to" + - " %s\'.format([rules.gte]) : \'\'\n\305\001\n\017sfixed" + - "32.gte_lt\032\261\001has(rules.lt) && rules.lt >=" + - " rules.gte && (this >= rules.lt || this " + - "< rules.gte)? \'value must be greater tha" + - "n or equal to %s and less than %s\'.forma" + - "t([rules.gte, rules.lt]) : \'\'\n\315\001\n\031sfixed" + - "32.gte_lt_exclusive\032\257\001has(rules.lt) && r" + - "ules.lt < rules.gte && (rules.lt <= this" + - " && this < rules.gte)? \'value must be gr" + - "eater than or equal to %s or less than %" + - "s\'.format([rules.gte, rules.lt]) : \'\'\n\325\001" + - "\n\020sfixed32.gte_lte\032\300\001has(rules.lte) && r" + - "ules.lte >= rules.gte && (this > rules.l" + - "te || this < rules.gte)? \'value must be " + - "greater than or equal to %s and less tha" + - "n or equal to %s\'.format([rules.gte, rul" + - "es.lte]) : \'\'\n\335\001\n\032sfixed32.gte_lte_exclu" + - "sive\032\276\001has(rules.lte) && rules.lte < rul" + - "es.gte && (rules.lte < this && this < ru", - "les.gte)? \'value must be greater than or" + - " equal to %s or less than or equal to %s" + - "\'.format([rules.gte, rules.lte]) : \'\'H\001R" + - "\003gte\022|\n\002in\030\006 \003(\017Bl\302Hi\ng\n\013sfixed32.in\032X!(" + - "this in dyn(rules)[\'in\']) ? \'value must " + - "be in list %s\'.format([dyn(rules)[\'in\']]" + - ") : \'\'R\002in\022\200\001\n\006not_in\030\007 \003(\017Bi\302Hf\nd\n\017sfix" + - "ed32.not_in\032Qthis in rules.not_in ? \'val" + - "ue must not be in list %s\'.format([rules" + - ".not_in]) : \'\'R\005notIn\0227\n\007example\030\010 \003(\017B\035" + - "\302H\032\n\030\n\020sfixed32.example\032\004trueR\007example*\t" + - "\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_than\"\310" + - "\025\n\rSFixed64Rules\022s\n\005const\030\001 \001(\020B]\302HZ\nX\n\016" + - "sfixed64.const\032Fthis != rules.const ? \'v" + - "alue must equal %s\'.format([rules.const]" + - ") : \'\'R\005const\022\221\001\n\002lt\030\002 \001(\020B\177\302H|\nz\n\013sfixe" + - "d64.lt\032k!has(rules.gte) && !has(rules.gt" + - ") && this >= rules.lt? \'value must be le" + - "ss than %s\'.format([rules.lt]) : \'\'H\000R\002l" + - "t\022\244\001\n\003lte\030\003 \001(\020B\217\001\302H\213\001\n\210\001\n\014sfixed64.lte\032" + - "x!has(rules.gte) && !has(rules.gt) && th" + - "is > rules.lte? \'value must be less than" + - " or equal to %s\'.format([rules.lte]) : \'" + - "\'H\000R\003lte\022\252\007\n\002gt\030\004 \001(\020B\227\007\302H\223\007\n}\n\013sfixed64" + - ".gt\032n!has(rules.lt) && !has(rules.lte) &" + - "& this <= rules.gt? \'value must be great" + - "er than %s\'.format([rules.gt]) : \'\'\n\266\001\n\016" + - "sfixed64.gt_lt\032\243\001has(rules.lt) && rules." + - "lt >= rules.gt && (this >= rules.lt || t" + - "his <= rules.gt)? \'value must be greater" + - " than %s and less than %s\'.format([rules" + - ".gt, rules.lt]) : \'\'\n\276\001\n\030sfixed64.gt_lt_" + - "exclusive\032\241\001has(rules.lt) && rules.lt < " + - "rules.gt && (rules.lt <= this && this <=" + - " rules.gt)? \'value must be greater than " + - "%s or less than %s\'.format([rules.gt, ru" + - "les.lt]) : \'\'\n\306\001\n\017sfixed64.gt_lte\032\262\001has(" + - "rules.lte) && rules.lte >= rules.gt && (" + - "this > rules.lte || this <= rules.gt)? \'" + - "value must be greater than %s and less t" + - "han or equal to %s\'.format([rules.gt, ru" + - "les.lte]) : \'\'\n\316\001\n\031sfixed64.gt_lte_exclu" + - "sive\032\260\001has(rules.lte) && rules.lte < rul" + - "es.gt && (rules.lte < this && this <= ru" + - "les.gt)? \'value must be greater than %s " + - "or less than or equal to %s\'.format([rul" + - "es.gt, rules.lte]) : \'\'H\001R\002gt\022\367\007\n\003gte\030\005 " + - "\001(\020B\342\007\302H\336\007\n\213\001\n\014sfixed64.gte\032{!has(rules." + - "lt) && !has(rules.lte) && this < rules.g" + - "te? \'value must be greater than or equal" + - " to %s\'.format([rules.gte]) : \'\'\n\305\001\n\017sfi" + - "xed64.gte_lt\032\261\001has(rules.lt) && rules.lt" + - " >= rules.gte && (this >= rules.lt || th" + - "is < rules.gte)? \'value must be greater " + - "than or equal to %s and less than %s\'.fo" + - "rmat([rules.gte, rules.lt]) : \'\'\n\315\001\n\031sfi" + - "xed64.gte_lt_exclusive\032\257\001has(rules.lt) &" + - "& rules.lt < rules.gte && (rules.lt <= t" + - "his && this < rules.gte)? \'value must be" + - " greater than or equal to %s or less tha" + - "n %s\'.format([rules.gte, rules.lt]) : \'\'" + - "\n\325\001\n\020sfixed64.gte_lte\032\300\001has(rules.lte) &" + - "& rules.lte >= rules.gte && (this > rule" + - "s.lte || this < rules.gte)? \'value must " + - "be greater than or equal to %s and less " + - "than or equal to %s\'.format([rules.gte, " + - "rules.lte]) : \'\'\n\335\001\n\032sfixed64.gte_lte_ex" + - "clusive\032\276\001has(rules.lte) && rules.lte < " + - "rules.gte && (rules.lte < this && this <" + - " rules.gte)? \'value must be greater than" + - " or equal to %s or less than or equal to" + - " %s\'.format([rules.gte, rules.lte]) : \'\'" + - "H\001R\003gte\022|\n\002in\030\006 \003(\020Bl\302Hi\ng\n\013sfixed64.in\032" + - "X!(this in dyn(rules)[\'in\']) ? \'value mu" + - "st be in list %s\'.format([dyn(rules)[\'in" + - "\']]) : \'\'R\002in\022\200\001\n\006not_in\030\007 \003(\020Bi\302Hf\nd\n\017s" + - "fixed64.not_in\032Qthis in rules.not_in ? \'" + - "value must not be in list %s\'.format([ru" + - "les.not_in]) : \'\'R\005notIn\0227\n\007example\030\010 \003(" + - "\020B\035\302H\032\n\030\n\020sfixed64.example\032\004trueR\007exampl" + - "e*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_tha" + - "n\"\274\001\n\tBoolRules\022o\n\005const\030\001 \001(\010BY\302HV\nT\n\nb" + - "ool.const\032Fthis != rules.const ? \'value " + - "must equal %s\'.format([rules.const]) : \'" + - "\'R\005const\0223\n\007example\030\002 \003(\010B\031\302H\026\n\024\n\014bool.e" + - "xample\032\004trueR\007example*\t\010\350\007\020\200\200\200\200\002\"\2419\n\013Str" + - "ingRules\022s\n\005const\030\001 \001(\tB]\302HZ\nX\n\014string.c" + - "onst\032Hthis != rules.const ? \'value must " + - "equal `%s`\'.format([rules.const]) : \'\'R\005" + - "const\022\203\001\n\003len\030\023 \001(\004Bq\302Hn\nl\n\nstring.len\032^" + - "uint(this.size()) != rules.len ? \'value " + - "length must be %s characters\'.format([ru" + - "les.len]) : \'\'R\003len\022\241\001\n\007min_len\030\002 \001(\004B\207\001" + - "\302H\203\001\n\200\001\n\016string.min_len\032nuint(this.size(" + - ")) < rules.min_len ? \'value length must " + - "be at least %s characters\'.format([rules" + - ".min_len]) : \'\'R\006minLen\022\237\001\n\007max_len\030\003 \001(" + - "\004B\205\001\302H\201\001\n\177\n\016string.max_len\032muint(this.si" + - "ze()) > rules.max_len ? \'value length mu" + - "st be at most %s characters\'.format([rul" + - "es.max_len]) : \'\'R\006maxLen\022\245\001\n\tlen_bytes\030" + - "\024 \001(\004B\207\001\302H\203\001\n\200\001\n\020string.len_bytes\032luint(" + - "bytes(this).size()) != rules.len_bytes ?" + - " \'value length must be %s bytes\'.format(" + - "[rules.len_bytes]) : \'\'R\010lenBytes\022\255\001\n\tmi" + - "n_bytes\030\004 \001(\004B\217\001\302H\213\001\n\210\001\n\020string.min_byte" + - "s\032tuint(bytes(this).size()) < rules.min_" + - "bytes ? \'value length must be at least %" + - "s bytes\'.format([rules.min_bytes]) : \'\'R" + - "\010minBytes\022\254\001\n\tmax_bytes\030\005 \001(\004B\216\001\302H\212\001\n\207\001\n" + - "\020string.max_bytes\032suint(bytes(this).size" + - "()) > rules.max_bytes ? \'value length mu" + - "st be at most %s bytes\'.format([rules.ma" + - "x_bytes]) : \'\'R\010maxBytes\022\226\001\n\007pattern\030\006 \001" + - "(\tB|\302Hy\nw\n\016string.pattern\032e!this.matches" + - "(rules.pattern) ? \'value does not match " + - "regex pattern `%s`\'.format([rules.patter" + - "n]) : \'\'R\007pattern\022\214\001\n\006prefix\030\007 \001(\tBt\302Hq\n" + - "o\n\rstring.prefix\032^!this.startsWith(rules" + - ".prefix) ? \'value does not have prefix `" + - "%s`\'.format([rules.prefix]) : \'\'R\006prefix" + - "\022\212\001\n\006suffix\030\010 \001(\tBr\302Ho\nm\n\rstring.suffix\032" + - "\\!this.endsWith(rules.suffix) ? \'value d" + - "oes not have suffix `%s`\'.format([rules." + - "suffix]) : \'\'R\006suffix\022\232\001\n\010contains\030\t \001(\t" + - "B~\302H{\ny\n\017string.contains\032f!this.contains" + - "(rules.contains) ? \'value does not conta" + - "in substring `%s`\'.format([rules.contain" + - "s]) : \'\'R\010contains\022\245\001\n\014not_contains\030\027 \001(" + - "\tB\201\001\302H~\n|\n\023string.not_contains\032ethis.con" + - "tains(rules.not_contains) ? \'value conta" + - "ins substring `%s`\'.format([rules.not_co" + - "ntains]) : \'\'R\013notContains\022z\n\002in\030\n \003(\tBj" + - "\302Hg\ne\n\tstring.in\032X!(this in dyn(rules)[\'" + - "in\']) ? \'value must be in list %s\'.forma" + - "t([dyn(rules)[\'in\']]) : \'\'R\002in\022~\n\006not_in" + - "\030\013 \003(\tBg\302Hd\nb\n\rstring.not_in\032Qthis in ru" + - "les.not_in ? \'value must not be in list " + - "%s\'.format([rules.not_in]) : \'\'R\005notIn\022\346" + - "\001\n\005email\030\014 \001(\010B\315\001\302H\311\001\na\n\014string.email\022#v" + - "alue must be a valid email address\032,!rul" + - "es.email || this == \'\' || this.isEmail()" + - "\nd\n\022string.email_empty\0222value is empty, " + - "which is not a valid email address\032\032!rul" + - "es.email || this != \'\'H\000R\005email\022\361\001\n\010host" + - "name\030\r \001(\010B\322\001\302H\316\001\ne\n\017string.hostname\022\036va" + - "lue must be a valid hostname\0322!rules.hos" + - "tname || this == \'\' || this.isHostname()" + - "\ne\n\025string.hostname_empty\022-value is empt" + - "y, which is not a valid hostname\032\035!rules" + - ".hostname || this != \'\'H\000R\010hostname\022\313\001\n\002" + - "ip\030\016 \001(\010B\270\001\302H\264\001\nU\n\tstring.ip\022 value must" + - " be a valid IP address\032&!rules.ip || thi" + - "s == \'\' || this.isIp()\n[\n\017string.ip_empt" + - "y\022/value is empty, which is not a valid " + - "IP address\032\027!rules.ip || this != \'\'H\000R\002i" + - "p\022\334\001\n\004ipv4\030\017 \001(\010B\305\001\302H\301\001\n\\\n\013string.ipv4\022\"" + - "value must be a valid IPv4 address\032)!rul" + - "es.ipv4 || this == \'\' || this.isIp(4)\na\n" + - "\021string.ipv4_empty\0221value is empty, whic" + - "h is not a valid IPv4 address\032\031!rules.ip" + - "v4 || this != \'\'H\000R\004ipv4\022\334\001\n\004ipv6\030\020 \001(\010B" + - "\305\001\302H\301\001\n\\\n\013string.ipv6\022\"value must be a v" + - "alid IPv6 address\032)!rules.ipv6 || this =" + - "= \'\' || this.isIp(6)\na\n\021string.ipv6_empt" + - "y\0221value is empty, which is not a valid " + - "IPv6 address\032\031!rules.ipv6 || this != \'\'H" + - "\000R\004ipv6\022\304\001\n\003uri\030\021 \001(\010B\257\001\302H\253\001\nQ\n\nstring.u" + - "ri\022\031value must be a valid URI\032(!rules.ur" + - "i || this == \'\' || this.isUri()\nV\n\020strin" + - "g.uri_empty\022(value is empty, which is no" + - "t a valid URI\032\030!rules.uri || this != \'\'H" + - "\000R\003uri\022n\n\007uri_ref\030\022 \001(\010BS\302HP\nN\n\016string.u" + - "ri_ref\022\031value must be a valid URI\032!!rule" + - "s.uri_ref || this.isUriRef()H\000R\006uriRef\022\231" + - "\002\n\007address\030\025 \001(\010B\374\001\302H\370\001\n\201\001\n\016string.addre" + - "ss\022-value must be a valid hostname, or i" + - "p address\032@!rules.address || this == \'\' " + - "|| this.isHostname() || this.isIp()\nr\n\024s" + - "tring.address_empty\022!rules.ipv4_with_prefixlen || this =" + - "= \'\' || this.isIpPrefix(4)\n\222\001\n string.ip" + - "v4_with_prefixlen_empty\022Dvalue is empty," + - " which is not a valid IPv4 address with " + - "prefix length\032(!rules.ipv4_with_prefixle" + - "n || this != \'\'H\000R\021ipv4WithPrefixlen\022\342\002\n" + - "\023ipv6_with_prefixlen\030\034 \001(\010B\257\002\302H\253\002\n\223\001\n\032st" + - "ring.ipv6_with_prefixlen\0225value must be " + - "a valid IPv6 address with prefix length\032" + - ">!rules.ipv6_with_prefixlen || this == \'" + - "\' || this.isIpPrefix(6)\n\222\001\n string.ipv6_" + - "with_prefixlen_empty\022Dvalue is empty, wh" + - "ich is not a valid IPv6 address with pre" + - "fix length\032(!rules.ipv6_with_prefixlen |" + - "| this != \'\'H\000R\021ipv6WithPrefixlen\022\374\001\n\tip" + - "_prefix\030\035 \001(\010B\334\001\302H\330\001\nl\n\020string.ip_prefix" + - "\022\037value must be a valid IP prefix\0327!rule" + - "s.ip_prefix || this == \'\' || this.isIpPr" + - "efix(true)\nh\n\026string.ip_prefix_empty\022.va" + - "lue is empty, which is not a valid IP pr" + - "efix\032\036!rules.ip_prefix || this != \'\'H\000R\010" + - "ipPrefix\022\217\002\n\013ipv4_prefix\030\036 \001(\010B\353\001\302H\347\001\nu\n" + - "\022string.ipv4_prefix\022!value must be a val" + - "id IPv4 prefix\032!rules.host_and_port || this == \'\' || t" + - "his.isHostAndPort(true)\ny\n\032string.host_a" + - "nd_port_empty\0227value is empty, which is " + - "not a valid host and port pair\032\"!rules.h" + - "ost_and_port || this != \'\'H\000R\013hostAndPor" + - "t\022\270\005\n\020well_known_regex\030\030 \001(\0162\030.buf.valid" + - "ate.KnownRegexB\361\004\302H\355\004\n\360\001\n#string.well_kn" + - "own_regex.header_name\022&value must be a v" + - "alid HTTP header name\032\240\001rules.well_known" + - "_regex != 1 || this == \'\' || this.matche" + - "s(!has(rules.strict) || rules.strict ?\'^" + - ":?[0-9a-zA-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[" + - "^\\u0000\\u000A\\u000D]+$\')\n\215\001\n)string.well" + - "_known_regex.header_name_empty\0225value is" + - " empty, which is not a valid HTTP header" + - " name\032)rules.well_known_regex != 1 || th" + - "is != \'\'\n\347\001\n$string.well_known_regex.hea" + - "der_value\022\'value must be a valid HTTP he" + - "ader value\032\225\001rules.well_known_regex != 2" + - " || this.matches(!has(rules.strict) || r" + - "ules.strict ?\'^[^\\u0000-\\u0008\\u000A-\\u0" + - "01F\\u007F]*$\' :\'^[^\\u0000\\u000A\\u000D]*$" + - "\')H\000R\016wellKnownRegex\022\026\n\006strict\030\031 \001(\010R\006st" + - "rict\0225\n\007example\030\" \003(\tB\033\302H\030\n\026\n\016string.exa" + - "mple\032\004trueR\007example*\t\010\350\007\020\200\200\200\200\002B\014\n\nwell_k" + - "nown\"\243\021\n\nBytesRules\022m\n\005const\030\001 \001(\014BW\302HT\n" + - "R\n\013bytes.const\032Cthis != rules.const ? \'v" + - "alue must be %x\'.format([rules.const]) :" + - " \'\'R\005const\022}\n\003len\030\r \001(\004Bk\302Hh\nf\n\tbytes.le" + - "n\032Yuint(this.size()) != rules.len ? \'val" + - "ue length must be %s bytes\'.format([rule" + - "s.len]) : \'\'R\003len\022\230\001\n\007min_len\030\002 \001(\004B\177\302H|" + - "\nz\n\rbytes.min_len\032iuint(this.size()) < r" + - "ules.min_len ? \'value length must be at " + - "least %s bytes\'.format([rules.min_len]) " + - ": \'\'R\006minLen\022\220\001\n\007max_len\030\003 \001(\004Bw\302Ht\nr\n\rb" + - "ytes.max_len\032auint(this.size()) > rules." + - "max_len ? \'value must be at most %s byte" + - "s\'.format([rules.max_len]) : \'\'R\006maxLen\022" + - "\231\001\n\007pattern\030\004 \001(\tB\177\302H|\nz\n\rbytes.pattern\032" + - "i!string(this).matches(rules.pattern) ? " + - "\'value must match regex pattern `%s`\'.fo" + - "rmat([rules.pattern]) : \'\'R\007pattern\022\211\001\n\006" + - "prefix\030\005 \001(\014Bq\302Hn\nl\n\014bytes.prefix\032\\!this" + - ".startsWith(rules.prefix) ? \'value does " + - "not have prefix %x\'.format([rules.prefix" + - "]) : \'\'R\006prefix\022\207\001\n\006suffix\030\006 \001(\014Bo\302Hl\nj\n" + - "\014bytes.suffix\032Z!this.endsWith(rules.suff" + - "ix) ? \'value does not have suffix %x\'.fo" + - "rmat([rules.suffix]) : \'\'R\006suffix\022\215\001\n\010co" + - "ntains\030\007 \001(\014Bq\302Hn\nl\n\016bytes.contains\032Z!th" + - "is.contains(rules.contains) ? \'value doe" + - "s not contain %x\'.format([rules.contains" + - "]) : \'\'R\010contains\022\233\001\n\002in\030\010 \003(\014B\212\001\302H\206\001\n\203\001" + - "\n\010bytes.in\032wdyn(rules)[\'in\'].size() > 0 " + - "&& !(this in dyn(rules)[\'in\']) ? \'value " + - "must be in list %s\'.format([dyn(rules)[\'" + - "in\']]) : \'\'R\002in\022}\n\006not_in\030\t \003(\014Bf\302Hc\na\n\014" + - "bytes.not_in\032Qthis in rules.not_in ? \'va" + - "lue must not be in list %s\'.format([rule" + - "s.not_in]) : \'\'R\005notIn\022\357\001\n\002ip\030\n \001(\010B\334\001\302H" + - "\330\001\nt\n\010bytes.ip\022 value must be a valid IP" + - " address\032F!rules.ip || this.size() == 0 " + - "|| this.size() == 4 || this.size() == 16" + - "\n`\n\016bytes.ip_empty\022/value is empty, whic" + - "h is not a valid IP address\032\035!rules.ip |" + - "| this.size() != 0H\000R\002ip\022\352\001\n\004ipv4\030\013 \001(\010B" + - "\323\001\302H\317\001\ne\n\nbytes.ipv4\022\"value must be a va" + - "lid IPv4 address\0323!rules.ipv4 || this.si" + - "ze() == 0 || this.size() == 4\nf\n\020bytes.i" + - "pv4_empty\0221value is empty, which is not " + - "a valid IPv4 address\032\037!rules.ipv4 || thi" + - "s.size() != 0H\000R\004ipv4\022\353\001\n\004ipv6\030\014 \001(\010B\324\001\302" + - "H\320\001\nf\n\nbytes.ipv6\022\"value must be a valid" + - " IPv6 address\0324!rules.ipv6 || this.size(" + - ") == 0 || this.size() == 16\nf\n\020bytes.ipv" + - "6_empty\0221value is empty, which is not a " + - "valid IPv6 address\032\037!rules.ipv6 || this." + - "size() != 0H\000R\004ipv6\0224\n\007example\030\016 \003(\014B\032\302H" + - "\027\n\025\n\rbytes.example\032\004trueR\007example*\t\010\350\007\020\200" + - "\200\200\200\002B\014\n\nwell_known\"\327\003\n\tEnumRules\022o\n\005cons" + - "t\030\001 \001(\005BY\302HV\nT\n\nenum.const\032Fthis != rule" + - "s.const ? \'value must equal %s\'.format([" + - "rules.const]) : \'\'R\005const\022!\n\014defined_onl" + - "y\030\002 \001(\010R\013definedOnly\022x\n\002in\030\003 \003(\005Bh\302He\nc\n" + - "\007enum.in\032X!(this in dyn(rules)[\'in\']) ? " + - "\'value must be in list %s\'.format([dyn(r" + - "ules)[\'in\']]) : \'\'R\002in\022|\n\006not_in\030\004 \003(\005Be" + - "\302Hb\n`\n\013enum.not_in\032Qthis in rules.not_in" + - " ? \'value must not be in list %s\'.format" + - "([rules.not_in]) : \'\'R\005notIn\0223\n\007example\030" + - "\005 \003(\005B\031\302H\026\n\024\n\014enum.example\032\004trueR\007exampl" + - "e*\t\010\350\007\020\200\200\200\200\002\"\244\004\n\rRepeatedRules\022\250\001\n\tmin_i" + - "tems\030\001 \001(\004B\212\001\302H\206\001\n\203\001\n\022repeated.min_items" + - "\032muint(this.size()) < rules.min_items ? " + - "\'value must contain at least %d item(s)\'" + - ".format([rules.min_items]) : \'\'R\010minItem" + - "s\022\254\001\n\tmax_items\030\002 \001(\004B\216\001\302H\212\001\n\207\001\n\022repeate" + - "d.max_items\032quint(this.size()) > rules.m" + - "ax_items ? \'value must contain no more t" + - "han %s item(s)\'.format([rules.max_items]" + - ") : \'\'R\010maxItems\022x\n\006unique\030\003 \001(\010B`\302H]\n[\n" + - "\017repeated.unique\022(repeated value must co" + - "ntain unique items\032\036!rules.unique || thi" + - "s.unique()R\006unique\0224\n\005items\030\004 \001(\0132\036.buf." + - "validate.FieldConstraintsR\005items*\t\010\350\007\020\200\200" + - "\200\200\002\"\270\003\n\010MapRules\022\231\001\n\tmin_pairs\030\001 \001(\004B|\302H" + - "y\nw\n\rmap.min_pairs\032fuint(this.size()) < " + - "rules.min_pairs ? \'map must be at least " + - "%d entries\'.format([rules.min_pairs]) : " + - "\'\'R\010minPairs\022\230\001\n\tmax_pairs\030\002 \001(\004B{\302Hx\nv\n" + - "\rmap.max_pairs\032euint(this.size()) > rule" + - "s.max_pairs ? \'map must be at most %d en" + - "tries\'.format([rules.max_pairs]) : \'\'R\010m" + - "axPairs\0222\n\004keys\030\004 \001(\0132\036.buf.validate.Fie" + - "ldConstraintsR\004keys\0226\n\006values\030\005 \001(\0132\036.bu" + - "f.validate.FieldConstraintsR\006values*\t\010\350\007" + - "\020\200\200\200\200\002\"1\n\010AnyRules\022\016\n\002in\030\002 \003(\tR\002in\022\025\n\006no" + - "t_in\030\003 \003(\tR\005notIn\"\242\027\n\rDurationRules\022\216\001\n\005" + - "const\030\002 \001(\0132\031.google.protobuf.DurationB]" + - "\302HZ\nX\n\016duration.const\032Fthis != rules.con" + - "st ? \'value must equal %s\'.format([rules" + - ".const]) : \'\'R\005const\022\254\001\n\002lt\030\003 \001(\0132\031.goog" + - "le.protobuf.DurationB\177\302H|\nz\n\013duration.lt" + - "\032k!has(rules.gte) && !has(rules.gt) && t" + - "his >= rules.lt? \'value must be less tha" + - "n %s\'.format([rules.lt]) : \'\'H\000R\002lt\022\277\001\n\003" + - "lte\030\004 \001(\0132\031.google.protobuf.DurationB\217\001\302" + - "H\213\001\n\210\001\n\014duration.lte\032x!has(rules.gte) &&" + - " !has(rules.gt) && this > rules.lte? \'va" + - "lue must be less than or equal to %s\'.fo" + - "rmat([rules.lte]) : \'\'H\000R\003lte\022\305\007\n\002gt\030\005 \001" + - "(\0132\031.google.protobuf.DurationB\227\007\302H\223\007\n}\n\013" + - "duration.gt\032n!has(rules.lt) && !has(rule" + - "s.lte) && this <= rules.gt? \'value must " + - "be greater than %s\'.format([rules.gt]) :" + - " \'\'\n\266\001\n\016duration.gt_lt\032\243\001has(rules.lt) &" + - "& rules.lt >= rules.gt && (this >= rules" + - ".lt || this <= rules.gt)? \'value must be" + - " greater than %s and less than %s\'.forma" + - "t([rules.gt, rules.lt]) : \'\'\n\276\001\n\030duratio" + - "n.gt_lt_exclusive\032\241\001has(rules.lt) && rul" + - "es.lt < rules.gt && (rules.lt <= this &&" + - " this <= rules.gt)? \'value must be great" + - "er than %s or less than %s\'.format([rule" + - "s.gt, rules.lt]) : \'\'\n\306\001\n\017duration.gt_lt" + - "e\032\262\001has(rules.lte) && rules.lte >= rules" + - ".gt && (this > rules.lte || this <= rule" + - "s.gt)? \'value must be greater than %s an" + - "d less than or equal to %s\'.format([rule" + - "s.gt, rules.lte]) : \'\'\n\316\001\n\031duration.gt_l" + - "te_exclusive\032\260\001has(rules.lte) && rules.l" + - "te < rules.gt && (rules.lte < this && th" + - "is <= rules.gt)? \'value must be greater " + - "than %s or less than or equal to %s\'.for" + - "mat([rules.gt, rules.lte]) : \'\'H\001R\002gt\022\222\010", - "\n\003gte\030\006 \001(\0132\031.google.protobuf.DurationB\342" + - "\007\302H\336\007\n\213\001\n\014duration.gte\032{!has(rules.lt) &" + - "& !has(rules.lte) && this < rules.gte? \'" + - "value must be greater than or equal to %" + - "s\'.format([rules.gte]) : \'\'\n\305\001\n\017duration" + - ".gte_lt\032\261\001has(rules.lt) && rules.lt >= r" + - "ules.gte && (this >= rules.lt || this < " + - "rules.gte)? \'value must be greater than " + - "or equal to %s and less than %s\'.format(" + - "[rules.gte, rules.lt]) : \'\'\n\315\001\n\031duration" + - ".gte_lt_exclusive\032\257\001has(rules.lt) && rul" + - "es.lt < rules.gte && (rules.lt <= this &" + - "& this < rules.gte)? \'value must be grea" + - "ter than or equal to %s or less than %s\'" + - ".format([rules.gte, rules.lt]) : \'\'\n\325\001\n\020" + - "duration.gte_lte\032\300\001has(rules.lte) && rul" + - "es.lte >= rules.gte && (this > rules.lte" + - " || this < rules.gte)? \'value must be gr" + - "eater than or equal to %s and less than " + - "or equal to %s\'.format([rules.gte, rules" + - ".lte]) : \'\'\n\335\001\n\032duration.gte_lte_exclusi" + - "ve\032\276\001has(rules.lte) && rules.lte < rules" + - ".gte && (rules.lte < this && this < rule" + - "s.gte)? \'value must be greater than or e" + - "qual to %s or less than or equal to %s\'." + - "format([rules.gte, rules.lte]) : \'\'H\001R\003g" + - "te\022\227\001\n\002in\030\007 \003(\0132\031.google.protobuf.Durati" + - "onBl\302Hi\ng\n\013duration.in\032X!(this in dyn(ru" + - "les)[\'in\']) ? \'value must be in list %s\'" + - ".format([dyn(rules)[\'in\']]) : \'\'R\002in\022\233\001\n" + - "\006not_in\030\010 \003(\0132\031.google.protobuf.Duration" + - "Bi\302Hf\nd\n\017duration.not_in\032Qthis in rules." + - "not_in ? \'value must not be in list %s\'." + - "format([rules.not_in]) : \'\'R\005notIn\022R\n\007ex" + - "ample\030\t \003(\0132\031.google.protobuf.DurationB\035" + - "\302H\032\n\030\n\020duration.example\032\004trueR\007example*\t" + - "\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_than\"\260" + - "\030\n\016TimestampRules\022\220\001\n\005const\030\002 \001(\0132\032.goog" + - "le.protobuf.TimestampB^\302H[\nY\n\017timestamp." + - "const\032Fthis != rules.const ? \'value must" + - " equal %s\'.format([rules.const]) : \'\'R\005c" + - "onst\022\257\001\n\002lt\030\003 \001(\0132\032.google.protobuf.Time" + - "stampB\200\001\302H}\n{\n\014timestamp.lt\032k!has(rules." + - "gte) && !has(rules.gt) && this >= rules." + - "lt? \'value must be less than %s\'.format(" + - "[rules.lt]) : \'\'H\000R\002lt\022\301\001\n\003lte\030\004 \001(\0132\032.g" + - "oogle.protobuf.TimestampB\220\001\302H\214\001\n\211\001\n\rtime" + - "stamp.lte\032x!has(rules.gte) && !has(rules" + - ".gt) && this > rules.lte? \'value must be" + - " less than or equal to %s\'.format([rules" + - ".lte]) : \'\'H\000R\003lte\022s\n\006lt_now\030\007 \001(\010BZ\302HW\n" + - "U\n\020timestamp.lt_now\032A(rules.lt_now && th" + - "is > now) ? \'value must be less than now" + - "\' : \'\'H\000R\005ltNow\022\313\007\n\002gt\030\005 \001(\0132\032.google.pr" + - "otobuf.TimestampB\234\007\302H\230\007\n~\n\014timestamp.gt\032" + - "n!has(rules.lt) && !has(rules.lte) && th" + - "is <= rules.gt? \'value must be greater t" + - "han %s\'.format([rules.gt]) : \'\'\n\267\001\n\017time" + - "stamp.gt_lt\032\243\001has(rules.lt) && rules.lt " + - ">= rules.gt && (this >= rules.lt || this" + - " <= rules.gt)? \'value must be greater th" + - "an %s and less than %s\'.format([rules.gt" + - ", rules.lt]) : \'\'\n\277\001\n\031timestamp.gt_lt_ex" + - "clusive\032\241\001has(rules.lt) && rules.lt < ru" + - "les.gt && (rules.lt <= this && this <= r" + - "ules.gt)? \'value must be greater than %s" + - " or less than %s\'.format([rules.gt, rule" + - "s.lt]) : \'\'\n\307\001\n\020timestamp.gt_lte\032\262\001has(r" + - "ules.lte) && rules.lte >= rules.gt && (t" + - "his > rules.lte || this <= rules.gt)? \'v" + - "alue must be greater than %s and less th" + - "an or equal to %s\'.format([rules.gt, rul" + - "es.lte]) : \'\'\n\317\001\n\032timestamp.gt_lte_exclu" + - "sive\032\260\001has(rules.lte) && rules.lte < rul" + - "es.gt && (rules.lte < this && this <= ru" + - "les.gt)? \'value must be greater than %s " + - "or less than or equal to %s\'.format([rul" + - "es.gt, rules.lte]) : \'\'H\001R\002gt\022\230\010\n\003gte\030\006 " + - "\001(\0132\032.google.protobuf.TimestampB\347\007\302H\343\007\n\214" + - "\001\n\rtimestamp.gte\032{!has(rules.lt) && !has" + - "(rules.lte) && this < rules.gte? \'value " + - "must be greater than or equal to %s\'.for" + - "mat([rules.gte]) : \'\'\n\306\001\n\020timestamp.gte_" + - "lt\032\261\001has(rules.lt) && rules.lt >= rules." + - "gte && (this >= rules.lt || this < rules" + - ".gte)? \'value must be greater than or eq" + - "ual to %s and less than %s\'.format([rule" + - "s.gte, rules.lt]) : \'\'\n\316\001\n\032timestamp.gte" + - "_lt_exclusive\032\257\001has(rules.lt) && rules.l" + - "t < rules.gte && (rules.lt <= this && th" + - "is < rules.gte)? \'value must be greater " + - "than or equal to %s or less than %s\'.for" + - "mat([rules.gte, rules.lt]) : \'\'\n\326\001\n\021time" + - "stamp.gte_lte\032\300\001has(rules.lte) && rules." + - "lte >= rules.gte && (this > rules.lte ||" + - " this < rules.gte)? \'value must be great" + - "er than or equal to %s and less than or " + - "equal to %s\'.format([rules.gte, rules.lt" + - "e]) : \'\'\n\336\001\n\033timestamp.gte_lte_exclusive" + - "\032\276\001has(rules.lte) && rules.lte < rules.g" + - "te && (rules.lte < this && this < rules." + - "gte)? \'value must be greater than or equ" + - "al to %s or less than or equal to %s\'.fo" + - "rmat([rules.gte, rules.lte]) : \'\'H\001R\003gte" + - "\022v\n\006gt_now\030\010 \001(\010B]\302HZ\nX\n\020timestamp.gt_no" + - "w\032D(rules.gt_now && this < now) ? \'value" + - " must be greater than now\' : \'\'H\001R\005gtNow" + - "\022\300\001\n\006within\030\t \001(\0132\031.google.protobuf.Dura" + - "tionB\214\001\302H\210\001\n\205\001\n\020timestamp.within\032qthis <" + - " now-rules.within || this > now+rules.wi" + - "thin ? \'value must be within %s of now\'." + - "format([rules.within]) : \'\'R\006within\022T\n\007e" + - "xample\030\n \003(\0132\032.google.protobuf.Timestamp" + - "B\036\302H\033\n\031\n\021timestamp.example\032\004trueR\007exampl" + - "e*\t\010\350\007\020\200\200\200\200\002B\013\n\tless_thanB\016\n\014greater_tha" + - "n\"E\n\nViolations\0227\n\nviolations\030\001 \003(\0132\027.bu" + - "f.validate.ViolationR\nviolations\"\202\001\n\tVio" + - "lation\022\035\n\nfield_path\030\001 \001(\tR\tfieldPath\022#\n" + - "\rconstraint_id\030\002 \001(\tR\014constraintId\022\030\n\007me" + - "ssage\030\003 \001(\tR\007message\022\027\n\007for_key\030\004 \001(\010R\006f" + - "orKey*\235\001\n\006Ignore\022\026\n\022IGNORE_UNSPECIFIED\020\000" + - "\022\031\n\025IGNORE_IF_UNPOPULATED\020\001\022\033\n\027IGNORE_IF" + - "_DEFAULT_VALUE\020\002\022\021\n\rIGNORE_ALWAYS\020\003\022\024\n\014I" + - "GNORE_EMPTY\020\001\032\002\010\001\022\026\n\016IGNORE_DEFAULT\020\002\032\002\010" + - "\001\032\002\020\001*n\n\nKnownRegex\022\033\n\027KNOWN_REGEX_UNSPE" + - "CIFIED\020\000\022 \n\034KNOWN_REGEX_HTTP_HEADER_NAME" + - "\020\001\022!\n\035KNOWN_REGEX_HTTP_HEADER_VALUE\020\002:\\\n" + - "\007message\022\037.google.protobuf.MessageOption" + - "s\030\207\t \001(\0132 .buf.validate.MessageConstrain" + - "tsR\007message:T\n\005oneof\022\035.google.protobuf.O" + - "neofOptions\030\207\t \001(\0132\036.buf.validate.OneofC" + - "onstraintsR\005oneof:T\n\005field\022\035.google.prot" + - "obuf.FieldOptions\030\207\t \001(\0132\036.buf.validate." + - "FieldConstraintsR\005field:c\n\npredefined\022\035." + - "google.protobuf.FieldOptions\030\210\t \001(\0132#.bu" + - "f.validate.PredefinedConstraintsR\npredef" + - "inedBn\n\022build.buf.validateB\rValidateProt" + - "oP\001ZGbuf.build/gen/go/bufbuild/protovali" + - "date/protocolbuffers/go/buf/validate" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.DescriptorProtos.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_buf_validate_Constraint_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_buf_validate_Constraint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Constraint_descriptor, - new java.lang.String[] { "Id", "Message", "Expression", }); - internal_static_buf_validate_MessageConstraints_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_buf_validate_MessageConstraints_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_MessageConstraints_descriptor, - new java.lang.String[] { "Disabled", "Cel", }); - internal_static_buf_validate_OneofConstraints_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_buf_validate_OneofConstraints_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_OneofConstraints_descriptor, - new java.lang.String[] { "Required", }); - internal_static_buf_validate_FieldConstraints_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_buf_validate_FieldConstraints_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_FieldConstraints_descriptor, - new java.lang.String[] { "Cel", "Required", "Ignore", "Float", "Double", "Int32", "Int64", "Uint32", "Uint64", "Sint32", "Sint64", "Fixed32", "Fixed64", "Sfixed32", "Sfixed64", "Bool", "String", "Bytes", "Enum", "Repeated", "Map", "Any", "Duration", "Timestamp", "Skipped", "IgnoreEmpty", "Type", }); - internal_static_buf_validate_PredefinedConstraints_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_buf_validate_PredefinedConstraints_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_PredefinedConstraints_descriptor, - new java.lang.String[] { "Cel", }); - internal_static_buf_validate_FloatRules_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_buf_validate_FloatRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_FloatRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Finite", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_DoubleRules_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_buf_validate_DoubleRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_DoubleRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Finite", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_Int32Rules_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_buf_validate_Int32Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Int32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_Int64Rules_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_buf_validate_Int64Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Int64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_UInt32Rules_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_buf_validate_UInt32Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_UInt32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_UInt64Rules_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_buf_validate_UInt64Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_UInt64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_SInt32Rules_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_buf_validate_SInt32Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_SInt32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_SInt64Rules_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_buf_validate_SInt64Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_SInt64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_Fixed32Rules_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_buf_validate_Fixed32Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Fixed32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_Fixed64Rules_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_buf_validate_Fixed64Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Fixed64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_SFixed32Rules_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_buf_validate_SFixed32Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_SFixed32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_SFixed64Rules_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_buf_validate_SFixed64Rules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_SFixed64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_BoolRules_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_buf_validate_BoolRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_BoolRules_descriptor, - new java.lang.String[] { "Const", "Example", }); - internal_static_buf_validate_StringRules_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_buf_validate_StringRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_StringRules_descriptor, - new java.lang.String[] { "Const", "Len", "MinLen", "MaxLen", "LenBytes", "MinBytes", "MaxBytes", "Pattern", "Prefix", "Suffix", "Contains", "NotContains", "In", "NotIn", "Email", "Hostname", "Ip", "Ipv4", "Ipv6", "Uri", "UriRef", "Address", "Uuid", "Tuuid", "IpWithPrefixlen", "Ipv4WithPrefixlen", "Ipv6WithPrefixlen", "IpPrefix", "Ipv4Prefix", "Ipv6Prefix", "HostAndPort", "WellKnownRegex", "Strict", "Example", "WellKnown", }); - internal_static_buf_validate_BytesRules_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_buf_validate_BytesRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_BytesRules_descriptor, - new java.lang.String[] { "Const", "Len", "MinLen", "MaxLen", "Pattern", "Prefix", "Suffix", "Contains", "In", "NotIn", "Ip", "Ipv4", "Ipv6", "Example", "WellKnown", }); - internal_static_buf_validate_EnumRules_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_buf_validate_EnumRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_EnumRules_descriptor, - new java.lang.String[] { "Const", "DefinedOnly", "In", "NotIn", "Example", }); - internal_static_buf_validate_RepeatedRules_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_buf_validate_RepeatedRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_RepeatedRules_descriptor, - new java.lang.String[] { "MinItems", "MaxItems", "Unique", "Items", }); - internal_static_buf_validate_MapRules_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_buf_validate_MapRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_MapRules_descriptor, - new java.lang.String[] { "MinPairs", "MaxPairs", "Keys", "Values", }); - internal_static_buf_validate_AnyRules_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_buf_validate_AnyRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_AnyRules_descriptor, - new java.lang.String[] { "In", "NotIn", }); - internal_static_buf_validate_DurationRules_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_buf_validate_DurationRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_DurationRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_TimestampRules_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_buf_validate_TimestampRules_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_TimestampRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "LtNow", "Gt", "Gte", "GtNow", "Within", "Example", "LessThan", "GreaterThan", }); - internal_static_buf_validate_Violations_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_buf_validate_Violations_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Violations_descriptor, - new java.lang.String[] { "Violations", }); - internal_static_buf_validate_Violation_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_buf_validate_Violation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_buf_validate_Violation_descriptor, - new java.lang.String[] { "FieldPath", "ConstraintId", "Message", "ForKey", }); - message.internalInit(descriptor.getExtensions().get(0)); - oneof.internalInit(descriptor.getExtensions().get(1)); - field.internalInit(descriptor.getExtensions().get(2)); - predefined.internalInit(descriptor.getExtensions().get(3)); - descriptor.resolveAllFeaturesImmutable(); - com.google.protobuf.DescriptorProtos.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(build.buf.validate.ValidateProto.predefined); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/build/buf/validate/Violation.java b/src/main/java/build/buf/validate/Violation.java deleted file mode 100644 index d2f3f766..00000000 --- a/src/main/java/build/buf/validate/Violation.java +++ /dev/null @@ -1,1126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * `Violation` represents a single instance where a validation rule, expressed
- * as a `Constraint`, was not met. It provides information about the field that
- * caused the violation, the specific constraint that wasn't fulfilled, and a
- * human-readable error message.
- *
- * ```json
- * {
- * "fieldPath": "bar",
- * "constraintId": "foo.bar",
- * "message": "bar must be greater than 0"
- * }
- * ```
- * 
- * - * Protobuf type {@code buf.validate.Violation} - */ -public final class Violation extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.Violation) - ViolationOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Violation.class.getName()); - } - // Use Violation.newBuilder() to construct. - private Violation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Violation() { - fieldPath_ = ""; - constraintId_ = ""; - message_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Violation.class, build.buf.validate.Violation.Builder.class); - } - - private int bitField0_; - public static final int FIELD_PATH_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object fieldPath_ = ""; - /** - *
-   * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-   * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-   * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return Whether the fieldPath field is set. - */ - @java.lang.Override - public boolean hasFieldPath() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-   * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-   * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return The fieldPath. - */ - @java.lang.Override - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - fieldPath_ = s; - } - return s; - } - } - /** - *
-   * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-   * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-   * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return The bytes for fieldPath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONSTRAINT_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object constraintId_ = ""; - /** - *
-   * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-   * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-   * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return Whether the constraintId field is set. - */ - @java.lang.Override - public boolean hasConstraintId() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-   * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-   * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-   * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return The constraintId. - */ - @java.lang.Override - public java.lang.String getConstraintId() { - java.lang.Object ref = constraintId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - constraintId_ = s; - } - return s; - } - } - /** - *
-   * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-   * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-   * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return The bytes for constraintId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstraintIdBytes() { - java.lang.Object ref = constraintId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MESSAGE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object message_ = ""; - /** - *
-   * `message` is a human-readable error message that describes the nature of the violation.
-   * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-   * 
- * - * optional string message = 3 [json_name = "message"]; - * @return Whether the message field is set. - */ - @java.lang.Override - public boolean hasMessage() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * `message` is a human-readable error message that describes the nature of the violation.
-   * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-   * 
- * - * optional string message = 3 [json_name = "message"]; - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - message_ = s; - } - return s; - } - } - /** - *
-   * `message` is a human-readable error message that describes the nature of the violation.
-   * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-   * 
- * - * optional string message = 3 [json_name = "message"]; - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FOR_KEY_FIELD_NUMBER = 4; - private boolean forKey_ = false; - /** - *
-   * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-   * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return Whether the forKey field is set. - */ - @java.lang.Override - public boolean hasForKey() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-   * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-   * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return The forKey. - */ - @java.lang.Override - public boolean getForKey() { - return forKey_; - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldPath_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, constraintId_); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, message_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBool(4, forKey_); - } - 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.GeneratedMessage.computeStringSize(1, fieldPath_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, constraintId_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, message_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, forKey_); - } - 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.Violation)) { - return super.equals(obj); - } - build.buf.validate.Violation other = (build.buf.validate.Violation) obj; - - if (hasFieldPath() != other.hasFieldPath()) return false; - if (hasFieldPath()) { - if (!getFieldPath() - .equals(other.getFieldPath())) return false; - } - if (hasConstraintId() != other.hasConstraintId()) return false; - if (hasConstraintId()) { - if (!getConstraintId() - .equals(other.getConstraintId())) return false; - } - if (hasMessage() != other.hasMessage()) return false; - if (hasMessage()) { - if (!getMessage() - .equals(other.getMessage())) return false; - } - if (hasForKey() != other.hasForKey()) return false; - if (hasForKey()) { - if (getForKey() - != other.getForKey()) 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 (hasFieldPath()) { - hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFieldPath().hashCode(); - } - if (hasConstraintId()) { - hash = (37 * hash) + CONSTRAINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getConstraintId().hashCode(); - } - if (hasMessage()) { - hash = (37 * hash) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - } - if (hasForKey()) { - hash = (37 * hash) + FOR_KEY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForKey()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Violation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Violation 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.Violation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Violation 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.Violation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Violation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Violation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Violation 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.Violation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Violation 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.Violation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Violation 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.Violation 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; - } - /** - *
-   * `Violation` represents a single instance where a validation rule, expressed
-   * as a `Constraint`, was not met. It provides information about the field that
-   * caused the violation, the specific constraint that wasn't fulfilled, and a
-   * human-readable error message.
-   *
-   * ```json
-   * {
-   * "fieldPath": "bar",
-   * "constraintId": "foo.bar",
-   * "message": "bar must be greater than 0"
-   * }
-   * ```
-   * 
- * - * Protobuf type {@code buf.validate.Violation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.Violation) - build.buf.validate.ViolationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Violation.class, build.buf.validate.Violation.Builder.class); - } - - // Construct using build.buf.validate.Violation.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fieldPath_ = ""; - constraintId_ = ""; - message_ = ""; - forKey_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violation_descriptor; - } - - @java.lang.Override - public build.buf.validate.Violation getDefaultInstanceForType() { - return build.buf.validate.Violation.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Violation build() { - build.buf.validate.Violation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Violation buildPartial() { - build.buf.validate.Violation result = new build.buf.validate.Violation(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(build.buf.validate.Violation result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fieldPath_ = fieldPath_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.constraintId_ = constraintId_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.message_ = message_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.forKey_ = forKey_; - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Violation) { - return mergeFrom((build.buf.validate.Violation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Violation other) { - if (other == build.buf.validate.Violation.getDefaultInstance()) return this; - if (other.hasFieldPath()) { - fieldPath_ = other.fieldPath_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasConstraintId()) { - constraintId_ = other.constraintId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasMessage()) { - message_ = other.message_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasForKey()) { - setForKey(other.getForKey()); - } - 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: { - fieldPath_ = input.readBytes(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - constraintId_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - message_ = input.readBytes(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - forKey_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - 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.lang.Object fieldPath_ = ""; - /** - *
-     * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-     * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-     * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return Whether the fieldPath field is set. - */ - public boolean hasFieldPath() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-     * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-     * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return The fieldPath. - */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - fieldPath_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-     * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-     * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return The bytes for fieldPath. - */ - public com.google.protobuf.ByteString - getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-     * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-     * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @param value The fieldPath to set. - * @return This builder for chaining. - */ - public Builder setFieldPath( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fieldPath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-     * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-     * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return This builder for chaining. - */ - public Builder clearFieldPath() { - fieldPath_ = getDefaultInstance().getFieldPath(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-     * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-     * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @param value The bytes for fieldPath to set. - * @return This builder for chaining. - */ - public Builder setFieldPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - fieldPath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object constraintId_ = ""; - /** - *
-     * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-     * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-     * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return Whether the constraintId field is set. - */ - public boolean hasConstraintId() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-     * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-     * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return The constraintId. - */ - public java.lang.String getConstraintId() { - java.lang.Object ref = constraintId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - constraintId_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-     * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-     * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return The bytes for constraintId. - */ - public com.google.protobuf.ByteString - getConstraintIdBytes() { - java.lang.Object ref = constraintId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-     * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-     * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @param value The constraintId to set. - * @return This builder for chaining. - */ - public Builder setConstraintId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - constraintId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
-     * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-     * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-     * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return This builder for chaining. - */ - public Builder clearConstraintId() { - constraintId_ = getDefaultInstance().getConstraintId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-     * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-     * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @param value The bytes for constraintId to set. - * @return This builder for chaining. - */ - public Builder setConstraintIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - constraintId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object message_ = ""; - /** - *
-     * `message` is a human-readable error message that describes the nature of the violation.
-     * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-     * 
- * - * optional string message = 3 [json_name = "message"]; - * @return Whether the message field is set. - */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * `message` is a human-readable error message that describes the nature of the violation.
-     * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-     * 
- * - * optional string message = 3 [json_name = "message"]; - * @return The message. - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - message_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * `message` is a human-readable error message that describes the nature of the violation.
-     * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-     * 
- * - * optional string message = 3 [json_name = "message"]; - * @return The bytes for message. - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * `message` is a human-readable error message that describes the nature of the violation.
-     * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-     * 
- * - * optional string message = 3 [json_name = "message"]; - * @param value The message to set. - * @return This builder for chaining. - */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - message_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * `message` is a human-readable error message that describes the nature of the violation.
-     * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-     * 
- * - * optional string message = 3 [json_name = "message"]; - * @return This builder for chaining. - */ - public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * `message` is a human-readable error message that describes the nature of the violation.
-     * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-     * 
- * - * optional string message = 3 [json_name = "message"]; - * @param value The bytes for message to set. - * @return This builder for chaining. - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - message_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private boolean forKey_ ; - /** - *
-     * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-     * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return Whether the forKey field is set. - */ - @java.lang.Override - public boolean hasForKey() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-     * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return The forKey. - */ - @java.lang.Override - public boolean getForKey() { - return forKey_; - } - /** - *
-     * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-     * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @param value The forKey to set. - * @return This builder for chaining. - */ - public Builder setForKey(boolean value) { - - forKey_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-     * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return This builder for chaining. - */ - public Builder clearForKey() { - bitField0_ = (bitField0_ & ~0x00000008); - forKey_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Violation) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Violation) - private static final build.buf.validate.Violation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Violation(); - } - - public static build.buf.validate.Violation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Violation 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.Violation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/ViolationOrBuilder.java b/src/main/java/build/buf/validate/ViolationOrBuilder.java deleted file mode 100644 index 0605d6c0..00000000 --- a/src/main/java/build/buf/validate/ViolationOrBuilder.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface ViolationOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Violation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-   * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-   * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return Whether the fieldPath field is set. - */ - boolean hasFieldPath(); - /** - *
-   * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-   * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-   * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return The fieldPath. - */ - java.lang.String getFieldPath(); - /** - *
-   * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
-   * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
-   * 
- * - * optional string field_path = 1 [json_name = "fieldPath"]; - * @return The bytes for fieldPath. - */ - com.google.protobuf.ByteString - getFieldPathBytes(); - - /** - *
-   * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-   * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-   * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return Whether the constraintId field is set. - */ - boolean hasConstraintId(); - /** - *
-   * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-   * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-   * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return The constraintId. - */ - java.lang.String getConstraintId(); - /** - *
-   * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
-   * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
-   * 
- * - * optional string constraint_id = 2 [json_name = "constraintId"]; - * @return The bytes for constraintId. - */ - com.google.protobuf.ByteString - getConstraintIdBytes(); - - /** - *
-   * `message` is a human-readable error message that describes the nature of the violation.
-   * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-   * 
- * - * optional string message = 3 [json_name = "message"]; - * @return Whether the message field is set. - */ - boolean hasMessage(); - /** - *
-   * `message` is a human-readable error message that describes the nature of the violation.
-   * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-   * 
- * - * optional string message = 3 [json_name = "message"]; - * @return The message. - */ - java.lang.String getMessage(); - /** - *
-   * `message` is a human-readable error message that describes the nature of the violation.
-   * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
-   * 
- * - * optional string message = 3 [json_name = "message"]; - * @return The bytes for message. - */ - com.google.protobuf.ByteString - getMessageBytes(); - - /** - *
-   * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-   * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return Whether the forKey field is set. - */ - boolean hasForKey(); - /** - *
-   * `for_key` indicates whether the violation was caused by a map key, rather than a value.
-   * 
- * - * optional bool for_key = 4 [json_name = "forKey"]; - * @return The forKey. - */ - boolean getForKey(); -} diff --git a/src/main/java/build/buf/validate/Violations.java b/src/main/java/build/buf/validate/Violations.java deleted file mode 100644 index 36e67a74..00000000 --- a/src/main/java/build/buf/validate/Violations.java +++ /dev/null @@ -1,823 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -/** - *
- * `Violations` is a collection of `Violation` messages. This message type is returned by
- * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules.
- * Each individual violation is represented by a `Violation` message.
- * 
- * - * Protobuf type {@code buf.validate.Violations} - */ -public final class Violations extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:buf.validate.Violations) - ViolationsOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 28, - /* patch= */ 2, - /* suffix= */ "", - Violations.class.getName()); - } - // Use Violations.newBuilder() to construct. - private Violations(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Violations() { - violations_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violations_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violations_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Violations.class, build.buf.validate.Violations.Builder.class); - } - - public static final int VIOLATIONS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List violations_; - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - @java.lang.Override - public java.util.List getViolationsList() { - return violations_; - } - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - @java.lang.Override - public java.util.List - getViolationsOrBuilderList() { - return violations_; - } - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - @java.lang.Override - public int getViolationsCount() { - return violations_.size(); - } - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - @java.lang.Override - public build.buf.validate.Violation getViolations(int index) { - return violations_.get(index); - } - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - @java.lang.Override - public build.buf.validate.ViolationOrBuilder getViolationsOrBuilder( - int index) { - return violations_.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 < violations_.size(); i++) { - output.writeMessage(1, violations_.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 < violations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, violations_.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.Violations)) { - return super.equals(obj); - } - build.buf.validate.Violations other = (build.buf.validate.Violations) obj; - - if (!getViolationsList() - .equals(other.getViolationsList())) 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 (getViolationsCount() > 0) { - hash = (37 * hash) + VIOLATIONS_FIELD_NUMBER; - hash = (53 * hash) + getViolationsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static build.buf.validate.Violations parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Violations 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.Violations parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Violations 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.Violations parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static build.buf.validate.Violations parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static build.buf.validate.Violations parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Violations 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.Violations parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static build.buf.validate.Violations 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.Violations parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static build.buf.validate.Violations 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.Violations 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; - } - /** - *
-   * `Violations` is a collection of `Violation` messages. This message type is returned by
-   * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules.
-   * Each individual violation is represented by a `Violation` message.
-   * 
- * - * Protobuf type {@code buf.validate.Violations} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:buf.validate.Violations) - build.buf.validate.ViolationsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violations_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violations_fieldAccessorTable - .ensureFieldAccessorsInitialized( - build.buf.validate.Violations.class, build.buf.validate.Violations.Builder.class); - } - - // Construct using build.buf.validate.Violations.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (violationsBuilder_ == null) { - violations_ = java.util.Collections.emptyList(); - } else { - violations_ = null; - violationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return build.buf.validate.ValidateProto.internal_static_buf_validate_Violations_descriptor; - } - - @java.lang.Override - public build.buf.validate.Violations getDefaultInstanceForType() { - return build.buf.validate.Violations.getDefaultInstance(); - } - - @java.lang.Override - public build.buf.validate.Violations build() { - build.buf.validate.Violations result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public build.buf.validate.Violations buildPartial() { - build.buf.validate.Violations result = new build.buf.validate.Violations(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(build.buf.validate.Violations result) { - if (violationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - violations_ = java.util.Collections.unmodifiableList(violations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.violations_ = violations_; - } else { - result.violations_ = violationsBuilder_.build(); - } - } - - private void buildPartial0(build.buf.validate.Violations result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof build.buf.validate.Violations) { - return mergeFrom((build.buf.validate.Violations)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(build.buf.validate.Violations other) { - if (other == build.buf.validate.Violations.getDefaultInstance()) return this; - if (violationsBuilder_ == null) { - if (!other.violations_.isEmpty()) { - if (violations_.isEmpty()) { - violations_ = other.violations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureViolationsIsMutable(); - violations_.addAll(other.violations_); - } - onChanged(); - } - } else { - if (!other.violations_.isEmpty()) { - if (violationsBuilder_.isEmpty()) { - violationsBuilder_.dispose(); - violationsBuilder_ = null; - violations_ = other.violations_; - bitField0_ = (bitField0_ & ~0x00000001); - violationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getViolationsFieldBuilder() : null; - } else { - violationsBuilder_.addAllMessages(other.violations_); - } - } - } - 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: { - build.buf.validate.Violation m = - input.readMessage( - build.buf.validate.Violation.parser(), - extensionRegistry); - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.add(m); - } else { - violationsBuilder_.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 violations_ = - java.util.Collections.emptyList(); - private void ensureViolationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - violations_ = new java.util.ArrayList(violations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Violation, build.buf.validate.Violation.Builder, build.buf.validate.ViolationOrBuilder> violationsBuilder_; - - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public java.util.List getViolationsList() { - if (violationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(violations_); - } else { - return violationsBuilder_.getMessageList(); - } - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public int getViolationsCount() { - if (violationsBuilder_ == null) { - return violations_.size(); - } else { - return violationsBuilder_.getCount(); - } - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public build.buf.validate.Violation getViolations(int index) { - if (violationsBuilder_ == null) { - return violations_.get(index); - } else { - return violationsBuilder_.getMessage(index); - } - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder setViolations( - int index, build.buf.validate.Violation value) { - if (violationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureViolationsIsMutable(); - violations_.set(index, value); - onChanged(); - } else { - violationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder setViolations( - int index, build.buf.validate.Violation.Builder builderForValue) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.set(index, builderForValue.build()); - onChanged(); - } else { - violationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder addViolations(build.buf.validate.Violation value) { - if (violationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureViolationsIsMutable(); - violations_.add(value); - onChanged(); - } else { - violationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder addViolations( - int index, build.buf.validate.Violation value) { - if (violationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureViolationsIsMutable(); - violations_.add(index, value); - onChanged(); - } else { - violationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder addViolations( - build.buf.validate.Violation.Builder builderForValue) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.add(builderForValue.build()); - onChanged(); - } else { - violationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder addViolations( - int index, build.buf.validate.Violation.Builder builderForValue) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.add(index, builderForValue.build()); - onChanged(); - } else { - violationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder addAllViolations( - java.lang.Iterable values) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, violations_); - onChanged(); - } else { - violationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder clearViolations() { - if (violationsBuilder_ == null) { - violations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - violationsBuilder_.clear(); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public Builder removeViolations(int index) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.remove(index); - onChanged(); - } else { - violationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public build.buf.validate.Violation.Builder getViolationsBuilder( - int index) { - return getViolationsFieldBuilder().getBuilder(index); - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public build.buf.validate.ViolationOrBuilder getViolationsOrBuilder( - int index) { - if (violationsBuilder_ == null) { - return violations_.get(index); } else { - return violationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public java.util.List - getViolationsOrBuilderList() { - if (violationsBuilder_ != null) { - return violationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(violations_); - } - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public build.buf.validate.Violation.Builder addViolationsBuilder() { - return getViolationsFieldBuilder().addBuilder( - build.buf.validate.Violation.getDefaultInstance()); - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public build.buf.validate.Violation.Builder addViolationsBuilder( - int index) { - return getViolationsFieldBuilder().addBuilder( - index, build.buf.validate.Violation.getDefaultInstance()); - } - /** - *
-     * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-     * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - public java.util.List - getViolationsBuilderList() { - return getViolationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Violation, build.buf.validate.Violation.Builder, build.buf.validate.ViolationOrBuilder> - getViolationsFieldBuilder() { - if (violationsBuilder_ == null) { - violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - build.buf.validate.Violation, build.buf.validate.Violation.Builder, build.buf.validate.ViolationOrBuilder>( - violations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - violations_ = null; - } - return violationsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:buf.validate.Violations) - } - - // @@protoc_insertion_point(class_scope:buf.validate.Violations) - private static final build.buf.validate.Violations DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new build.buf.validate.Violations(); - } - - public static build.buf.validate.Violations getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Violations 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.Violations getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/build/buf/validate/ViolationsOrBuilder.java b/src/main/java/build/buf/validate/ViolationsOrBuilder.java deleted file mode 100644 index 89cb7f8f..00000000 --- a/src/main/java/build/buf/validate/ViolationsOrBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: buf/validate/validate.proto -// Protobuf Java Version: 4.28.2 - -package build.buf.validate; - -public interface ViolationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:buf.validate.Violations) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - java.util.List - getViolationsList(); - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - build.buf.validate.Violation getViolations(int index); - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - int getViolationsCount(); - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - java.util.List - getViolationsOrBuilderList(); - /** - *
-   * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
-   * 
- * - * repeated .buf.validate.Violation violations = 1 [json_name = "violations"]; - */ - build.buf.validate.ViolationOrBuilder getViolationsOrBuilder( - int index); -} diff --git a/src/main/resources/buf/validate/validate.proto b/src/main/resources/buf/validate/validate.proto index 7236347a..8a0e0b44 100644 --- a/src/main/resources/buf/validate/validate.proto +++ b/src/main/resources/buf/validate/validate.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ option java_package = "build.buf.validate"; extend google.protobuf.MessageOptions { // Rules specify the validations to be performed on this message. By default, // no validation is performed against a message. - optional MessageConstraints message = 1159; + optional MessageRules message = 1159; } // OneofOptions is an extension to google.protobuf.OneofOptions. It allows @@ -42,7 +42,7 @@ extend google.protobuf.MessageOptions { extend google.protobuf.OneofOptions { // Rules specify the validations to be performed on this oneof. By default, // no validation is performed against a oneof. - optional OneofConstraints oneof = 1159; + optional OneofRules oneof = 1159; } // FieldOptions is an extension to google.protobuf.FieldOptions. It allows @@ -52,9 +52,9 @@ extend google.protobuf.OneofOptions { extend google.protobuf.FieldOptions { // Rules specify the validations to be performed on this field. By default, // no validation is performed against a field. - optional FieldConstraints field = 1159; + optional FieldRules field = 1159; - // Specifies predefined rules. When extending a standard constraint message, + // Specifies predefined rules. When extending a standard rule message, // this adds additional CEL expressions that apply when the extension is used. // // ```proto @@ -70,13 +70,13 @@ extend google.protobuf.FieldOptions { // int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; // } // ``` - optional PredefinedConstraints predefined = 1160; + optional PredefinedRules predefined = 1160; } -// `Constraint` represents a validation rule written in the Common Expression -// Language (CEL) syntax. Each Constraint includes a unique identifier, an +// `Rule` represents a validation rule written in the Common Expression +// Language (CEL) syntax. Each Rule includes a unique identifier, an // optional error message, and the CEL expression to evaluate. For more -// information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). +// information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). // // ```proto // message Foo { @@ -88,13 +88,13 @@ extend google.protobuf.FieldOptions { // int32 bar = 1; // } // ``` -message Constraint { - // `id` is a string that serves as a machine-readable name for this Constraint. +message Rule { + // `id` is a string that serves as a machine-readable name for this Rule. // It should be unique within its scope, which could be either a message or a field. optional string id = 1; // `message` is an optional field that provides a human-readable error message - // for this Constraint when the CEL expression evaluates to false. If a + // for this Rule when the CEL expression evaluates to false. If a // non-empty message is provided, any strings resulting from the CEL // expression evaluation are ignored. optional string message = 2; @@ -106,9 +106,9 @@ message Constraint { optional string expression = 3; } -// MessageConstraints represents validation rules that are applied to the entire message. -// It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules. -message MessageConstraints { +// MessageRules represents validation rules that are applied to the entire message. +// It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules. +message MessageRules { // `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message. // This includes any fields within the message that would otherwise support validation. // @@ -120,9 +120,9 @@ message MessageConstraints { // ``` optional bool disabled = 1; - // `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. - // These constraints are written in Common Expression Language (CEL) syntax. For more information on - // CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + // `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message. + // These rules are written in Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). // // // ```proto @@ -136,15 +136,60 @@ message MessageConstraints { // optional int32 foo = 1; // } // ``` - repeated Constraint cel = 3; + repeated Rule cel = 3; + + // `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields + // of which at most one can be present. If `required` is also specified, then exactly one + // of the specified fields _must_ be present. + // + // This will enforce oneof-like constraints with a few features not provided by + // actual Protobuf oneof declarations: + // 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof, + // only scalar fields are allowed. + // 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member + // fields have explicit presence. This means that, for the purpose of determining + // how many fields are set, explicitly setting such a field to its zero value is + // effectively the same as not setting it at all. + // 3. This will always generate validation errors for a message unmarshalled from + // serialized data that sets more than one field. With a Protobuf oneof, when + // multiple fields are present in the serialized form, earlier values are usually + // silently ignored when unmarshalling, with only the last field being set when + // unmarshalling completes. + // + // Note that adding a field to a `oneof` will also set the IGNORE_IF_UNPOPULATED on the fields. This means + // only the field that is set will be validated and the unset fields are not validated according to the field rules. + // This behavior can be overridden by setting `ignore` against a field. + // + // ```proto + // message MyMessage { + // // Only one of `field1` or `field2` _can_ be present in this message. + // option (buf.validate.message).oneof = { fields: ["field1", "field2"] }; + // // Exactly one of `field3` or `field4` _must_ be present in this message. + // option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true }; + // string field1 = 1; + // bytes field2 = 2; + // bool field3 = 3; + // int32 field4 = 4; + // } + // ``` + repeated MessageOneofRule oneof = 4; +} + +message MessageOneofRule { + // A list of field names to include in the oneof. All field names must be + // defined in the message. At least one field must be specified, and + // duplicates are not permitted. + repeated string fields = 1; + // If true, one of the fields specified _must_ be set. + optional bool required = 2; } -// The `OneofConstraints` message type enables you to manage constraints for +// The `OneofRules` message type enables you to manage rules for // oneof fields in your protobuf messages. -message OneofConstraints { +message OneofRules { // If `required` is true, exactly one field of the oneof must be present. A // validation error is returned if no fields in the oneof are present. The - // field itself may still be a default value; further constraints + // field itself may still be a default value; further rules // should be placed on the fields themselves to ensure they are valid values, // such as `min_len` or `gt`. // @@ -162,12 +207,12 @@ message OneofConstraints { optional bool required = 1; } -// FieldConstraints encapsulates the rules for each type of field. Depending on +// FieldRules encapsulates the rules for each type of field. Depending on // the field, the correct set should be used to ensure proper validations. -message FieldConstraints { +message FieldRules { // `cel` is a repeated field used to represent a textual expression - // in the Common Expression Language (CEL) syntax. For more information on - // CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + // in the Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). // // ```proto // message MyMessage { @@ -179,7 +224,7 @@ message FieldConstraints { // }]; // } // ``` - repeated Constraint cel = 23; + repeated Rule cel = 23; // If `required` is true, the field must be populated. A populated field can be // described as "serialized in the wire format," which includes: // @@ -190,6 +235,7 @@ message FieldConstraints { // - proto2 scalar fields (both optional and required) // - proto3 scalar fields must be non-zero to be considered populated // - repeated and map fields must be non-empty to be considered populated + // - map keys/values and repeated items are always considered populated // // ```proto // message MyMessage { @@ -242,18 +288,16 @@ message FieldConstraints { TimestampRules timestamp = 22; } - // DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1. - optional bool skipped = 24 [deprecated = true]; - // DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1. - optional bool ignore_empty = 26 [deprecated = true]; + reserved 24, 26; + reserved "skipped", "ignore_empty"; } -// PredefinedConstraints are custom constraints that can be re-used with +// PredefinedRules are custom rules that can be re-used with // multiple fields. -message PredefinedConstraints { +message PredefinedRules { // `cel` is a repeated field used to represent a textual expression - // in the Common Expression Language (CEL) syntax. For more information on - // CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + // in the Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/). // // ```proto // message MyMessage { @@ -265,15 +309,19 @@ message PredefinedConstraints { // }]; // } // ``` - repeated Constraint cel = 1; + repeated Rule cel = 1; + + reserved 24, 26; + reserved + "skipped" + "ignore_empty" +; } -// Specifies how FieldConstraints.ignore behaves. See the documentation for -// FieldConstraints.required for definitions of "populated" and "nullable". +// Specifies how FieldRules.ignore behaves. See the documentation for +// FieldRules.required for definitions of "populated" and "nullable". enum Ignore { - // buf:lint:ignore ENUM_NO_ALLOW_ALIAS // allowance for deprecations. TODO: remove pre-v1. - option allow_alias = true; - // Validation is only skipped if it's an unpopulated nullable fields. + // Validation is only skipped if it's an unpopulated nullable field. // // ```proto // syntax="proto3"; @@ -305,8 +353,7 @@ enum Ignore { IGNORE_UNSPECIFIED = 0; // Validation is skipped if the field is unpopulated. This rule is redundant - // if the field is already nullable. This value is equivalent behavior to the - // deprecated ignore_empty rule. + // if the field is already nullable. // // ```proto // syntax="proto3 @@ -404,7 +451,7 @@ enum Ignore { // The validation rules of this field will be skipped and not evaluated. This // is useful for situations that necessitate turning off the rules of a field // containing a message that may not make sense in the current context, or to - // temporarily disable constraints during development. + // temporarily disable rules during development. // // ```proto // message MyMessage { @@ -416,13 +463,13 @@ enum Ignore { // ``` IGNORE_ALWAYS = 3; - // Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1. - IGNORE_EMPTY = 1 [deprecated = true]; - // Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1. - IGNORE_DEFAULT = 2 [deprecated = true]; + reserved + "IGNORE_EMPTY" + "IGNORE_DEFAULT" +; } -// FloatRules describes the constraints applied to `float` values. These +// FloatRules describes the rules applied to `float` values. These // rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. message FloatRules { // `const` requires the field value to exactly match the specified value. If @@ -436,7 +483,7 @@ message FloatRules { // ``` optional float const = 1 [(predefined).cel = { id: "float.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { @@ -586,12 +633,12 @@ message FloatRules { // ```proto // message MyFloat { // // value must be in list [1.0, 2.0, 3.0] - // repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] }; + // float value = 1 [(buf.validate.field).float = { in: [1.0, 2.0, 3.0] }]; // } // ``` repeated float in = 6 [(predefined).cel = { id: "float.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `in` requires the field value to not be equal to any of the specified @@ -601,7 +648,7 @@ message FloatRules { // ```proto // message MyFloat { // // value must not be in list [1.0, 2.0, 3.0] - // repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }; + // float value = 1 [(buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }]; // } // ``` repeated float not_in = 7 [(predefined).cel = { @@ -617,14 +664,14 @@ message FloatRules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto // message MyFloat { // float value = 1 [ // (buf.validate.field).float.example = 1.0, - // (buf.validate.field).float.example = "Infinity" + // (buf.validate.field).float.example = inf // ]; // } // ``` @@ -634,8 +681,8 @@ message FloatRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -646,7 +693,7 @@ message FloatRules { extensions 1000 to max; } -// DoubleRules describes the constraints applied to `double` values. These +// DoubleRules describes the rules applied to `double` values. These // rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. message DoubleRules { // `const` requires the field value to exactly match the specified value. If @@ -660,7 +707,7 @@ message DoubleRules { // ``` optional double const = 1 [(predefined).cel = { id: "double.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -807,12 +854,12 @@ message DoubleRules { // ```proto // message MyDouble { // // value must be in list [1.0, 2.0, 3.0] - // repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] }; + // double value = 1 [(buf.validate.field).double = { in: [1.0, 2.0, 3.0] }]; // } // ``` repeated double in = 6 [(predefined).cel = { id: "double.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -822,7 +869,7 @@ message DoubleRules { // ```proto // message MyDouble { // // value must not be in list [1.0, 2.0, 3.0] - // repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }; + // double value = 1 [(buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }]; // } // ``` repeated double not_in = 7 [(predefined).cel = { @@ -838,14 +885,14 @@ message DoubleRules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto // message MyDouble { // double value = 1 [ // (buf.validate.field).double.example = 1.0, - // (buf.validate.field).double.example = "Infinity" + // (buf.validate.field).double.example = inf // ]; // } // ``` @@ -855,8 +902,8 @@ message DoubleRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -867,7 +914,7 @@ message DoubleRules { extensions 1000 to max; } -// Int32Rules describes the constraints applied to `int32` values. These +// Int32Rules describes the rules applied to `int32` values. These // rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. message Int32Rules { // `const` requires the field value to exactly match the specified value. If @@ -881,7 +928,7 @@ message Int32Rules { // ``` optional int32 const = 1 [(predefined).cel = { id: "int32.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field @@ -1029,12 +1076,12 @@ message Int32Rules { // ```proto // message MyInt32 { // // value must be in list [1, 2, 3] - // repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] }; + // int32 value = 1 [(buf.validate.field).int32 = { in: [1, 2, 3] }]; // } // ``` repeated int32 in = 6 [(predefined).cel = { id: "int32.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -1044,7 +1091,7 @@ message Int32Rules { // ```proto // message MyInt32 { // // value must not be in list [1, 2, 3] - // repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] }; + // int32 value = 1 [(buf.validate.field).int32 = { not_in: [1, 2, 3] }]; // } // ``` repeated int32 not_in = 7 [(predefined).cel = { @@ -1053,7 +1100,7 @@ message Int32Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -1070,8 +1117,8 @@ message Int32Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -1082,7 +1129,7 @@ message Int32Rules { extensions 1000 to max; } -// Int64Rules describes the constraints applied to `int64` values. These +// Int64Rules describes the rules applied to `int64` values. These // rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. message Int64Rules { // `const` requires the field value to exactly match the specified value. If @@ -1096,7 +1143,7 @@ message Int64Rules { // ``` optional int64 const = 1 [(predefined).cel = { id: "int64.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -1244,12 +1291,12 @@ message Int64Rules { // ```proto // message MyInt64 { // // value must be in list [1, 2, 3] - // repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] }; + // int64 value = 1 [(buf.validate.field).int64 = { in: [1, 2, 3] }]; // } // ``` repeated int64 in = 6 [(predefined).cel = { id: "int64.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -1259,7 +1306,7 @@ message Int64Rules { // ```proto // message MyInt64 { // // value must not be in list [1, 2, 3] - // repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] }; + // int64 value = 1 [(buf.validate.field).int64 = { not_in: [1, 2, 3] }]; // } // ``` repeated int64 not_in = 7 [(predefined).cel = { @@ -1268,7 +1315,7 @@ message Int64Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -1285,8 +1332,8 @@ message Int64Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -1297,7 +1344,7 @@ message Int64Rules { extensions 1000 to max; } -// UInt32Rules describes the constraints applied to `uint32` values. These +// UInt32Rules describes the rules applied to `uint32` values. These // rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. message UInt32Rules { // `const` requires the field value to exactly match the specified value. If @@ -1311,7 +1358,7 @@ message UInt32Rules { // ``` optional uint32 const = 1 [(predefined).cel = { id: "uint32.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -1459,12 +1506,12 @@ message UInt32Rules { // ```proto // message MyUInt32 { // // value must be in list [1, 2, 3] - // repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] }; + // uint32 value = 1 [(buf.validate.field).uint32 = { in: [1, 2, 3] }]; // } // ``` repeated uint32 in = 6 [(predefined).cel = { id: "uint32.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -1474,7 +1521,7 @@ message UInt32Rules { // ```proto // message MyUInt32 { // // value must not be in list [1, 2, 3] - // repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] }; + // uint32 value = 1 [(buf.validate.field).uint32 = { not_in: [1, 2, 3] }]; // } // ``` repeated uint32 not_in = 7 [(predefined).cel = { @@ -1483,7 +1530,7 @@ message UInt32Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -1500,8 +1547,8 @@ message UInt32Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -1512,7 +1559,7 @@ message UInt32Rules { extensions 1000 to max; } -// UInt64Rules describes the constraints applied to `uint64` values. These +// UInt64Rules describes the rules applied to `uint64` values. These // rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. message UInt64Rules { // `const` requires the field value to exactly match the specified value. If @@ -1526,7 +1573,7 @@ message UInt64Rules { // ``` optional uint64 const = 1 [(predefined).cel = { id: "uint64.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -1673,12 +1720,12 @@ message UInt64Rules { // ```proto // message MyUInt64 { // // value must be in list [1, 2, 3] - // repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] }; + // uint64 value = 1 [(buf.validate.field).uint64 = { in: [1, 2, 3] }]; // } // ``` repeated uint64 in = 6 [(predefined).cel = { id: "uint64.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -1688,7 +1735,7 @@ message UInt64Rules { // ```proto // message MyUInt64 { // // value must not be in list [1, 2, 3] - // repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] }; + // uint64 value = 1 [(buf.validate.field).uint64 = { not_in: [1, 2, 3] }]; // } // ``` repeated uint64 not_in = 7 [(predefined).cel = { @@ -1697,7 +1744,7 @@ message UInt64Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -1714,8 +1761,8 @@ message UInt64Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -1726,7 +1773,7 @@ message UInt64Rules { extensions 1000 to max; } -// SInt32Rules describes the constraints applied to `sint32` values. +// SInt32Rules describes the rules applied to `sint32` values. message SInt32Rules { // `const` requires the field value to exactly match the specified value. If // the field value doesn't match, an error message is generated. @@ -1739,7 +1786,7 @@ message SInt32Rules { // ``` optional sint32 const = 1 [(predefined).cel = { id: "sint32.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field @@ -1887,12 +1934,12 @@ message SInt32Rules { // ```proto // message MySInt32 { // // value must be in list [1, 2, 3] - // repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] }; + // sint32 value = 1 [(buf.validate.field).sint32 = { in: [1, 2, 3] }]; // } // ``` repeated sint32 in = 6 [(predefined).cel = { id: "sint32.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -1902,7 +1949,7 @@ message SInt32Rules { // ```proto // message MySInt32 { // // value must not be in list [1, 2, 3] - // repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] }; + // sint32 value = 1 [(buf.validate.field).sint32 = { not_in: [1, 2, 3] }]; // } // ``` repeated sint32 not_in = 7 [(predefined).cel = { @@ -1911,7 +1958,7 @@ message SInt32Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -1928,8 +1975,8 @@ message SInt32Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -1940,7 +1987,7 @@ message SInt32Rules { extensions 1000 to max; } -// SInt64Rules describes the constraints applied to `sint64` values. +// SInt64Rules describes the rules applied to `sint64` values. message SInt64Rules { // `const` requires the field value to exactly match the specified value. If // the field value doesn't match, an error message is generated. @@ -1953,7 +2000,7 @@ message SInt64Rules { // ``` optional sint64 const = 1 [(predefined).cel = { id: "sint64.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field @@ -2101,12 +2148,12 @@ message SInt64Rules { // ```proto // message MySInt64 { // // value must be in list [1, 2, 3] - // repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] }; + // sint64 value = 1 [(buf.validate.field).sint64 = { in: [1, 2, 3] }]; // } // ``` repeated sint64 in = 6 [(predefined).cel = { id: "sint64.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -2116,7 +2163,7 @@ message SInt64Rules { // ```proto // message MySInt64 { // // value must not be in list [1, 2, 3] - // repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] }; + // sint64 value = 1 [(buf.validate.field).sint64 = { not_in: [1, 2, 3] }]; // } // ``` repeated sint64 not_in = 7 [(predefined).cel = { @@ -2125,7 +2172,7 @@ message SInt64Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -2142,8 +2189,8 @@ message SInt64Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -2154,7 +2201,7 @@ message SInt64Rules { extensions 1000 to max; } -// Fixed32Rules describes the constraints applied to `fixed32` values. +// Fixed32Rules describes the rules applied to `fixed32` values. message Fixed32Rules { // `const` requires the field value to exactly match the specified value. // If the field value doesn't match, an error message is generated. @@ -2167,7 +2214,7 @@ message Fixed32Rules { // ``` optional fixed32 const = 1 [(predefined).cel = { id: "fixed32.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -2315,12 +2362,12 @@ message Fixed32Rules { // ```proto // message MyFixed32 { // // value must be in list [1, 2, 3] - // repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] }; + // fixed32 value = 1 [(buf.validate.field).fixed32 = { in: [1, 2, 3] }]; // } // ``` repeated fixed32 in = 6 [(predefined).cel = { id: "fixed32.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -2330,7 +2377,7 @@ message Fixed32Rules { // ```proto // message MyFixed32 { // // value must not be in list [1, 2, 3] - // repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] }; + // fixed32 value = 1 [(buf.validate.field).fixed32 = { not_in: [1, 2, 3] }]; // } // ``` repeated fixed32 not_in = 7 [(predefined).cel = { @@ -2339,7 +2386,7 @@ message Fixed32Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -2356,8 +2403,8 @@ message Fixed32Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -2368,7 +2415,7 @@ message Fixed32Rules { extensions 1000 to max; } -// Fixed64Rules describes the constraints applied to `fixed64` values. +// Fixed64Rules describes the rules applied to `fixed64` values. message Fixed64Rules { // `const` requires the field value to exactly match the specified value. If // the field value doesn't match, an error message is generated. @@ -2381,7 +2428,7 @@ message Fixed64Rules { // ``` optional fixed64 const = 1 [(predefined).cel = { id: "fixed64.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -2529,12 +2576,12 @@ message Fixed64Rules { // ```proto // message MyFixed64 { // // value must be in list [1, 2, 3] - // repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] }; + // fixed64 value = 1 [(buf.validate.field).fixed64 = { in: [1, 2, 3] }]; // } // ``` repeated fixed64 in = 6 [(predefined).cel = { id: "fixed64.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -2544,7 +2591,7 @@ message Fixed64Rules { // ```proto // message MyFixed64 { // // value must not be in list [1, 2, 3] - // repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] }; + // fixed64 value = 1 [(buf.validate.field).fixed64 = { not_in: [1, 2, 3] }]; // } // ``` repeated fixed64 not_in = 7 [(predefined).cel = { @@ -2553,7 +2600,7 @@ message Fixed64Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -2570,8 +2617,8 @@ message Fixed64Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -2582,7 +2629,7 @@ message Fixed64Rules { extensions 1000 to max; } -// SFixed32Rules describes the constraints applied to `fixed32` values. +// SFixed32Rules describes the rules applied to `fixed32` values. message SFixed32Rules { // `const` requires the field value to exactly match the specified value. If // the field value doesn't match, an error message is generated. @@ -2595,7 +2642,7 @@ message SFixed32Rules { // ``` optional sfixed32 const = 1 [(predefined).cel = { id: "sfixed32.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -2743,12 +2790,12 @@ message SFixed32Rules { // ```proto // message MySFixed32 { // // value must be in list [1, 2, 3] - // repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] }; + // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { in: [1, 2, 3] }]; // } // ``` repeated sfixed32 in = 6 [(predefined).cel = { id: "sfixed32.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -2758,7 +2805,7 @@ message SFixed32Rules { // ```proto // message MySFixed32 { // // value must not be in list [1, 2, 3] - // repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }; + // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }]; // } // ``` repeated sfixed32 not_in = 7 [(predefined).cel = { @@ -2767,7 +2814,7 @@ message SFixed32Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -2784,8 +2831,8 @@ message SFixed32Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -2796,7 +2843,7 @@ message SFixed32Rules { extensions 1000 to max; } -// SFixed64Rules describes the constraints applied to `fixed64` values. +// SFixed64Rules describes the rules applied to `fixed64` values. message SFixed64Rules { // `const` requires the field value to exactly match the specified value. If // the field value doesn't match, an error message is generated. @@ -2809,7 +2856,7 @@ message SFixed64Rules { // ``` optional sfixed64 const = 1 [(predefined).cel = { id: "sfixed64.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` requires the field value to be less than the specified value (field < @@ -2957,12 +3004,12 @@ message SFixed64Rules { // ```proto // message MySFixed64 { // // value must be in list [1, 2, 3] - // repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] }; + // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { in: [1, 2, 3] }]; // } // ``` repeated sfixed64 in = 6 [(predefined).cel = { id: "sfixed64.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to not be equal to any of the specified @@ -2972,7 +3019,7 @@ message SFixed64Rules { // ```proto // message MySFixed64 { // // value must not be in list [1, 2, 3] - // repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }; + // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }]; // } // ``` repeated sfixed64 not_in = 7 [(predefined).cel = { @@ -2981,7 +3028,7 @@ message SFixed64Rules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -2998,8 +3045,8 @@ message SFixed64Rules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -3010,7 +3057,7 @@ message SFixed64Rules { extensions 1000 to max; } -// BoolRules describes the constraints applied to `bool` values. These rules +// BoolRules describes the rules applied to `bool` values. These rules // may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. message BoolRules { // `const` requires the field value to exactly match the specified boolean value. @@ -3024,11 +3071,11 @@ message BoolRules { // ``` optional bool const = 1 [(predefined).cel = { id: "bool.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -3045,8 +3092,8 @@ message BoolRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -3057,7 +3104,7 @@ message BoolRules { extensions 1000 to max; } -// StringRules describes the constraints applied to `string` values These +// StringRules describes the rules applied to `string` values These // rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. message StringRules { // `const` requires the field value to exactly match the specified value. If @@ -3071,7 +3118,7 @@ message StringRules { // ``` optional string const = 1 [(predefined).cel = { id: "string.const" - expression: "this != rules.const ? 'value must equal `%s`'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal `%s`'.format([getField(rules, 'const')]) : ''" }]; // `len` dictates that the field value must have the specified @@ -3252,12 +3299,12 @@ message StringRules { // ```proto // message MyString { // // value must be in list ["apple", "banana"] - // repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + // string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; // } // ``` repeated string in = 10 [(predefined).cel = { id: "string.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` specifies that the field value cannot be equal to any @@ -3266,7 +3313,7 @@ message StringRules { // ```proto // message MyString { // // value must not be in list ["orange", "grape"] - // repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + // string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; // } // ``` repeated string not_in = 11 [(predefined).cel = { @@ -3274,11 +3321,17 @@ message StringRules { expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }]; - // `WellKnown` rules provide advanced constraints against common string - // patterns + // `WellKnown` rules provide advanced rules against common string + // patterns. oneof well_known { - // `email` specifies that the field value must be a valid email address - // (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1). + // `email` specifies that the field value must be a valid email address, for + // example "foo@example.com". + // + // Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address). + // Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), + // which allows many unexpected forms of email addresses and will easily match + // a typographical error. + // // If the field value isn't a valid email address, an error message will be generated. // // ```proto @@ -3300,10 +3353,18 @@ message StringRules { } ]; - // `hostname` specifies that the field value must be a valid - // hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support - // internationalized domain names (IDNs). If the field value isn't a - // valid hostname, an error message will be generated. + // `hostname` specifies that the field value must be a valid hostname, for + // example "foo.example.com". + // + // A valid hostname follows the rules below: + // - The name consists of one or more labels, separated by a dot ("."). + // - Each label can be 1 to 63 alphanumeric characters. + // - A label can contain hyphens ("-"), but must not start or end with a hyphen. + // - The right-most label must not be digits only. + // - The name can have a trailing dot—for example, "foo.example.com.". + // - The name can be 253 characters at most, excluding the optional trailing dot. + // + // If the field value isn't a valid hostname, an error message will be generated. // // ```proto // message MyString { @@ -3324,8 +3385,15 @@ message StringRules { } ]; - // `ip` specifies that the field value must be a valid IP - // (v4 or v6) address, without surrounding square brackets for IPv6 addresses. + // `ip` specifies that the field value must be a valid IP (v4 or v6) address. + // + // IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". + // IPv6 addresses are expected in their text representation—for example, "::1", + // or "2001:0DB8:ABCD:0012::0". + // + // Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + // Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported. + // // If the field value isn't a valid IP address, an error message will be // generated. // @@ -3348,9 +3416,9 @@ message StringRules { } ]; - // `ipv4` specifies that the field value must be a valid IPv4 - // address. If the field value isn't a valid IPv4 address, an error message - // will be generated. + // `ipv4` specifies that the field value must be a valid IPv4 address—for + // example "192.168.5.21". If the field value isn't a valid IPv4 address, an + // error message will be generated. // // ```proto // message MyString { @@ -3371,9 +3439,9 @@ message StringRules { } ]; - // `ipv6` specifies that the field value must be a valid - // IPv6 address, without surrounding square brackets. If the field value is - // not a valid IPv6 address, an error message will be generated. + // `ipv6` specifies that the field value must be a valid IPv6 address—for + // example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field + // value is not a valid IPv6 address, an error message will be generated. // // ```proto // message MyString { @@ -3394,9 +3462,13 @@ message StringRules { } ]; - // `uri` specifies that the field value must be a valid, - // absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid, - // absolute URI, an error message will be generated. + // `uri` specifies that the field value must be a valid URI, for example + // "https://example.com/foo/bar?baz=quux#frag". + // + // URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + // Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + // + // If the field value isn't a valid URI, an error message will be generated. // // ```proto // message MyString { @@ -3417,27 +3489,33 @@ message StringRules { } ]; - // `uri_ref` specifies that the field value must be a valid URI - // as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the - // field value isn't a valid URI, an error message will be generated. + // `uri_ref` specifies that the field value must be a valid URI Reference—either + // a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative + // Reference such as "./foo/bar?query". + // + // URI, URI Reference, and Relative Reference are defined in the internet + // standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone + // Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + // + // If the field value isn't a valid URI Reference, an error message will be + // generated. // // ```proto // message MyString { - // // value must be a valid URI + // // value must be a valid URI Reference // string value = 1 [(buf.validate.field).string.uri_ref = true]; // } // ``` bool uri_ref = 18 [(predefined).cel = { id: "string.uri_ref" - message: "value must be a valid URI" + message: "value must be a valid URI Reference" expression: "!rules.uri_ref || this.isUriRef()" }]; // `address` specifies that the field value must be either a valid hostname - // as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) - // (which doesn't support internationalized domain names or IDNs) or a valid - // IP (v4 or v6). If the field value isn't a valid hostname or IP, an error - // message will be generated. + // (for example, "example.com"), or a valid IP (v4 or v6) address (for example, + // "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, + // an error message will be generated. // // ```proto // message MyString { @@ -3459,7 +3537,7 @@ message StringRules { ]; // `uuid` specifies that the field value must be a valid UUID as defined by - // [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the + // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the // field value isn't a valid UUID, an error message will be generated. // // ```proto @@ -3482,7 +3560,7 @@ message StringRules { ]; // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as - // defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes + // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes // omitted. If the field value isn't a valid UUID without dashes, an error message // will be generated. // @@ -3505,10 +3583,10 @@ message StringRules { } ]; - // `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6) - // address with prefix length. If the field value isn't a valid IP with prefix - // length, an error message will be generated. - // + // `ip_with_prefixlen` specifies that the field value must be a valid IP + // (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or + // "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with + // prefix length, an error message will be generated. // // ```proto // message MyString { @@ -3530,9 +3608,9 @@ message StringRules { ]; // `ipv4_with_prefixlen` specifies that the field value must be a valid - // IPv4 address with prefix. - // If the field value isn't a valid IPv4 address with prefix length, - // an error message will be generated. + // IPv4 address with prefix length—for example, "192.168.5.21/16". If the + // field value isn't a valid IPv4 address with prefix length, an error + // message will be generated. // // ```proto // message MyString { @@ -3554,7 +3632,7 @@ message StringRules { ]; // `ipv6_with_prefixlen` specifies that the field value must be a valid - // IPv6 address with prefix length. + // IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". // If the field value is not a valid IPv6 address with prefix length, // an error message will be generated. // @@ -3577,10 +3655,15 @@ message StringRules { } ]; - // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix. + // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) + // prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + // prefix, and the remaining 64 bits must be zero. + // // If the field value isn't a valid IP prefix, an error message will be - // generated. The prefix must have all zeros for the masked bits of the prefix (e.g., - // `127.0.0.0/16`, not `127.0.0.1/16`). + // generated. // // ```proto // message MyString { @@ -3602,9 +3685,14 @@ message StringRules { ]; // `ipv4_prefix` specifies that the field value must be a valid IPv4 - // prefix. If the field value isn't a valid IPv4 prefix, an error message - // will be generated. The prefix must have all zeros for the masked bits of - // the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`). + // prefix, for example "192.168.0.0/16". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "192.168.0.0/16" designates the left-most 16 bits for the prefix, + // and the remaining 16 bits must be zero. + // + // If the field value isn't a valid IPv4 prefix, an error message + // will be generated. // // ```proto // message MyString { @@ -3625,10 +3713,15 @@ message StringRules { } ]; - // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix. + // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for + // example, "2001:0DB8:ABCD:0012::0/64". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + // prefix, and the remaining 64 bits must be zero. + // // If the field value is not a valid IPv6 prefix, an error message will be - // generated. The prefix must have all zeros for the masked bits of the prefix - // (e.g., `2001:db8::/48`, not `2001:db8::1/48`). + // generated. // // ```proto // message MyString { @@ -3649,10 +3742,16 @@ message StringRules { } ]; - // `host_and_port` specifies the field value must be a valid host and port - // pair. The host must be a valid hostname or IP address while the port - // must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited - // with square brackets (e.g., `[::1]:1234`). + // `host_and_port` specifies that the field value must be valid host/port + // pair—for example, "example.com:8080". + // + // The host can be one of: + //- An IPv4 address in dotted decimal format—for example, "192.168.5.21". + //- An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]". + //- A hostname—for example, "example.com". + // + // The port is separated by a colon. It must be non-empty, with a decimal number + // in the range of 0-65535, inclusive. bool host_and_port = 32 [ (predefined).cel = { id: "string.host_and_port" @@ -3684,8 +3783,8 @@ message StringRules { // | Name | Number | Description | // |-------------------------------|--------|-------------------------------------------| // | KNOWN_REGEX_UNSPECIFIED | 0 | | - // | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) | - // | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | + // | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) | + // | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) | KnownRegex well_known_regex = 24 [ (predefined).cel = { id: "string.well_known_regex.header_name" @@ -3713,7 +3812,7 @@ message StringRules { // This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to // enable strict header validation. By default, this is true, and HTTP header - // validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser + // validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser // validations that only disallow `\r\n\0` characters, which can be used to // bypass header matching rules. // @@ -3726,14 +3825,14 @@ message StringRules { optional bool strict = 25; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto // message MyString { // string value = 1 [ - // (buf.validate.field).string.example = 1, - // (buf.validate.field).string.example = 2 + // (buf.validate.field).string.example = "hello", + // (buf.validate.field).string.example = "world" // ]; // } // ``` @@ -3743,8 +3842,8 @@ message StringRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -3755,18 +3854,18 @@ message StringRules { extensions 1000 to max; } -// WellKnownRegex contain some well-known patterns. +// KnownRegex contains some well-known patterns. enum KnownRegex { KNOWN_REGEX_UNSPECIFIED = 0; - // HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). + // HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2). KNOWN_REGEX_HTTP_HEADER_NAME = 1; - // HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). + // HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4). KNOWN_REGEX_HTTP_HEADER_VALUE = 2; } -// BytesRules describe the constraints applied to `bytes` values. These rules +// BytesRules describe the rules applied to `bytes` values. These rules // may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. message BytesRules { // `const` requires the field value to exactly match the specified bytes @@ -3780,7 +3879,7 @@ message BytesRules { // ``` optional bytes const = 1 [(predefined).cel = { id: "bytes.const" - expression: "this != rules.const ? 'value must be %x'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must be %x'.format([getField(rules, 'const')]) : ''" }]; // `len` requires the field value to have the specified length in bytes. @@ -3901,7 +4000,7 @@ message BytesRules { // ``` repeated bytes in = 8 [(predefined).cel = { id: "bytes.in" - expression: "dyn(rules)['in'].size() > 0 && !(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "getField(rules, 'in').size() > 0 && !(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to be not equal to any of the specified @@ -3920,11 +4019,11 @@ message BytesRules { expression: "this in rules.not_in ? 'value must not be in list %s'.format([rules.not_in]) : ''" }]; - // WellKnown rules provide advanced constraints against common byte + // WellKnown rules provide advanced rules against common byte // patterns oneof well_known { // `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. - // If the field value doesn't meet this constraint, an error message is generated. + // If the field value doesn't meet this rule, an error message is generated. // // ```proto // message MyBytes { @@ -3946,7 +4045,7 @@ message BytesRules { ]; // `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. - // If the field value doesn't meet this constraint, an error message is generated. + // If the field value doesn't meet this rule, an error message is generated. // // ```proto // message MyBytes { @@ -3968,7 +4067,7 @@ message BytesRules { ]; // `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. - // If the field value doesn't meet this constraint, an error message is generated. + // If the field value doesn't meet this rule, an error message is generated. // ```proto // message MyBytes { // // value must be a valid IPv6 address @@ -3990,7 +4089,7 @@ message BytesRules { } // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -4007,8 +4106,8 @@ message BytesRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -4019,7 +4118,7 @@ message BytesRules { extensions 1000 to max; } -// EnumRules describe the constraints applied to `enum` values. +// EnumRules describe the rules applied to `enum` values. message EnumRules { // `const` requires the field value to exactly match the specified enum value. // If the field value doesn't match, an error message is generated. @@ -4038,7 +4137,7 @@ message EnumRules { // ``` optional int32 const = 1 [(predefined).cel = { id: "enum.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; // `defined_only` requires the field value to be one of the defined values for @@ -4076,7 +4175,7 @@ message EnumRules { // ``` repeated int32 in = 3 [(predefined).cel = { id: "enum.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` requires the field value to be not equal to any of the @@ -4101,7 +4200,7 @@ message EnumRules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -4122,8 +4221,8 @@ message EnumRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -4134,7 +4233,7 @@ message EnumRules { extensions 1000 to max; } -// RepeatedRules describe the constraints applied to `repeated` values. +// RepeatedRules describe the rules applied to `repeated` values. message RepeatedRules { // `min_items` requires that this field must contain at least the specified // minimum number of items. @@ -4169,7 +4268,7 @@ message RepeatedRules { }]; // `unique` indicates that all elements in this field must - // be unique. This constraint is strictly applicable to scalar and enum + // be unique. This rule is strictly applicable to scalar and enum // types, with message types not being supported. // // ```proto @@ -4184,13 +4283,16 @@ message RepeatedRules { expression: "!rules.unique || this.unique()" }]; - // `items` details the constraints to be applied to each item + // `items` details the rules to be applied to each item // in the field. Even for repeated message fields, validation is executed // against each item unless skip is explicitly specified. // + // Note that repeated items are always considered populated. The `required` + // rule does not apply. + // // ```proto // message MyRepeated { - // // The items in the field `value` must follow the specified constraints. + // // The items in the field `value` must follow the specified rules. // repeated string value = 1 [(buf.validate.field).repeated.items = { // string: { // min_len: 3 @@ -4199,11 +4301,11 @@ message RepeatedRules { // }]; // } // ``` - optional FieldConstraints items = 4; + optional FieldRules items = 4; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -4214,7 +4316,7 @@ message RepeatedRules { extensions 1000 to max; } -// MapRules describe the constraints applied to `map` values. +// MapRules describe the rules applied to `map` values. message MapRules { //Specifies the minimum number of key-value pairs allowed. If the field has // fewer key-value pairs than specified, an error message is generated. @@ -4244,11 +4346,14 @@ message MapRules { expression: "uint(this.size()) > rules.max_pairs ? 'map must be at most %d entries'.format([rules.max_pairs]) : ''" }]; - //Specifies the constraints to be applied to each key in the field. + //Specifies the rules to be applied to each key in the field. + // + // Note that map keys are always considered populated. The `required` + // rule does not apply. // // ```proto // message MyMap { - // // The keys in the field `value` must follow the specified constraints. + // // The keys in the field `value` must follow the specified rules. // map value = 1 [(buf.validate.field).map.keys = { // string: { // min_len: 3 @@ -4257,15 +4362,18 @@ message MapRules { // }]; // } // ``` - optional FieldConstraints keys = 4; + optional FieldRules keys = 4; - //Specifies the constraints to be applied to the value of each key in the + //Specifies the rules to be applied to the value of each key in the // field. Message values will still have their validations evaluated unless //skip is specified here. // + // Note that map values are always considered populated. The `required` + // rule does not apply. + // // ```proto // message MyMap { - // // The values in the field `value` must follow the specified constraints. + // // The values in the field `value` must follow the specified rules. // map value = 1 [(buf.validate.field).map.values = { // string: { // min_len: 5 @@ -4274,11 +4382,11 @@ message MapRules { // }]; // } // ``` - optional FieldConstraints values = 5; + optional FieldRules values = 5; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -4289,7 +4397,7 @@ message MapRules { extensions 1000 to max; } -// AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type. +// AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type. message AnyRules { // `in` requires the field's `type_url` to be equal to one of the //specified values. If it doesn't match any of the specified values, an error @@ -4298,7 +4406,9 @@ message AnyRules { // ```proto // message MyAny { // // The `value` field must have a `type_url` equal to one of the specified values. - // google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; + // google.protobuf.Any value = 1 [(buf.validate.field).any = { + // in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"] + // }]; // } // ``` repeated string in = 2; @@ -4307,14 +4417,16 @@ message AnyRules { // // ```proto // message MyAny { - // // The field `value` must not have a `type_url` equal to any of the specified values. - // google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; + // // The `value` field must not have a `type_url` equal to any of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any = { + // not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"] + // }]; // } // ``` repeated string not_in = 3; } -// DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type. +// DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type. message DurationRules { // `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. // If the field's value deviates from the specified value, an error message @@ -4328,7 +4440,7 @@ message DurationRules { // ``` optional google.protobuf.Duration const = 2 [(predefined).cel = { id: "duration.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, @@ -4481,7 +4593,7 @@ message DurationRules { // ``` repeated google.protobuf.Duration in = 7 [(predefined).cel = { id: "duration.in" - expression: "!(this in dyn(rules)['in']) ? 'value must be in list %s'.format([dyn(rules)['in']]) : ''" + expression: "!(this in getField(rules, 'in')) ? 'value must be in list %s'.format([getField(rules, 'in')]) : ''" }]; // `not_in` denotes that the field must not be equal to @@ -4501,7 +4613,7 @@ message DurationRules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -4518,8 +4630,8 @@ message DurationRules { }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -4530,7 +4642,7 @@ message DurationRules { extensions 1000 to max; } -// TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type. +// TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type. message TimestampRules { // `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. // @@ -4542,7 +4654,7 @@ message TimestampRules { // ``` optional google.protobuf.Timestamp const = 2 [(predefined).cel = { id: "timestamp.const" - expression: "this != rules.const ? 'value must equal %s'.format([rules.const]) : ''" + expression: "this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''" }]; oneof less_than { // requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. @@ -4719,7 +4831,7 @@ message TimestampRules { }]; // `example` specifies values that the field may have. These values SHOULD - // conform to other constraints. `example` values will not impact validation + // conform to other rules. `example` values will not impact validation // but may be used as helpful guidance on how to populate the given field. // // ```proto @@ -4730,15 +4842,14 @@ message TimestampRules { // ]; // } // ``` - repeated google.protobuf.Timestamp example = 10 [(predefined).cel = { id: "timestamp.example" expression: "true" }]; // Extension fields in this range that have the (buf.validate.predefined) - // option set will be treated as predefined field constraints that can then be - // set on the field options of other fields to apply field constraints. + // option set will be treated as predefined field rules that can then be + // set on the field options of other fields to apply field rules. // Extension numbers 1000 to 99999 are reserved for extension numbers that are // defined in the [Protobuf Global Extension Registry][1]. Extension numbers // above this range are reserved for extension numbers that are not explicitly @@ -4750,7 +4861,7 @@ message TimestampRules { } // `Violations` is a collection of `Violation` messages. This message type is returned by -// protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules. +// Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules. // Each individual violation is represented by a `Violation` message. message Violations { // `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. @@ -4758,30 +4869,173 @@ message Violations { } // `Violation` represents a single instance where a validation rule, expressed -// as a `Constraint`, was not met. It provides information about the field that -// caused the violation, the specific constraint that wasn't fulfilled, and a +// as a `Rule`, was not met. It provides information about the field that +// caused the violation, the specific rule that wasn't fulfilled, and a // human-readable error message. // +// For example, consider the following message: +// +// ```proto +// message User { +// int32 age = 1 [(buf.validate.field).cel = { +// id: "user.age", +// expression: "this < 18 ? 'User must be at least 18 years old' : ''", +// }]; +// } +// ``` +// +// It could produce the following violation: +// // ```json // { -// "fieldPath": "bar", -// "constraintId": "foo.bar", -// "message": "bar must be greater than 0" +// "ruleId": "user.age", +// "message": "User must be at least 18 years old", +// "field": { +// "elements": [ +// { +// "fieldNumber": 1, +// "fieldName": "age", +// "fieldType": "TYPE_INT32" +// } +// ] +// }, +// "rule": { +// "elements": [ +// { +// "fieldNumber": 23, +// "fieldName": "cel", +// "fieldType": "TYPE_MESSAGE", +// "index": "0" +// } +// ] +// } // } // ``` message Violation { - // `field_path` is a machine-readable identifier that points to the specific field that failed the validation. + // `field` is a machine-readable path to the field that failed validation. // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. - optional string field_path = 1; + // + // For example, consider the following message: + // + // ```proto + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // } + // ``` + // + // It could produce the following violation: + // + // ```textproto + // violation { + // field { element { field_number: 1, field_name: "a", field_type: 8 } } + // ... + // } + // ``` + optional FieldPath field = 5; - // `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. - // This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. - optional string constraint_id = 2; + // `rule` is a machine-readable path that points to the specific rule that failed validation. + // This will be a nested field starting from the FieldRules of the field that failed validation. + // For custom rules, this will provide the path of the rule, e.g. `cel[0]`. + // + // For example, consider the following message: + // + // ```proto + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // bool b = 2 [(buf.validate.field).cel = { + // id: "custom_rule", + // expression: "!this ? 'b must be true': ''" + // }] + // } + // ``` + // + // It could produce the following violations: + // + // ```textproto + // violation { + // rule { element { field_number: 25, field_name: "required", field_type: 8 } } + // ... + // } + // violation { + // rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } + // ... + // } + // ``` + optional FieldPath rule = 6; + + // `rule_id` is the unique identifier of the `Rule` that was not fulfilled. + // This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated. + optional string rule_id = 2; // `message` is a human-readable error message that describes the nature of the violation. - // This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. + // This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation. optional string message = 3; // `for_key` indicates whether the violation was caused by a map key, rather than a value. optional bool for_key = 4; + + reserved 1; + reserved "field_path"; +} + +// `FieldPath` provides a path to a nested protobuf field. +// +// This message provides enough information to render a dotted field path even without protobuf descriptors. +// It also provides enough information to resolve a nested field through unknown wire data. +message FieldPath { + // `elements` contains each element of the path, starting from the root and recursing downward. + repeated FieldPathElement elements = 1; +} + +// `FieldPathElement` provides enough information to nest through a single protobuf field. +// +// If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. +// A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. +// The `field_type` field allows unambiguous resolution of a field even if descriptors are not available. +message FieldPathElement { + // `field_number` is the field number this path element refers to. + optional int32 field_number = 1; + + // `field_name` contains the field name this path element refers to. + // This can be used to display a human-readable path even if the field number is unknown. + optional string field_name = 2; + + // `field_type` specifies the type of this field. When using reflection, this value is not needed. + // + // This value is provided to make it possible to traverse unknown fields through wire data. + // When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. + // + // [1]: https://protobuf.dev/programming-guides/encoding/#packed + // [2]: https://protobuf.dev/programming-guides/encoding/#groups + // + // N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and + // can be explicitly used in Protocol Buffers 2023 Edition. + optional google.protobuf.FieldDescriptorProto.Type field_type = 3; + + // `key_type` specifies the map key type of this field. This value is useful when traversing + // unknown fields through wire data: specifically, it allows handling the differences between + // different integer encodings. + optional google.protobuf.FieldDescriptorProto.Type key_type = 4; + + // `value_type` specifies map value type of this field. This is useful if you want to display a + // value inside unknown fields through wire data. + optional google.protobuf.FieldDescriptorProto.Type value_type = 5; + + // `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. + oneof subscript { + // `index` specifies a 0-based index into a repeated field. + uint64 index = 6; + + // `bool_key` specifies a map key of type bool. + bool bool_key = 7; + + // `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. + int64 int_key = 8; + + // `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. + uint64 uint_key = 9; + + // `string_key` specifies a map key of type string. + string string_key = 10; + } } diff --git a/src/test/java/build/buf/protovalidate/CustomOverloadTest.java b/src/test/java/build/buf/protovalidate/CustomOverloadTest.java new file mode 100644 index 00000000..67fcb7d9 --- /dev/null +++ b/src/test/java/build/buf/protovalidate/CustomOverloadTest.java @@ -0,0 +1,187 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +import dev.cel.bundle.Cel; +import dev.cel.bundle.CelFactory; +import dev.cel.common.CelAbstractSyntaxTree; +import dev.cel.common.CelValidationException; +import dev.cel.common.CelValidationResult; +import dev.cel.runtime.CelEvaluationException; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class CustomOverloadTest { + + private final ValidateLibrary validateLibrary = new ValidateLibrary(); + private final Cel cel = + CelFactory.standardCelBuilder() + .addCompilerLibraries(validateLibrary) + .addRuntimeLibraries(validateLibrary) + .build(); + + @Test + public void testIsInf() throws Exception { + assertThat(evalToBool("0.0.isInf()")).isFalse(); + assertThat(evalToBool("(1.0/0.0).isInf()")).isTrue(); + assertThat(evalToBool("(1.0/0.0).isInf(0)")).isTrue(); + assertThat(evalToBool("(1.0/0.0).isInf(1)")).isTrue(); + assertThat(evalToBool("(1.0/0.0).isInf(-1)")).isFalse(); + assertThat(evalToBool("(-1.0/0.0).isInf()")).isTrue(); + assertThat(evalToBool("(-1.0/0.0).isInf(0)")).isTrue(); + assertThat(evalToBool("(-1.0/0.0).isInf(1)")).isFalse(); + assertThat(evalToBool("(-1.0/0.0).isInf(-1)")).isTrue(); + } + + @Test + public void testIsInfUnsupported() { + for (String testCase : Arrays.asList("'abc'.isInf()", "0.0.isInf('abc')")) { + assertThatThrownBy(() -> evalToBool(testCase)).isInstanceOf(CelValidationException.class); + } + } + + @Test + public void testIsNan() throws Exception { + assertThat(evalToBool("0.0.isNan()")).isFalse(); + assertThat(evalToBool("(0.0/0.0).isNan()")).isTrue(); + assertThat(evalToBool("(1.0/0.0).isNan()")).isFalse(); + } + + @Test + public void testIsNanUnsupported() { + for (String testCase : Collections.singletonList("'foo'.isNan()")) { + assertThatThrownBy(() -> evalToBool(testCase)).isInstanceOf(CelValidationException.class); + } + } + + @Test + public void testUnique() throws Exception { + assertThat(evalToBool("[].unique()")).isTrue(); + assertThat(evalToBool("[true].unique()")).isTrue(); + assertThat(evalToBool("[true, false].unique()")).isTrue(); + assertThat(evalToBool("[true, true].unique()")).isFalse(); + assertThat(evalToBool("[1, 2, 3].unique()")).isTrue(); + assertThat(evalToBool("[1, 2, 1].unique()")).isFalse(); + assertThat(evalToBool("[1u, 2u, 3u].unique()")).isTrue(); + assertThat(evalToBool("[1u, 2u, 2u].unique()")).isFalse(); + assertThat(evalToBool("[1.0, 2.0, 3.0].unique()")).isTrue(); + assertThat(evalToBool("[3.0,2.0,3.0].unique()")).isFalse(); + assertThat(evalToBool("['abc', 'def'].unique()")).isTrue(); + assertThat(evalToBool("['abc', 'abc'].unique()")).isFalse(); + assertThat(evalToBool("[b'abc', b'123'].unique()")).isTrue(); + assertThat(evalToBool("[b'123', b'123'].unique()")).isFalse(); + // Previously, the unique() method returned false here as both bytes were converted + // to UTF-8. Since both contain invalid UTF-8, this would lead to them treated as equal + // because they'd have the same substitution character. + assertThat(evalToBool("[b'\\xFF', b'\\xFE'].unique()")).isTrue(); + } + + @Test + public void testUniqueUnsupported() { + for (String testCase : Collections.singletonList("1.unique()")) { + assertThatThrownBy(() -> evalToBool(testCase)).isInstanceOf(CelValidationException.class); + } + } + + @Test + public void testIsIpPrefix() throws Exception { + assertThat(evalToBool("'1.2.3.0/24'.isIpPrefix()")).isTrue(); + assertThat(evalToBool("'1.2.3.4/24'.isIpPrefix()")).isTrue(); + assertThat(evalToBool("'1.2.3.0/24'.isIpPrefix(true)")).isTrue(); + assertThat(evalToBool("'1.2.3.4/24'.isIpPrefix(true)")).isFalse(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix()")).isTrue(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix()")).isTrue(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(true)")) + .isTrue(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix(true)")) + .isFalse(); + assertThat(evalToBool("'1.2.3.4'.isIpPrefix()")).isFalse(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b'.isIpPrefix()")).isFalse(); + assertThat(evalToBool("'1.2.3.0/24'.isIpPrefix(4)")).isTrue(); + assertThat(evalToBool("'1.2.3.4/24'.isIpPrefix(4)")).isTrue(); + assertThat(evalToBool("'1.2.3.0/24'.isIpPrefix(4,true)")).isTrue(); + assertThat(evalToBool("'1.2.3.4/24'.isIpPrefix(4,true)")).isFalse(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(4)")).isFalse(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(6)")).isTrue(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix(6)")).isTrue(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(6,true)")) + .isTrue(); + assertThat(evalToBool("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix(6,true)")) + .isFalse(); + assertThat(evalToBool("'1.2.3.0/24'.isIpPrefix(6)")).isFalse(); + } + + @Test + public void testIsIpPrefixUnsupported() { + for (String testCase : + Arrays.asList( + "1.isIpPrefix()", + "'1.2.3.0/24'.isIpPrefix('foo')", + "'1.2.3.0/24'.isIpPrefix(4,'foo')", + "'1.2.3.0/24'.isIpPrefix('foo',true)")) { + assertThatThrownBy(() -> eval(testCase)).isInstanceOf(CelValidationException.class); + } + } + + @Test + public void testIsHostname() throws Exception { + assertThat(evalToBool("'example.com'.isHostname()")).isTrue(); + assertThat(evalToBool("'example.123'.isHostname()")).isFalse(); + } + + @Test + public void testIsEmail() throws Exception { + assertThat(evalToBool("'foo@example.com'.isEmail()")).isTrue(); + assertThat(evalToBool("''.isEmail()")).isFalse(); + assertThat(evalToBool("' foo@example.com'.isEmail()")).isFalse(); + assertThat(evalToBool("'foo@example.com '.isEmail()")).isFalse(); + } + + @Test + public void testBytesContains() throws Exception { + assertThat(evalToBool("bytes('12345').contains(bytes(''))")).isTrue(); + assertThat(evalToBool("bytes('12345').contains(bytes('1'))")).isTrue(); + assertThat(evalToBool("bytes('12345').contains(bytes('5'))")).isTrue(); + assertThat(evalToBool("bytes('12345').contains(bytes('123'))")).isTrue(); + assertThat(evalToBool("bytes('12345').contains(bytes('234'))")).isTrue(); + assertThat(evalToBool("bytes('12345').contains(bytes('345'))")).isTrue(); + assertThat(evalToBool("bytes('12345').contains(bytes('12345'))")).isTrue(); + + assertThat(evalToBool("bytes('12345').contains(bytes('6'))")).isFalse(); + assertThat(evalToBool("bytes('12345').contains(bytes('13'))")).isFalse(); + assertThat(evalToBool("bytes('12345').contains(bytes('35'))")).isFalse(); + assertThat(evalToBool("bytes('12345').contains(bytes('123456'))")).isFalse(); + } + + private Object eval(String source) throws Exception { + return eval(source, Collections.emptyMap()); + } + + private Object eval(String source, Map vars) + throws CelEvaluationException, CelValidationException { + CelValidationResult parsed = cel.compile(source); + CelAbstractSyntaxTree ast = parsed.getAst(); + return cel.createProgram(ast).eval(vars); + } + + private boolean evalToBool(String source) throws Exception { + return (Boolean) eval(source); + } +} diff --git a/src/test/java/build/buf/protovalidate/FormatTest.java b/src/test/java/build/buf/protovalidate/FormatTest.java new file mode 100644 index 00000000..f2223ab0 --- /dev/null +++ b/src/test/java/build/buf/protovalidate/FormatTest.java @@ -0,0 +1,200 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static org.assertj.core.api.Assertions.*; + +import cel.expr.conformance.proto3.TestAllTypes; +import com.cel.expr.Decl; +import com.cel.expr.ExprValue; +import com.cel.expr.Value; +import com.cel.expr.conformance.test.SimpleTest; +import com.cel.expr.conformance.test.SimpleTestFile; +import com.cel.expr.conformance.test.SimpleTestSection; +import com.google.protobuf.TextFormat; +import dev.cel.bundle.Cel; +import dev.cel.bundle.CelBuilder; +import dev.cel.bundle.CelFactory; +import dev.cel.common.CelValidationException; +import dev.cel.common.CelValidationResult; +import dev.cel.common.types.SimpleType; +import dev.cel.runtime.CelEvaluationException; +import dev.cel.runtime.CelRuntime.Program; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Named; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +class FormatTest { + // Version of the cel-spec that this implementation is conformant with + // This should be kept in sync with the version in gradle.properties + private static String CEL_SPEC_VERSION = "v0.24.0"; + + private static Cel cel; + + private static List formatTests; + private static List formatErrorTests; + + @BeforeAll + public static void setUp() throws Exception { + // The test data from the cel-spec conformance tests + List celSpecSections = + loadTestData("src/test/resources/testdata/string_ext_" + CEL_SPEC_VERSION + ".textproto"); + // Our supplemental tests of functionality not in the cel conformance file, but defined in the + // spec. + List supplementalSections = + loadTestData("src/test/resources/testdata/string_ext_supplemental.textproto"); + + // Combine the test data from both files into one + List sections = + Stream.concat(celSpecSections.stream(), supplementalSections.stream()) + .collect(Collectors.toList()); + + // Find the format tests which test successful formatting + formatTests = + sections.stream() + .filter(s -> s.getName().equals("format")) + .flatMap(s -> s.getTestList().stream()) + .collect(Collectors.toList()); + + // Find the format error tests which test errors during formatting + formatErrorTests = + sections.stream() + .filter(s -> s.getName().equals("format_errors")) + .flatMap(s -> s.getTestList().stream()) + .collect(Collectors.toList()); + + ValidateLibrary validateLibrary = new ValidateLibrary(); + cel = + CelFactory.standardCelBuilder() + .addCompilerLibraries(validateLibrary) + .addRuntimeLibraries(validateLibrary) + .build(); + } + + @ParameterizedTest() + @MethodSource("getFormatTests") + void testFormatSuccess(SimpleTest test) throws CelValidationException, CelEvaluationException { + Object result = evaluate(test); + assertThat(result).isEqualTo(getExpectedResult(test)); + assertThat(result).isInstanceOf(String.class); + } + + @ParameterizedTest() + @MethodSource("getFormatErrorTests") + void testFormatError(SimpleTest test) { + assertThatThrownBy(() -> evaluate(test)).isInstanceOf(CelEvaluationException.class); + } + + // Loads test data from the given text format file + private static List loadTestData(String fileName) throws Exception { + byte[] encoded = Files.readAllBytes(Paths.get(fileName)); + String data = new String(encoded, StandardCharsets.UTF_8); + SimpleTestFile.Builder bldr = SimpleTestFile.newBuilder(); + TextFormat.getParser().merge(data, bldr); + SimpleTestFile testData = bldr.build(); + + return testData.getSectionList(); + } + + // Runs a test by extending the cel environment with the specified + // types, variables and declarations, then evaluating it with the cel runtime. + private static Object evaluate(SimpleTest test) + throws CelValidationException, CelEvaluationException { + + CelBuilder builder = cel.toCelBuilder().addMessageTypes(TestAllTypes.getDescriptor()); + addDecls(builder, test); + Cel newCel = builder.build(); + + CelValidationResult validationResult = newCel.compile(test.getExpr()); + if (!validationResult.getAllIssues().isEmpty()) { + fail("error building AST for evaluation: " + validationResult.getIssueString()); + } + Program program = newCel.createProgram(validationResult.getAst()); + return program.eval(buildVariables(test.getBindingsMap())); + } + + private static Stream getTestStream(List tests) { + List args = new ArrayList<>(); + for (SimpleTest test : tests) { + args.add(Arguments.arguments(Named.named(test.getName(), test))); + } + + return args.stream(); + } + + private static Stream getFormatTests() { + return getTestStream(formatTests); + } + + private static Stream getFormatErrorTests() { + return getTestStream(formatErrorTests); + } + + // Builds the variable definitions to be used during evaluation + private static Map buildVariables(Map bindings) { + Map vars = new HashMap<>(); + for (Map.Entry entry : bindings.entrySet()) { + ExprValue exprValue = entry.getValue(); + if (exprValue.hasValue()) { + Value val = exprValue.getValue(); + if (val.hasStringValue()) { + vars.put(entry.getKey(), val.getStringValue()); + } + } + } + return vars; + } + + // Gets the expected result for a given test + private static String getExpectedResult(SimpleTest test) { + if (test.hasValue()) { + if (test.getValue().hasStringValue()) { + return test.getValue().getStringValue(); + } + } else if (test.hasEvalError()) { + // Note that we only expect a single eval error for all the conformance tests + if (test.getEvalError().getErrorsList().size() == 1) { + return test.getEvalError().getErrorsList().get(0).getMessage(); + } + } + return ""; + } + + // Builds the declarations for a given test + private static void addDecls(CelBuilder builder, SimpleTest test) { + for (Decl decl : test.getTypeEnvList()) { + if (decl.hasIdent()) { + Decl.IdentDecl ident = decl.getIdent(); + com.cel.expr.Type type = ident.getType(); + if (type.hasPrimitive()) { + if (type.getPrimitive() == com.cel.expr.Type.PrimitiveType.STRING) { + builder.addVar(decl.getName(), SimpleType.STRING); + } + } + } + } + } +} diff --git a/src/test/java/build/buf/protovalidate/ValidationResultTest.java b/src/test/java/build/buf/protovalidate/ValidationResultTest.java new file mode 100644 index 00000000..2b4ca05c --- /dev/null +++ b/src/test/java/build/buf/protovalidate/ValidationResultTest.java @@ -0,0 +1,123 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static org.assertj.core.api.Assertions.assertThat; + +import build.buf.validate.FieldPathElement; +import java.util.ArrayList; +import java.util.List; +import org.junit.jupiter.api.Test; + +class ValidationResultTest { + @Test + void testToStringNoViolations() { + + List violations = new ArrayList(); + ValidationResult result = new ValidationResult(violations); + + assertThat(result.toString()).isEqualTo("Validation OK"); + assertThat(result.isSuccess()).isTrue(); + } + + @Test + void testToStringSingleViolation() { + FieldPathElement elem = + FieldPathElement.newBuilder().setFieldNumber(5).setFieldName("test_field_name").build(); + + RuleViolation violation = + RuleViolation.newBuilder() + .setRuleId("int32.const") + .setMessage("value must equal 42") + .addFirstFieldPathElement(elem) + .build(); + List violations = new ArrayList(); + violations.add(violation); + ValidationResult result = new ValidationResult(violations); + + assertThat(result.toString()) + .isEqualTo("Validation error:\n - test_field_name: value must equal 42 [int32.const]"); + } + + @Test + void testToStringMultipleViolations() { + FieldPathElement elem = + FieldPathElement.newBuilder().setFieldNumber(5).setFieldName("test_field_name").build(); + + RuleViolation violation1 = + RuleViolation.newBuilder() + .setRuleId("int32.const") + .setMessage("value must equal 42") + .addFirstFieldPathElement(elem) + .build(); + + RuleViolation violation2 = + RuleViolation.newBuilder() + .setRuleId("int32.required") + .setMessage("value is required") + .addFirstFieldPathElement(elem) + .build(); + List violations = new ArrayList(); + violations.add(violation1); + violations.add(violation2); + ValidationResult result = new ValidationResult(violations); + + assertThat(result.toString()) + .isEqualTo( + "Validation error:\n - test_field_name: value must equal 42 [int32.const]\n - test_field_name: value is required [int32.required]"); + } + + @Test + void testToStringSingleViolationMultipleFieldPathElements() { + FieldPathElement elem1 = + FieldPathElement.newBuilder().setFieldNumber(5).setFieldName("test_field_name").build(); + FieldPathElement elem2 = + FieldPathElement.newBuilder().setFieldNumber(5).setFieldName("nested_name").build(); + + List elems = new ArrayList(); + elems.add(elem1); + elems.add(elem2); + + RuleViolation violation1 = + RuleViolation.newBuilder() + .setRuleId("int32.const") + .setMessage("value must equal 42") + .addAllFieldPathElements(elems) + .build(); + + List violations = new ArrayList(); + violations.add(violation1); + ValidationResult result = new ValidationResult(violations); + + assertThat(result.toString()) + .isEqualTo( + "Validation error:\n - test_field_name.nested_name: value must equal 42 [int32.const]"); + } + + @Test + void testToStringSingleViolationNoFieldPathElements() { + RuleViolation violation = + RuleViolation.newBuilder() + .setRuleId("int32.const") + .setMessage("value must equal 42") + .build(); + List violations = new ArrayList(); + violations.add(violation); + ValidationResult result = new ValidationResult(violations); + + assertThat(result.toString()) + .isEqualTo("Validation error:\n - value must equal 42 [int32.const]"); + } +} diff --git a/src/test/java/build/buf/protovalidate/ValidatorCelExpressionTest.java b/src/test/java/build/buf/protovalidate/ValidatorCelExpressionTest.java new file mode 100644 index 00000000..cad4ba94 --- /dev/null +++ b/src/test/java/build/buf/protovalidate/ValidatorCelExpressionTest.java @@ -0,0 +1,158 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static org.assertj.core.api.Assertions.assertThat; + +import build.buf.validate.FieldPath; +import build.buf.validate.FieldRules; +import build.buf.validate.Violation; +import com.example.imports.buf.validate.RepeatedRules; +import java.util.Arrays; +import org.junit.jupiter.api.Test; + +/** This test verifies that custom (CEL-based) field and/or message rules evaluate as expected. */ +public class ValidatorCelExpressionTest { + + @Test + public void testFieldExpressionRepeatedMessage() throws Exception { + // Nested message wrapping the int 1 + com.example.imports.validationtest.FieldExpressionRepeatedMessage.Msg one = + com.example.imports.validationtest.FieldExpressionRepeatedMessage.Msg.newBuilder() + .setA(1) + .build(); + + // Nested message wrapping the int 2 + com.example.imports.validationtest.FieldExpressionRepeatedMessage.Msg two = + com.example.imports.validationtest.FieldExpressionRepeatedMessage.Msg.newBuilder() + .setA(2) + .build(); + + // Create a valid message (1, 1) + com.example.imports.validationtest.FieldExpressionRepeatedMessage validMsg = + com.example.imports.validationtest.FieldExpressionRepeatedMessage.newBuilder() + .addAllVal(Arrays.asList(one, one)) + .build(); + + // Create an invalid message (1, 2, 1) + com.example.imports.validationtest.FieldExpressionRepeatedMessage invalidMsg = + com.example.imports.validationtest.FieldExpressionRepeatedMessage.newBuilder() + .addAllVal(Arrays.asList(one, two, one)) + .build(); + + // Build a model of the expected violation + Violation expectedViolation = + Violation.newBuilder() + .setField( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + invalidMsg.getDescriptorForType().findFieldByName("val")) + .toBuilder() + .build())) + .setRule( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.CEL_FIELD_NUMBER)) + .toBuilder() + .setIndex(0) + .build())) + .setRuleId("field_expression.repeated.message") + .setMessage("test message field_expression.repeated.message") + .build(); + + Validator validator = ValidatorFactory.newBuilder().build(); + + // Valid message checks + ValidationResult validResult = validator.validate(validMsg); + assertThat(validResult.isSuccess()).isTrue(); + + // Invalid message checks + ValidationResult invalidResult = validator.validate(invalidMsg); + assertThat(invalidResult.isSuccess()).isFalse(); + assertThat(invalidResult.toProto().getViolationsList()).containsExactly(expectedViolation); + } + + @Test + public void testFieldExpressionRepeatedMessageItems() throws Exception { + // Nested message wrapping the int 1 + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems.Msg one = + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems.Msg.newBuilder() + .setA(1) + .build(); + + // Nested message wrapping the int 2 + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems.Msg two = + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems.Msg.newBuilder() + .setA(2) + .build(); + + // Create a valid message (1, 1) + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems validMsg = + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems.newBuilder() + .addAllVal(Arrays.asList(one, one)) + .build(); + + // Create an invalid message (1, 2, 1) + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems invalidMsg = + com.example.imports.validationtest.FieldExpressionRepeatedMessageItems.newBuilder() + .addAllVal(Arrays.asList(one, two, one)) + .build(); + + // Build a model of the expected violation + Violation expectedViolation = + Violation.newBuilder() + .setField( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + invalidMsg.getDescriptorForType().findFieldByName("val")) + .toBuilder() + .setIndex(1) + .build())) + .setRule( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.REPEATED_FIELD_NUMBER))) + .addElements( + FieldPathUtils.fieldPathElement( + RepeatedRules.getDescriptor().findFieldByName("items"))) + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.CEL_FIELD_NUMBER)) + .toBuilder() + .setIndex(0) + .build())) + .setRuleId("field_expression.repeated.message.items") + .setMessage("test message field_expression.repeated.message.items") + .build(); + + Validator validator = ValidatorFactory.newBuilder().build(); + + // Valid message checks + ValidationResult validResult = validator.validate(validMsg); + assertThat(validResult.isSuccess()).isTrue(); + + // Invalid message checks + ValidationResult invalidResult = validator.validate(invalidMsg); + assertThat(invalidResult.isSuccess()).isFalse(); + assertThat(invalidResult.toProto().getViolationsList()).containsExactly(expectedViolation); + } +} diff --git a/src/test/java/build/buf/protovalidate/ValidatorConstructionTest.java b/src/test/java/build/buf/protovalidate/ValidatorConstructionTest.java new file mode 100644 index 00000000..a03a18d8 --- /dev/null +++ b/src/test/java/build/buf/protovalidate/ValidatorConstructionTest.java @@ -0,0 +1,265 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.fail; + +import build.buf.protovalidate.exceptions.ValidationException; +import com.example.imports.validationtest.ExampleFieldRules; +import com.example.imports.validationtest.FieldExpressionMapInt32; +import com.example.imports.validationtest.FieldExpressionMultiple; +import com.google.protobuf.Descriptors.Descriptor; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class ValidatorConstructionTest { + + // Tests validation works as planned with default builder. + @Test + public void testDefaultBuilder() { + Map testMap = new HashMap(); + testMap.put(42, 42); + FieldExpressionMapInt32 msg = FieldExpressionMapInt32.newBuilder().putAllVal(testMap).build(); + + Validator validator = ValidatorFactory.newBuilder().build(); + try { + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("all map values must equal 1"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests validation works as planned with default builder and config + @Test + public void testDefaultBuilderWithConfig() { + Map testMap = new HashMap(); + testMap.put(42, 42); + FieldExpressionMapInt32 msg = FieldExpressionMapInt32.newBuilder().putAllVal(testMap).build(); + + Config cfg = Config.newBuilder().setFailFast(true).build(); + Validator validator = ValidatorFactory.newBuilder().withConfig(cfg).build(); + try { + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("all map values must equal 1"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests that if the correct seed descriptors are provided and lazy is disabled, + // validation works as planned. + @Test + public void testSeedDescriptorsLazyDisabled() { + Map testMap = new HashMap(); + testMap.put(42, 42); + FieldExpressionMapInt32 msg = FieldExpressionMapInt32.newBuilder().putAllVal(testMap).build(); + + List seedDescriptors = new ArrayList(); + FieldExpressionMapInt32 reg = FieldExpressionMapInt32.newBuilder().build(); + seedDescriptors.add(reg.getDescriptorForType()); + + Config cfg = Config.newBuilder().setFailFast(true).build(); + + // Note that buildWithDescriptors throws the exception so the validator builder + // can be created ahead of time without having to catch an exception. + ValidatorFactory.ValidatorBuilder bldr = ValidatorFactory.newBuilder().withConfig(cfg); + try { + Validator validator = bldr.buildWithDescriptors(seedDescriptors, true); + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("all map values must equal 1"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests that the seed descriptor list is immutable inside the validator and that if + // a descriptor is removed after the validator is created, validation still works as planned. + @Test + public void testSeedDescriptorsImmutable() { + Map testMap = new HashMap(); + testMap.put(42, 42); + FieldExpressionMapInt32 msg = FieldExpressionMapInt32.newBuilder().putAllVal(testMap).build(); + + List seedDescriptors = new ArrayList(); + seedDescriptors.add(msg.getDescriptorForType()); + + Config cfg = Config.newBuilder().setFailFast(true).build(); + try { + Validator validator = + ValidatorFactory.newBuilder().withConfig(cfg).buildWithDescriptors(seedDescriptors, true); + + // Remove descriptor from list after the validator is created to verify validation still works + seedDescriptors.clear(); + + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("all map values must equal 1"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests that if a message is attempted to be validated and it wasn't in the initial + // list of seed descriptors AND lazy is disabled, that a message is returned that + // no evaluator is available. + @Test + public void testSeedDescriptorsWithWrongDescriptorAndLazyDisabled() { + Map testMap = new HashMap(); + testMap.put(42, 42); + FieldExpressionMapInt32 msg = FieldExpressionMapInt32.newBuilder().putAllVal(testMap).build(); + + List seedDescriptors = new ArrayList(); + ExampleFieldRules wrong = ExampleFieldRules.newBuilder().build(); + seedDescriptors.add(wrong.getDescriptorForType()); + + Config cfg = Config.newBuilder().setFailFast(true).build(); + try { + Validator validator = + ValidatorFactory.newBuilder().withConfig(cfg).buildWithDescriptors(seedDescriptors, true); + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("No evaluator available for " + msg.getDescriptorForType().getFullName()); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests that an IllegalStateException is thrown if an empty descriptor list is given + // and lazy is disabled. + @Test + public void testEmptySeedDescriptorsInvalidState() { + List seedDescriptors = new ArrayList(); + assertThatExceptionOfType(IllegalStateException.class) + .isThrownBy( + () -> { + ValidatorFactory.newBuilder().buildWithDescriptors(seedDescriptors, true); + }); + } + + // Tests that an IllegalStateException is thrown if a null descriptor list is given + // and lazy is disabled. + @Test + public void testNullSeedDescriptorsInvalidState() { + assertThatExceptionOfType(IllegalStateException.class) + .isThrownBy( + () -> { + ValidatorFactory.newBuilder().buildWithDescriptors(null, true); + }); + } + + // Tests that when an empty list of seed descriptors is provided and lazy is enabled + // that the missing message descriptor is successfully built and validation works as planned. + @Test + public void testEmptySeedDescriptorsLazyEnabled() { + Map testMap = new HashMap(); + testMap.put(42, 42); + FieldExpressionMapInt32 msg = FieldExpressionMapInt32.newBuilder().putAllVal(testMap).build(); + + List seedDescriptors = new ArrayList(); + Config cfg = Config.newBuilder().setFailFast(true).build(); + try { + Validator validator = + ValidatorFactory.newBuilder() + .withConfig(cfg) + .buildWithDescriptors(seedDescriptors, false); + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("all map values must equal 1"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests that when a null list of seed descriptors is provided, a NullPointerException + // is thrown with a message that descriptors cannot be null. + @Test + public void testNullSeedDescriptorsLazyEnabled() { + assertThatExceptionOfType(NullPointerException.class) + .isThrownBy( + () -> { + ValidatorFactory.newBuilder().buildWithDescriptors(null, false); + }) + .withMessageContaining("descriptors must not be null"); + ; + } + + // Tests that the config is applied when building a validator. + @Test + public void testConfigApplied() { + // Value must be at most 5 characters and must be lowercase alpha chars or numbers. + FieldExpressionMultiple msg = FieldExpressionMultiple.newBuilder().setVal("INVALID").build(); + + // Set fail fast to true, so we exit after the first validation failure. + Config cfg = Config.newBuilder().setFailFast(true).build(); + try { + Validator validator = ValidatorFactory.newBuilder().withConfig(cfg).build(); + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("value length must be at most 5 characters"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } + + // Tests that the config is applied when building a validator with seed descriptors. + @Test + public void testConfigAppliedWithSeedDescriptors() { + // Value must be at most 5 characters and must be lowercase alpha chars or numbers. + FieldExpressionMultiple msg = FieldExpressionMultiple.newBuilder().setVal("INVALID").build(); + + FieldExpressionMultiple desc = FieldExpressionMultiple.newBuilder().build(); + List seedDescriptors = new ArrayList(); + seedDescriptors.add(desc.getDescriptorForType()); + + // Set fail fast to true, so we exit after the first validation failure. + Config cfg = Config.newBuilder().setFailFast(true).build(); + try { + Validator validator = + ValidatorFactory.newBuilder() + .withConfig(cfg) + .buildWithDescriptors(seedDescriptors, false); + ValidationResult result = validator.validate(msg); + assertThat(result.isSuccess()).isFalse(); + assertThat(result.getViolations().size()).isEqualTo(1); + assertThat(result.getViolations().get(0).toProto().getMessage()) + .isEqualTo("value length must be at most 5 characters"); + } catch (ValidationException e) { + fail("unexpected exception thrown", e); + } + } +} diff --git a/src/test/java/build/buf/protovalidate/ValidatorDifferentJavaPackagesTest.java b/src/test/java/build/buf/protovalidate/ValidatorDifferentJavaPackagesTest.java index e1a1e292..6c284341 100644 --- a/src/test/java/build/buf/protovalidate/ValidatorDifferentJavaPackagesTest.java +++ b/src/test/java/build/buf/protovalidate/ValidatorDifferentJavaPackagesTest.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,7 +17,12 @@ import static org.assertj.core.api.Assertions.assertThat; import build.buf.protovalidate.exceptions.ValidationException; +import build.buf.validate.FieldPath; +import build.buf.validate.FieldPathElement; +import build.buf.validate.FieldRules; import build.buf.validate.Violation; +import com.example.imports.buf.validate.StringRules; +import com.example.imports.validationtest.ExampleFieldRules; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; import java.util.Collections; @@ -55,102 +60,119 @@ */ public class ValidatorDifferentJavaPackagesTest { @Test - public void testValidationFieldConstraints() throws Exception { + public void testValidationFieldRules() throws Exception { // Valid message - matches regex - com.example.imports.validationtest.ExampleFieldConstraints validMsgImports = - com.example.imports.validationtest.ExampleFieldConstraints.newBuilder() + com.example.imports.validationtest.ExampleFieldRules validMsgImports = + com.example.imports.validationtest.ExampleFieldRules.newBuilder() .setRegexStringField("abc123") .build(); expectNoViolations(validMsgImports); // Create same message under noimports package. Validation behavior should match. - com.example.noimports.validationtest.ExampleFieldConstraints validMsgNoImports = - com.example.noimports.validationtest.ExampleFieldConstraints.parseFrom( + com.example.noimports.validationtest.ExampleFieldRules validMsgNoImports = + com.example.noimports.validationtest.ExampleFieldRules.parseFrom( validMsgImports.toByteString()); expectNoViolations(validMsgNoImports); // 10 chars long - regex requires 1-9 chars - com.example.imports.validationtest.ExampleFieldConstraints invalidMsgImports = - com.example.imports.validationtest.ExampleFieldConstraints.newBuilder() + com.example.imports.validationtest.ExampleFieldRules invalidMsgImports = + com.example.imports.validationtest.ExampleFieldRules.newBuilder() .setRegexStringField("0123456789") .build(); Violation expectedViolation = Violation.newBuilder() - .setConstraintId("string.pattern") - .setFieldPath("regex_string_field") + .setField( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + com.example.imports.validationtest.ExampleFieldRules.getDescriptor() + .findFieldByNumber( + ExampleFieldRules.REGEX_STRING_FIELD_FIELD_NUMBER)))) + .setRule( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.STRING_FIELD_NUMBER))) + .addElements( + FieldPathUtils.fieldPathElement( + StringRules.getDescriptor() + .findFieldByNumber(StringRules.PATTERN_FIELD_NUMBER)))) + .setRuleId("string.pattern") .setMessage("value does not match regex pattern `^[a-z0-9]{1,9}$`") .build(); expectViolation(invalidMsgImports, expectedViolation); // Create same message under noimports package. Validation behavior should match. - com.example.noimports.validationtest.ExampleFieldConstraints invalidMsgNoImports = - com.example.noimports.validationtest.ExampleFieldConstraints.newBuilder() + com.example.noimports.validationtest.ExampleFieldRules invalidMsgNoImports = + com.example.noimports.validationtest.ExampleFieldRules.newBuilder() .setRegexStringField("0123456789") .build(); expectViolation(invalidMsgNoImports, expectedViolation); } @Test - public void testValidationOneofConstraints() + public void testValidationOneofRules() throws ValidationException, InvalidProtocolBufferException { - // Valid message - matches oneof constraint - com.example.imports.validationtest.ExampleOneofConstraints validMsgImports = - com.example.imports.validationtest.ExampleOneofConstraints.newBuilder() + // Valid message - matches oneof rule + com.example.imports.validationtest.ExampleOneofRules validMsgImports = + com.example.imports.validationtest.ExampleOneofRules.newBuilder() .setEmail("foo@bar.com") .build(); expectNoViolations(validMsgImports); // Create same message under noimports package. Validation behavior should match. - com.example.noimports.validationtest.ExampleOneofConstraints validMsgNoImports = - com.example.noimports.validationtest.ExampleOneofConstraints.parseFrom( + com.example.noimports.validationtest.ExampleOneofRules validMsgNoImports = + com.example.noimports.validationtest.ExampleOneofRules.parseFrom( validMsgImports.toByteString()); expectNoViolations(validMsgNoImports); - com.example.imports.validationtest.ExampleOneofConstraints invalidMsgImports = - com.example.imports.validationtest.ExampleOneofConstraints.getDefaultInstance(); + com.example.imports.validationtest.ExampleOneofRules invalidMsgImports = + com.example.imports.validationtest.ExampleOneofRules.getDefaultInstance(); Violation expectedViolation = Violation.newBuilder() - .setFieldPath("contact_info") - .setConstraintId("required") + .setField( + FieldPath.newBuilder() + .addElements(FieldPathElement.newBuilder().setFieldName("contact_info"))) + .setRuleId("required") .setMessage("exactly one field is required in oneof") .build(); expectViolation(invalidMsgImports, expectedViolation); // Create same message under noimports package. Validation behavior should match. - com.example.noimports.validationtest.ExampleOneofConstraints invalidMsgNoImports = - com.example.noimports.validationtest.ExampleOneofConstraints.parseFrom( + com.example.noimports.validationtest.ExampleOneofRules invalidMsgNoImports = + com.example.noimports.validationtest.ExampleOneofRules.parseFrom( invalidMsgImports.toByteString()); expectViolation(invalidMsgNoImports, expectedViolation); } @Test - public void testValidationMessageConstraintsDifferentJavaPackage() throws Exception { - com.example.imports.validationtest.ExampleMessageConstraints validMsg = - com.example.imports.validationtest.ExampleMessageConstraints.newBuilder() + public void testValidationMessageRulesDifferentJavaPackage() throws Exception { + com.example.imports.validationtest.ExampleMessageRules validMsg = + com.example.imports.validationtest.ExampleMessageRules.newBuilder() .setPrimaryEmail("foo@bar.com") .build(); expectNoViolations(validMsg); // Create same message under noimports package. Validation behavior should match. - com.example.noimports.validationtest.ExampleMessageConstraints validMsgNoImports = - com.example.noimports.validationtest.ExampleMessageConstraints.parseFrom( - validMsg.toByteString()); + com.example.noimports.validationtest.ExampleMessageRules validMsgNoImports = + com.example.noimports.validationtest.ExampleMessageRules.parseFrom(validMsg.toByteString()); expectNoViolations(validMsgNoImports); - com.example.imports.validationtest.ExampleMessageConstraints invalidMsgImports = - com.example.imports.validationtest.ExampleMessageConstraints.newBuilder() + com.example.imports.validationtest.ExampleMessageRules invalidMsgImports = + com.example.imports.validationtest.ExampleMessageRules.newBuilder() .setSecondaryEmail("foo@bar.com") .build(); Violation expectedViolation = Violation.newBuilder() - .setConstraintId("secondary_email_depends_on_primary") + .setRuleId("secondary_email_depends_on_primary") .setMessage("cannot set a secondary email without setting a primary one") .build(); expectViolation(invalidMsgImports, expectedViolation); // Create same message under noimports package. Validation behavior should match. - com.example.noimports.validationtest.ExampleMessageConstraints invalidMsgNoImports = - com.example.noimports.validationtest.ExampleMessageConstraints.parseFrom( + com.example.noimports.validationtest.ExampleMessageRules invalidMsgNoImports = + com.example.noimports.validationtest.ExampleMessageRules.parseFrom( invalidMsgImports.toByteString()); expectViolation(invalidMsgNoImports, expectedViolation); } @@ -164,8 +186,8 @@ private void expectViolation(Message msg, Violation violation) throws Validation } private void expectViolations(Message msg, List expected) throws ValidationException { - Validator validator = new Validator(); - List violations = validator.validate(msg).getViolations(); + Validator validator = ValidatorFactory.newBuilder().build(); + List violations = validator.validate(msg).toProto().getViolationsList(); assertThat(violations).containsExactlyInAnyOrderElementsOf(expected); } } diff --git a/src/test/java/build/buf/protovalidate/ValidatorDynamicMessageTest.java b/src/test/java/build/buf/protovalidate/ValidatorDynamicMessageTest.java index 70db7fde..e5ba50ab 100644 --- a/src/test/java/build/buf/protovalidate/ValidatorDynamicMessageTest.java +++ b/src/test/java/build/buf/protovalidate/ValidatorDynamicMessageTest.java @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,12 +17,17 @@ import static com.example.imports.validationtest.PredefinedProto.isIdent; import static org.assertj.core.api.Assertions.assertThat; +import build.buf.validate.FieldPath; +import build.buf.validate.FieldPathElement; +import build.buf.validate.FieldRules; import build.buf.validate.Violation; -import com.example.imports.validationtest.ExamplePredefinedFieldConstraints; -import com.example.noimports.validationtest.ExampleFieldConstraints; -import com.example.noimports.validationtest.ExampleMessageConstraints; -import com.example.noimports.validationtest.ExampleOneofConstraints; -import com.example.noimports.validationtest.ExampleRequiredFieldConstraints; +import com.example.imports.buf.validate.StringRules; +import com.example.imports.validationtest.ExamplePredefinedFieldRules; +import com.example.noimports.validationtest.ExampleFieldRules; +import com.example.noimports.validationtest.ExampleMessageRules; +import com.example.noimports.validationtest.ExampleOneofRules; +import com.example.noimports.validationtest.ExampleRequiredFieldRules; +import com.example.noimports.validationtest.PredefinedProto; import com.google.protobuf.DescriptorProtos; import com.google.protobuf.Descriptors; import com.google.protobuf.DynamicMessage; @@ -41,85 +46,140 @@ * This test mimics the behavior when performing validation with protovalidate on a file descriptor * set (as created by protoc --retain_options --descriptor_set_out=...). These * descriptor types have the protovalidate extensions as unknown fields and need to be parsed with - * an extension registry for the constraints to be recognized and validated. + * an extension registry for the rules to be recognized and validated. */ public class ValidatorDynamicMessageTest { @Test - public void testFieldConstraintDynamicMessage() throws Exception { + public void testFieldRuleDynamicMessage() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExampleFieldConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExampleFieldRules.getDefaultInstance()); messageBuilder.setField( messageBuilder.getDescriptorForType().findFieldByName("regex_string_field"), "0123456789"); Violation expectedViolation = Violation.newBuilder() - .setConstraintId("string.pattern") - .setFieldPath("regex_string_field") + .setField( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + messageBuilder + .getDescriptorForType() + .findFieldByName("regex_string_field")))) + .setRule( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.STRING_FIELD_NUMBER))) + .addElements( + FieldPathUtils.fieldPathElement( + StringRules.getDescriptor() + .findFieldByNumber(StringRules.PATTERN_FIELD_NUMBER)))) + .setRuleId("string.pattern") .setMessage("value does not match regex pattern `^[a-z0-9]{1,9}$`") .build(); - assertThat(new Validator().validate(messageBuilder.build()).getViolations()) - .containsExactly(expectedViolation); + ValidationResult result = + ValidatorFactory.newBuilder().build().validate(messageBuilder.build()); + assertThat(result.toProto().getViolationsList()).containsExactly(expectedViolation); + assertThat(result.getViolations().get(0).getFieldValue().getValue()).isEqualTo("0123456789"); + assertThat(result.getViolations().get(0).getRuleValue().getValue()) + .isEqualTo("^[a-z0-9]{1,9}$"); } @Test - public void testOneofConstraintDynamicMessage() throws Exception { + public void testOneofRuleDynamicMessage() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExampleOneofConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExampleOneofRules.getDefaultInstance()); Violation expectedViolation = Violation.newBuilder() - .setFieldPath("contact_info") - .setConstraintId("required") + .setField( + FieldPath.newBuilder() + .addElements(FieldPathElement.newBuilder().setFieldName("contact_info"))) + .setRuleId("required") .setMessage("exactly one field is required in oneof") .build(); - assertThat(new Validator().validate(messageBuilder.build()).getViolations()) + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(messageBuilder.build()) + .toProto() + .getViolationsList()) .containsExactly(expectedViolation); } @Test - public void testMessageConstraintDynamicMessage() throws Exception { + public void testMessageRuleDynamicMessage() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExampleMessageConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExampleMessageRules.getDefaultInstance()); messageBuilder.setField( messageBuilder.getDescriptorForType().findFieldByName("secondary_email"), "something@somewhere.com"); Violation expectedViolation = Violation.newBuilder() - .setConstraintId("secondary_email_depends_on_primary") + .setRuleId("secondary_email_depends_on_primary") .setMessage("cannot set a secondary email without setting a primary one") .build(); - assertThat(new Validator().validate(messageBuilder.build()).getViolations()) + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(messageBuilder.build()) + .toProto() + .getViolationsList()) .containsExactly(expectedViolation); } @Test - public void testRequiredFieldConstraintDynamicMessage() throws Exception { + public void testRequiredFieldRuleDynamicMessage() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExampleRequiredFieldConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExampleRequiredFieldRules.getDefaultInstance()); messageBuilder.setField( messageBuilder.getDescriptorForType().findFieldByName("regex_string_field"), "abc123"); - assertThat(new Validator().validate(messageBuilder.build()).getViolations()).isEmpty(); + assertThat( + ValidatorFactory.newBuilder().build().validate(messageBuilder.build()).getViolations()) + .isEmpty(); } @Test - public void testRequiredFieldConstraintDynamicMessageInvalid() throws Exception { + public void testRequiredFieldRuleDynamicMessageInvalid() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExampleRequiredFieldConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExampleRequiredFieldRules.getDefaultInstance()); messageBuilder.setField( messageBuilder.getDescriptorForType().findFieldByName("regex_string_field"), "0123456789"); Violation expectedViolation = Violation.newBuilder() - .setConstraintId("string.pattern") - .setFieldPath("regex_string_field") + .setField( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + messageBuilder + .getDescriptorForType() + .findFieldByName("regex_string_field")))) + .setRule( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.STRING_FIELD_NUMBER))) + .addElements( + FieldPathUtils.fieldPathElement( + StringRules.getDescriptor() + .findFieldByNumber(StringRules.PATTERN_FIELD_NUMBER)))) + .setRuleId("string.pattern") .setMessage("value does not match regex pattern `^[a-z0-9]{1,9}$`") .build(); - assertThat(new Validator().validate(messageBuilder.build()).getViolations()) + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(messageBuilder.build()) + .toProto() + .getViolationsList()) .containsExactly(expectedViolation); } @Test - public void testPredefinedFieldConstraintDynamicMessage() throws Exception { + public void testPredefinedFieldRuleDynamicMessage() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExamplePredefinedFieldConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExamplePredefinedFieldRules.getDefaultInstance()); messageBuilder.setField( messageBuilder.getDescriptorForType().findFieldByName("ident_field"), "abc123"); ExtensionRegistry registry = ExtensionRegistry.newInstance(); @@ -128,19 +188,37 @@ public void testPredefinedFieldConstraintDynamicMessage() throws Exception { TypeRegistry.newBuilder().add(isIdent.getDescriptor().getContainingType()).build(); Config config = Config.newBuilder().setExtensionRegistry(registry).setTypeRegistry(typeRegistry).build(); - assertThat(new Validator(config).validate(messageBuilder.build()).getViolations()).isEmpty(); + assertThat( + ValidatorFactory.newBuilder() + .withConfig(config) + .build() + .validate(messageBuilder.build()) + .getViolations()) + .isEmpty(); } @Test - public void testPredefinedFieldConstraintDynamicMessageInvalid() throws Exception { + public void testPredefinedFieldRuleDynamicMessageInvalid() throws Exception { DynamicMessage.Builder messageBuilder = - createMessageWithUnknownOptions(ExamplePredefinedFieldConstraints.getDefaultInstance()); + createMessageWithUnknownOptions(ExamplePredefinedFieldRules.getDefaultInstance()); messageBuilder.setField( messageBuilder.getDescriptorForType().findFieldByName("ident_field"), "0123456789"); Violation expectedViolation = Violation.newBuilder() - .setConstraintId("string.is_ident") - .setFieldPath("ident_field") + .setField( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + messageBuilder.getDescriptorForType().findFieldByName("ident_field")))) + .setRule( + FieldPath.newBuilder() + .addElements( + FieldPathUtils.fieldPathElement( + FieldRules.getDescriptor() + .findFieldByNumber(FieldRules.STRING_FIELD_NUMBER))) + .addElements( + FieldPathUtils.fieldPathElement(PredefinedProto.isIdent.getDescriptor()))) + .setRuleId("string.is_ident") .setMessage("invalid identifier") .build(); ExtensionRegistry registry = ExtensionRegistry.newInstance(); @@ -149,7 +227,13 @@ public void testPredefinedFieldConstraintDynamicMessageInvalid() throws Exceptio TypeRegistry.newBuilder().add(isIdent.getDescriptor().getContainingType()).build(); Config config = Config.newBuilder().setExtensionRegistry(registry).setTypeRegistry(typeRegistry).build(); - assertThat(new Validator(config).validate(messageBuilder.build()).getViolations()) + assertThat( + ValidatorFactory.newBuilder() + .withConfig(config) + .build() + .validate(messageBuilder.build()) + .toProto() + .getViolationsList()) .containsExactly(expectedViolation); } diff --git a/src/test/java/build/buf/protovalidate/ValidatorImportTest.java b/src/test/java/build/buf/protovalidate/ValidatorImportTest.java new file mode 100644 index 00000000..e6e2afff --- /dev/null +++ b/src/test/java/build/buf/protovalidate/ValidatorImportTest.java @@ -0,0 +1,166 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package build.buf.protovalidate; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.example.imports.validationtest.ExampleImportMessage; +import com.example.imports.validationtest.ExampleImportMessageFieldRule; +import com.example.imports.validationtest.ExampleImportMessageInMap; +import com.example.imports.validationtest.ExampleImportMessageInMapFieldRule; +import com.example.imports.validationtest.ExampleImportedMessage; +import org.junit.jupiter.api.Test; + +public class ValidatorImportTest { + @Test + public void testImportedMessageFromAnotherFile() throws Exception { + com.example.imports.validationtest.ExampleImportMessage valid = + ExampleImportMessage.newBuilder() + .setImportedSubmessage( + ExampleImportedMessage.newBuilder().setHexString("0123456789abcdef").build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(valid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(0); + + com.example.imports.validationtest.ExampleImportMessage invalid = + ExampleImportMessage.newBuilder() + .setImportedSubmessage(ExampleImportedMessage.newBuilder().setHexString("zyx").build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(invalid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(1); + } + + @Test + public void testImportedMessageFromAnotherFileInField() throws Exception { + com.example.imports.validationtest.ExampleImportMessageFieldRule valid = + ExampleImportMessageFieldRule.newBuilder() + .setMessageWithImport( + ExampleImportMessage.newBuilder() + .setImportedSubmessage( + ExampleImportedMessage.newBuilder() + .setHexString("0123456789abcdef") + .build()) + .build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(valid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(0); + + com.example.imports.validationtest.ExampleImportMessageFieldRule invalid = + ExampleImportMessageFieldRule.newBuilder() + .setMessageWithImport( + ExampleImportMessage.newBuilder() + .setImportedSubmessage( + ExampleImportedMessage.newBuilder().setHexString("zyx").build()) + .build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(invalid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(1); + } + + @Test + public void testImportedMessageFromAnotherFileInMap() throws Exception { + com.example.imports.validationtest.ExampleImportMessageInMap valid = + ExampleImportMessageInMap.newBuilder() + .putImportedSubmessage( + 0, ExampleImportedMessage.newBuilder().setHexString("0123456789abcdef").build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(valid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(0); + + com.example.imports.validationtest.ExampleImportMessageInMap invalid = + ExampleImportMessageInMap.newBuilder() + .putImportedSubmessage( + 0, ExampleImportedMessage.newBuilder().setHexString("zyx").build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(invalid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(1); + } + + @Test + public void testImportedMessageFromAnotherFileInMapInField() throws Exception { + com.example.imports.validationtest.ExampleImportMessageInMapFieldRule valid = + ExampleImportMessageInMapFieldRule.newBuilder() + .setMessageWithImport( + ExampleImportMessageInMap.newBuilder() + .putImportedSubmessage( + 0, + ExampleImportedMessage.newBuilder() + .setHexString("0123456789abcdef") + .build()) + .build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(valid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(0); + + com.example.imports.validationtest.ExampleImportMessageInMapFieldRule invalid = + ExampleImportMessageInMapFieldRule.newBuilder() + .setMessageWithImport( + ExampleImportMessageInMap.newBuilder() + .putImportedSubmessage( + 0, ExampleImportedMessage.newBuilder().setHexString("zyx").build()) + .build()) + .build(); + assertThat( + ValidatorFactory.newBuilder() + .build() + .validate(invalid) + .toProto() + .getViolationsList() + .size()) + .isEqualTo(1); + } +} diff --git a/src/test/java/build/buf/protovalidate/internal/celext/CustomOverloadTest.java b/src/test/java/build/buf/protovalidate/internal/celext/CustomOverloadTest.java deleted file mode 100644 index 73eb9344..00000000 --- a/src/test/java/build/buf/protovalidate/internal/celext/CustomOverloadTest.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.celext; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Test; -import org.projectnessie.cel.Ast; -import org.projectnessie.cel.Env; -import org.projectnessie.cel.Library; -import org.projectnessie.cel.Program; -import org.projectnessie.cel.common.types.Err; -import org.projectnessie.cel.common.types.ref.Val; -import org.projectnessie.cel.interpreter.Activation; - -public class CustomOverloadTest { - - private final Env env = Env.newEnv(Library.Lib(new ValidateLibrary())); - - @Test - public void testIsInf() { - Map testCases = - ImmutableMap.builder() - .put("0.0.isInf()", false) - .put("(1.0/0.0).isInf()", true) - .put("(1.0/0.0).isInf(0)", true) - .put("(1.0/0.0).isInf(1)", true) - .put("(1.0/0.0).isInf(-1)", false) - .put("(-1.0/0.0).isInf()", true) - .put("(-1.0/0.0).isInf(0)", true) - .put("(-1.0/0.0).isInf(1)", false) - .put("(-1.0/0.0).isInf(-1)", true) - .build(); - for (Map.Entry testCase : testCases.entrySet()) { - Program.EvalResult result = eval(testCase.getKey()); - assertThat(result.getVal().booleanValue()).isEqualTo(testCase.getValue()); - } - } - - @Test - public void testIsInfUnsupported() { - List testCases = ImmutableList.of("'abc'.isInf()", "0.0.isInf('abc')"); - for (String testCase : testCases) { - Val val = eval(testCase).getVal(); - assertThat(Err.isError(val)).isTrue(); - assertThatThrownBy(() -> val.convertToNative(Exception.class)) - .isInstanceOf(UnsupportedOperationException.class); - } - } - - @Test - public void testIsNan() { - Map testCases = - ImmutableMap.builder() - .put("0.0.isNan()", false) - .put("(0.0/0.0).isNan()", true) - .put("(1.0/0.0).isNan()", false) - .build(); - for (Map.Entry testCase : testCases.entrySet()) { - Program.EvalResult result = eval(testCase.getKey()); - assertThat(result.getVal().booleanValue()).isEqualTo(testCase.getValue()); - } - } - - @Test - public void testIsNanUnsupported() { - List testCases = ImmutableList.of("'foo'.isNan()"); - for (String testCase : testCases) { - Val val = eval(testCase).getVal(); - assertThat(Err.isError(val)).isTrue(); - assertThatThrownBy(() -> val.convertToNative(Exception.class)) - .isInstanceOf(UnsupportedOperationException.class); - } - } - - @Test - public void testUnique() { - Map testCases = - ImmutableMap.builder() - .put("[].unique()", true) - .put("[true].unique()", true) - .put("[true, false].unique()", true) - .put("[true, true].unique()", false) - .put("[1, 2, 3].unique()", true) - .put("[1, 2, 1].unique()", false) - .put("[1u, 2u, 3u].unique()", true) - .put("[1u, 2u, 2u].unique()", false) - .put("[1.0, 2.0, 3.0].unique()", true) - .put("[3.0,2.0,3.0].unique()", false) - .put("['abc', 'def'].unique()", true) - .put("['abc', 'abc'].unique()", false) - .put("[b'abc', b'123'].unique()", true) - .put("[b'123', b'123'].unique()", false) - // Previously, the unique() method returned false here as both bytes were converted - // to UTF-8. Since both contain invalid UTF-8, this would lead to them treated as equal - // because they'd have the same substitution character. - .put("[b'\\xFF', b'\\xFE'].unique()", true) - .build(); - for (Map.Entry testCase : testCases.entrySet()) { - Program.EvalResult result = eval(testCase.getKey()); - assertThat(result.getVal().booleanValue()).isEqualTo(testCase.getValue()); - } - } - - @Test - public void testUniqueUnsupported() { - List testCases = ImmutableList.of("1.unique()"); - for (String testCase : testCases) { - Program.EvalResult result = eval(testCase); - Val val = result.getVal(); - assertThat(Err.isError(val)).isTrue(); - assertThatThrownBy(() -> val.convertToNative(Exception.class)) - .isInstanceOf(UnsupportedOperationException.class); - } - } - - @Test - public void testIsIpPrefix() { - Map testCases = - ImmutableMap.builder() - .put("'1.2.3.0/24'.isIpPrefix()", true) - .put("'1.2.3.4/24'.isIpPrefix()", true) - .put("'1.2.3.0/24'.isIpPrefix(true)", true) - .put("'1.2.3.4/24'.isIpPrefix(true)", false) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix()", true) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix()", true) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(true)", true) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix(true)", false) - .put("'1.2.3.4'.isIpPrefix()", false) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b'.isIpPrefix()", false) - .put("'1.2.3.0/24'.isIpPrefix(4)", true) - .put("'1.2.3.4/24'.isIpPrefix(4)", true) - .put("'1.2.3.0/24'.isIpPrefix(4,true)", true) - .put("'1.2.3.4/24'.isIpPrefix(4,true)", false) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(4)", false) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(6)", true) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix(6)", true) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:4000/118'.isIpPrefix(6,true)", true) - .put("'fd7a:115c:a1e0:ab12:4843:cd96:626b:430b/118'.isIpPrefix(6,true)", false) - .put("'1.2.3.0/24'.isIpPrefix(6)", false) - .build(); - for (Map.Entry testCase : testCases.entrySet()) { - Program.EvalResult result = eval(testCase.getKey()); - assertThat(result.getVal().booleanValue()).isEqualTo(testCase.getValue()); - } - } - - @Test - public void testIsIpPrefixUnsupported() { - List testCases = - ImmutableList.of( - "1.isIpPrefix()", - "'1.2.3.0/24'.isIpPrefix('foo')", - "'1.2.3.0/24'.isIpPrefix(4,'foo')", - "'1.2.3.0/24'.isIpPrefix('foo',true)"); - for (String testCase : testCases) { - Program.EvalResult result = eval(testCase); - Val val = result.getVal(); - assertThat(Err.isError(val)).isTrue(); - assertThatThrownBy(() -> val.convertToNative(Exception.class)) - .isInstanceOf(UnsupportedOperationException.class); - } - } - - @Test - public void testIsHostname() { - Map testCases = - ImmutableMap.builder() - .put("'example.com'.isHostname()", true) - .put("'example.123'.isHostname()", false) - .build(); - for (Map.Entry testCase : testCases.entrySet()) { - Program.EvalResult result = eval(testCase.getKey()); - assertThat(result.getVal().booleanValue()) - .as( - "expected %s=%s, got=%s", - testCase.getKey(), testCase.getValue(), !testCase.getValue()) - .isEqualTo(testCase.getValue()); - } - } - - @Test - public void testIsEmail() { - Map testCases = - ImmutableMap.builder() - .put("'foo@example.com'.isEmail()", true) - .put("''.isEmail()", false) - .put("' foo@example.com'.isEmail()", false) - .put("'foo@example.com '.isEmail()", false) - .build(); - for (Map.Entry testCase : testCases.entrySet()) { - Program.EvalResult result = eval(testCase.getKey()); - assertThat(result.getVal().booleanValue()) - .as( - "expected %s=%s, got=%s", - testCase.getKey(), testCase.getValue(), !testCase.getValue()) - .isEqualTo(testCase.getValue()); - } - } - - private Program.EvalResult eval(String source) { - return eval(source, Activation.emptyActivation()); - } - - private Program.EvalResult eval(String source, Object vars) { - Env.AstIssuesTuple parsed = env.parse(source); - assertThat(parsed.hasIssues()).isFalse(); - Ast ast = parsed.getAst(); - return env.program(ast).eval(vars); - } -} diff --git a/src/test/java/build/buf/protovalidate/internal/celext/FormatTest.java b/src/test/java/build/buf/protovalidate/internal/celext/FormatTest.java deleted file mode 100644 index 4c963e1e..00000000 --- a/src/test/java/build/buf/protovalidate/internal/celext/FormatTest.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2023-2024 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package build.buf.protovalidate.internal.celext; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; - -import org.junit.jupiter.api.Test; -import org.projectnessie.cel.common.types.ListT; -import org.projectnessie.cel.common.types.UintT; -import org.projectnessie.cel.common.types.ref.Val; - -class FormatTest { - @Test - void largeDecimalValuesAreProperlyFormatted() { - UintT largeDecimal = UintT.uintOf(999999999999L); - ListT val = (ListT) ListT.newValArrayList(null, new Val[] {largeDecimal}); - String formatted = Format.format("%s", val); - assertThat(formatted).isEqualTo("999999999999"); - } -} diff --git a/src/test/resources/proto/buf.gen.cel.testtypes.yaml b/src/test/resources/proto/buf.gen.cel.testtypes.yaml new file mode 100644 index 00000000..47ec585c --- /dev/null +++ b/src/test/resources/proto/buf.gen.cel.testtypes.yaml @@ -0,0 +1,9 @@ +version: v2 +managed: + enabled: true + override: + - file_option: java_package + value: cel.expr.conformance.proto3 +plugins: + - remote: buf.build/protocolbuffers/java:$protocJavaPluginVersion + out: build/generated/test-sources/bufgen diff --git a/src/test/resources/proto/buf.gen.cel.yaml b/src/test/resources/proto/buf.gen.cel.yaml new file mode 100644 index 00000000..175f6083 --- /dev/null +++ b/src/test/resources/proto/buf.gen.cel.yaml @@ -0,0 +1,6 @@ +version: v2 +managed: + enabled: true +plugins: + - remote: buf.build/protocolbuffers/java:$protocJavaPluginVersion + out: build/generated/test-sources/bufgen diff --git a/src/test/resources/proto/buf.gen.imports.yaml b/src/test/resources/proto/buf.gen.imports.yaml index 109547fb..5ed4410f 100644 --- a/src/test/resources/proto/buf.gen.imports.yaml +++ b/src/test/resources/proto/buf.gen.imports.yaml @@ -5,7 +5,7 @@ managed: - file_option: java_package_prefix value: com.example.imports plugins: - - remote: buf.build/protocolbuffers/java:v28.2 + - remote: buf.build/protocolbuffers/java:$protocJavaPluginVersion out: build/generated/test-sources/bufgen inputs: - directory: src/test/resources/proto diff --git a/src/test/resources/proto/buf.gen.noimports.yaml b/src/test/resources/proto/buf.gen.noimports.yaml index a2960e8f..7eecf2ac 100644 --- a/src/test/resources/proto/buf.gen.noimports.yaml +++ b/src/test/resources/proto/buf.gen.noimports.yaml @@ -8,7 +8,7 @@ managed: - file_option: java_package_prefix value: com.example.noimports plugins: - - remote: buf.build/protocolbuffers/java:v28.2 + - remote: buf.build/protocolbuffers/java:$protocJavaPluginVersion out: build/generated/test-sources/bufgen inputs: - directory: src/main/resources diff --git a/src/test/resources/proto/validationtest/custom_rules.proto b/src/test/resources/proto/validationtest/custom_rules.proto new file mode 100644 index 00000000..0a59a463 --- /dev/null +++ b/src/test/resources/proto/validationtest/custom_rules.proto @@ -0,0 +1,41 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package validationtest; + +import "buf/validate/validate.proto"; + +message FieldExpressionRepeatedMessage { + repeated Msg val = 1 [(buf.validate.field).cel = { + id: "field_expression.repeated.message" + message: "test message field_expression.repeated.message" + expression: "this.all(e, e.a == 1)" + }]; + message Msg { + int32 a = 1; + } +} + +message FieldExpressionRepeatedMessageItems { + repeated Msg val = 1 [(buf.validate.field).repeated.items.cel = { + id: "field_expression.repeated.message.items" + message: "test message field_expression.repeated.message.items" + expression: "this.a == 1" + }]; + message Msg { + int32 a = 1; + } +} diff --git a/src/test/resources/proto/validationtest/import_test.proto b/src/test/resources/proto/validationtest/import_test.proto new file mode 100644 index 00000000..139daa30 --- /dev/null +++ b/src/test/resources/proto/validationtest/import_test.proto @@ -0,0 +1,23 @@ +// Copyright 2023-2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package validationtest; + +import "buf/validate/validate.proto"; + +message ExampleImportedMessage { + string hex_string = 1 [(buf.validate.field).string.pattern = "^[0-9a-fA-F]+$"]; +} diff --git a/src/test/resources/proto/validationtest/predefined.proto b/src/test/resources/proto/validationtest/predefined.proto index 74caab08..55a37ab0 100644 --- a/src/test/resources/proto/validationtest/predefined.proto +++ b/src/test/resources/proto/validationtest/predefined.proto @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,14 +19,12 @@ package validationtest; import "buf/validate/validate.proto"; extend buf.validate.StringRules { - optional bool is_ident = 1161 [ - (buf.validate.predefined).cel = { - id: "string.is_ident", - expression: "(rule && !this.matches('^[a-z0-9]{1,9}$')) ? 'invalid identifier' : ''", - } - ]; + optional bool is_ident = 1161 [(buf.validate.predefined).cel = { + id: "string.is_ident" + expression: "(rule && !this.matches('^[a-z0-9]{1,9}$')) ? 'invalid identifier' : ''" + }]; } -message ExamplePredefinedFieldConstraints { +message ExamplePredefinedFieldRules { optional string ident_field = 1 [(buf.validate.field).string.(is_ident) = true]; } diff --git a/src/test/resources/proto/validationtest/required.proto b/src/test/resources/proto/validationtest/required.proto index c664767e..d308577e 100644 --- a/src/test/resources/proto/validationtest/required.proto +++ b/src/test/resources/proto/validationtest/required.proto @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ package validationtest; import "buf/validate/validate.proto"; -message ExampleRequiredFieldConstraints { +message ExampleRequiredFieldRules { required string regex_string_field = 1 [(buf.validate.field).string.pattern = "^[a-z0-9]{1,9}$"]; optional string unconstrained = 2; } diff --git a/src/test/resources/proto/validationtest/validationtest.proto b/src/test/resources/proto/validationtest/validationtest.proto index 8f68d600..2774145b 100644 --- a/src/test/resources/proto/validationtest/validationtest.proto +++ b/src/test/resources/proto/validationtest/validationtest.proto @@ -1,4 +1,4 @@ -// Copyright 2023-2024 Buf Technologies, Inc. +// Copyright 2023-2025 Buf Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,14 @@ syntax = "proto3"; package validationtest; import "buf/validate/validate.proto"; +import "validationtest/import_test.proto"; -message ExampleFieldConstraints { +message ExampleFieldRules { string regex_string_field = 1 [(buf.validate.field).string.pattern = "^[a-z0-9]{1,9}$"]; string unconstrained = 2; } -message ExampleOneofConstraints { +message ExampleOneofRules { // contact_info is the user's contact information oneof contact_info { // required ensures that exactly one field in oneof is set. Without this @@ -40,9 +41,9 @@ message ExampleOneofConstraints { } } -message ExampleMessageConstraints { +message ExampleMessageRules { option (buf.validate.message).cel = { - id: "secondary_email_depends_on_primary", + id: "secondary_email_depends_on_primary" expression: "has(this.secondary_email) && !has(this.primary_email)" "? 'cannot set a secondary email without setting a primary one'" @@ -51,3 +52,72 @@ message ExampleMessageConstraints { string primary_email = 1; string secondary_email = 2; } + +message FieldExpressionMultiple { + string val = 1 [ + (buf.validate.field).string.max_len = 5, + (buf.validate.field).string.pattern = "^[a-z0-9]$" + ]; +} + +message FieldExpressionMapInt32 { + map val = 1 [(buf.validate.field).cel = { + id: "field_expression.map.int32" + message: "all map values must equal 1" + expression: "this.all(k, this[k] == 1)" + }]; +} + +message ExampleImportMessage { + option (buf.validate.message) = { + cel: { + id: "imported_submessage_must_not_be_null" + expression: "this.imported_submessage != null" + } + cel: { + id: "hex_string_must_not_be_empty" + expression: "this.imported_submessage.hex_string != ''" + } + }; + ExampleImportedMessage imported_submessage = 1; +} + +message ExampleImportMessageFieldRule { + ExampleImportMessage message_with_import = 1 [ + (buf.validate.field).cel = { + id: "field_must_not_be_null" + expression: "this.imported_submessage != null" + }, + (buf.validate.field).cel = { + id: "field_string_must_not_be_empty" + expression: "this.imported_submessage.hex_string != ''" + } + ]; +} + +message ExampleImportMessageInMap { + option (buf.validate.message) = { + cel: { + id: "imported_submessage_must_not_be_null" + expression: "this.imported_submessage[0] != null" + } + cel: { + id: "hex_string_must_not_be_empty" + expression: "this.imported_submessage[0].hex_string != ''" + } + }; + map imported_submessage = 1; +} + +message ExampleImportMessageInMapFieldRule { + ExampleImportMessageInMap message_with_import = 1 [ + (buf.validate.field).cel = { + id: "field_must_not_be_null" + expression: "this.imported_submessage[0] != null" + }, + (buf.validate.field).cel = { + id: "field_string_must_not_be_empty" + expression: "this.imported_submessage[0].hex_string != ''" + } + ]; +} diff --git a/src/test/resources/testdata/string_ext_supplemental.textproto b/src/test/resources/testdata/string_ext_supplemental.textproto new file mode 100644 index 00000000..dde7b83b --- /dev/null +++ b/src/test/resources/testdata/string_ext_supplemental.textproto @@ -0,0 +1,26 @@ +# proto-file: ../../../proto/cel/expr/conformance/test/simple.proto +# proto-message: cel.expr.conformance.test.SimpleTestFile + +# Ideally these tests should be in the cel-spec conformance test suite. +# Until they are added, we can use this to test for additional functionality +# listed in the spec. + +name: "string_ext_supplemental" +description: "Supplemental tests for the strings extension library." +section: { + name: "format" + test: { + name: "bytes support for string with invalid utf-8 encoding" + expr: '"%s".format([b"\\xF0abc\\x8C\\xF0xyz"])' + value: { + string_value: '\ufffdabc\ufffdxyz', + } + } + test: { + name: "bytes support for string with only invalid utf-8 sequences" + expr: '"%s".format([b"\\xF0\\x8C\\xF0"])' + value: { + string_value: '\ufffd', + } + } +} diff --git a/src/test/resources/testdata/string_ext_v0.24.0.textproto b/src/test/resources/testdata/string_ext_v0.24.0.textproto new file mode 100644 index 00000000..d2455583 --- /dev/null +++ b/src/test/resources/testdata/string_ext_v0.24.0.textproto @@ -0,0 +1,1417 @@ +# proto-file: ../../../proto/cel/expr/conformance/test/simple.proto +# proto-message: cel.expr.conformance.test.SimpleTestFile + +name: "string_ext" +description: "Tests for the strings extension library." +section: { + name: "char_at" + test: { + name: "middle_index" + expr: "'tacocat'.charAt(3)" + value: { + string_value: "o" + } + } + test: { + name: "end_index" + expr: "'tacocat'.charAt(7)" + value: { + string_value: "" + } + } + test: { + name: "multiple" + expr: "'©αT'.charAt(0) == '©' && '©αT'.charAt(1) == 'α' && '©αT'.charAt(2) == 'T'" + } +} +section: { + name: "index_of" + test: { + name: "empty_index" + expr: "'tacocat'.indexOf('')" + value: { + int64_value: 0 + } + } + test: { + name: "string_index" + expr: "'tacocat'.indexOf('ac')" + value: { + int64_value: 1 + } + } + test: { + name: "nomatch" + expr: "'tacocat'.indexOf('none') == -1" + } + test: { + name: "empty_index" + expr: "'tacocat'.indexOf('', 3) == 3" + } + test: { + name: "char_index" + expr: "'tacocat'.indexOf('a', 3) == 5" + } + test: { + name: "string_index" + expr: "'tacocat'.indexOf('at', 3) == 5" + } + test: { + name: "unicode_char" + expr: "'ta©o©αT'.indexOf('©') == 2" + } + test: { + name: "unicode_char_index" + expr: "'ta©o©αT'.indexOf('©', 3) == 4" + } + test: { + name: "unicode_string_index" + expr: "'ta©o©αT'.indexOf('©αT', 3) == 4" + } + test: { + name: "unicode_string_nomatch_index" + expr: "'ta©o©αT'.indexOf('©α', 5) == -1" + } + test: { + name: "char_index" + expr: "'ijk'.indexOf('k') == 2" + } + test: { + name: "string_with_space_fullmatch" + expr: "'hello wello'.indexOf('hello wello') == 0" + } + test: { + name: "string_with_space_index" + expr: "'hello wello'.indexOf('ello', 6) == 7" + } + test: { + name: "string_nomatch_index" + expr: "'hello wello'.indexOf('elbo room!!') == -1" + } +} +section: { + name: "last_index_of" + test: { + name: "empty" + expr: "'tacocat'.lastIndexOf('') == 7" + } + test: { + name: "string" + expr: "'tacocat'.lastIndexOf('at') == 5" + } + test: { + name: "string_nomatch" + expr: "'tacocat'.lastIndexOf('none') == -1" + } + test: { + name: "empty_index" + expr: "'tacocat'.lastIndexOf('', 3) == 3" + } + test: { + name: "char_index" + expr: "'tacocat'.lastIndexOf('a', 3) == 1" + } + test: { + name: "unicode_char" + expr: "'ta©o©αT'.lastIndexOf('©') == 4" + } + test: { + name: "unicode_char_index" + expr: "'ta©o©αT'.lastIndexOf('©', 3) == 2" + } + test: { + name: "unicode_string_index" + expr: "'ta©o©αT'.lastIndexOf('©α', 4) == 4" + } + test: { + name: "string_with_space_string_index" + expr: "'hello wello'.lastIndexOf('ello', 6) == 1" + } + test: { + name: "string_with_space_string_nomatch" + expr: "'hello wello'.lastIndexOf('low') == -1" + } + test: { + name: "string_with_space_string_with_space_nomatch" + expr: "'hello wello'.lastIndexOf('elbo room!!') == -1" + } + test: { + name: "string_with_space_fullmatch" + expr: "'hello wello'.lastIndexOf('hello wello') == 0" + } + test: { + name: "repeated_string" + expr: "'bananananana'.lastIndexOf('nana', 7) == 6" + } +} +section: { + name: "ascii_casing" + test: { + name: "lowerascii" + expr: "'TacoCat'.lowerAscii() == 'tacocat'" + } + test: { + name: "lowerascii_unicode" + expr: "'TacoCÆt'.lowerAscii() == 'tacocÆt'" + } + test: { + name: "lowerascii_unicode_with_space" + expr: "'TacoCÆt Xii'.lowerAscii() == 'tacocÆt xii'" + } + test: { + name: "upperascii" + expr: "'tacoCat'.upperAscii() == 'TACOCAT'" + } + test: { + name: "upperascii_unicode" + expr: "'tacoCαt'.upperAscii() == 'TACOCαT'" + } + test: { + name: "upperascii_unicode_with_space" + expr: "'TacoCÆt Xii'.upperAscii() == 'TACOCÆT XII'" + } +} +section: { + name: "replace" + test: { + name: "no_placeholder" + expr: "'12 days 12 hours'.replace('{0}', '2') == '12 days 12 hours'" + } + test: { + name: "basic" + expr: "'{0} days {0} hours'.replace('{0}', '2') == '2 days 2 hours'" + } + test: { + name: "chained" + expr: "'{0} days {0} hours'.replace('{0}', '2', 1).replace('{0}', '23') == '2 days 23 hours'" + } + test: { + name: "unicode" + expr: "'1 ©αT taco'.replace('αT', 'o©α') == '1 ©o©α taco'" + } +} +section: { + name: "split" + test: { + name: "empty" + expr: "'hello world'.split(' ') == ['hello', 'world']" + } + test: { + name: "zero_limit" + expr: "'hello world events!'.split(' ', 0) == []" + } + test: { + name: "one_limit" + expr: "'hello world events!'.split(' ', 1) == ['hello world events!']" + } + test: { + name: "unicode_negative_limit" + expr: "'o©o©o©o'.split('©', -1) == ['o', 'o', 'o', 'o']" + } +} +section: { + name: "substring" + test: { + name: "start" + expr: "'tacocat'.substring(4) == 'cat'" + } + test: { + name: "start_with_max_length" + expr: "'tacocat'.substring(7) == ''" + } + test: { + name: "start_and_end" + expr: "'tacocat'.substring(0, 4) == 'taco'" + } + test: { + name: "start_and_end_equal_value" + expr: "'tacocat'.substring(4, 4) == ''" + } + test: { + name: "unicode_start_and_end" + expr: "'ta©o©αT'.substring(2, 6) == '©o©α'" + } + test: { + name: "unicode_start_and_end_equal_value" + expr: "'ta©o©αT'.substring(7, 7) == ''" + } +} +section: { + name: "trim" + test: { + name: "blank_spaces_escaped_chars" + expr: "' \\f\\n\\r\\t\\vtext '.trim() == 'text'" + } + test: { + name: "unicode_space_chars_1" + expr: "'\\u0085\\u00a0\\u1680text'.trim() == 'text'" + } + test: { + name: "unicode_space_chars_2" + expr: "'text\\u2000\\u2001\\u2002\\u2003\\u2004\\u2004\\u2006\\u2007\\u2008\\u2009'.trim() == 'text'" + } + test: { + name: "unicode_space_chars_3" + expr: "'\\u200atext\\u2028\\u2029\\u202F\\u205F\\u3000'.trim() == 'text'" + } + test: { + name: "unicode_no_trim" + expr: "'\\u180etext\\u200b\\u200c\\u200d\\u2060\\ufeff'.trim() == '\\u180etext\\u200b\\u200c\\u200d\\u2060\\ufeff'" + } +} +section: { + name: "join" + test: { + name: "empty_separator" + expr: "['x', 'y'].join() == 'xy'" + } + test: { + name: "dash_separator" + expr: "['x', 'y'].join('-') == 'x-y'" + } + test: { + name: "empty_string_empty_separator" + expr: "[].join() == ''" + } + test: { + name: "empty_string_dash_separator" + expr: "[].join('-') == ''" + } +} +section: { + name: "quote" + test: { + name: "multiline" + expr: "strings.quote(\"first\\nsecond\") == \"\\\"first\\\\nsecond\\\"\"" + } + test: { + name: "escaped" + expr: "strings.quote(\"bell\\a\") == \"\\\"bell\\\\a\\\"\"" + } + test: { + name: "backspace" + expr: "strings.quote(\"\\bbackspace\") == \"\\\"\\\\bbackspace\\\"\"" + } + test: { + name: "form_feed" + expr: "strings.quote(\"\\fform feed\") == \"\\\"\\\\fform feed\\\"\"" + } + test: { + name: "carriage_return" + expr: "strings.quote(\"carriage \\r return\") == \"\\\"carriage \\\\r return\\\"\"" + } + test: { + name: "horizontal_tab" + expr: "strings.quote(\"horizontal tab\\t\") == \"\\\"horizontal tab\\\\t\\\"\"" + } + test: { + name: "vertical_tab" + expr: "strings.quote(\"vertical \\v tab\") == \"\\\"vertical \\\\v tab\\\"\"" + } + test: { + name: "double_slash" + expr: "strings.quote(\"double \\\\\\\\ slash\") == \"\\\"double \\\\\\\\\\\\\\\\ slash\\\"\"" + } + test: { + name: "two_escape_sequences" + expr: "strings.quote(\"two escape sequences \\\\a\\\\n\") == \"\\\"two escape sequences \\\\\\\\a\\\\\\\\n\\\"\"" + } + test: { + name: "verbatim" + expr: "strings.quote(\"verbatim\") == \"\\\"verbatim\\\"\"" + } + test: { + name: "ends_with" + expr: "strings.quote(\"ends with \\\\\") == \"\\\"ends with \\\\\\\\\\\"\"" + } + test: { + name: "starts_with" + expr: "strings.quote(\"\\\\ starts with\") == \"\\\"\\\\\\\\ starts with\\\"\"" + } + test: { + name: "printable_unicode" + expr: "strings.quote(\"printable unicode😀\") == \"\\\"printable unicode😀\\\"\"" + } + test: { + name: "mid_string_quote" + expr: "strings.quote(\"mid string \\\" quote\") == \"\\\"mid string \\\\\\\" quote\\\"\"" + } + test: { + name: "single_quote_with_double_quote" + expr: "strings.quote('single-quote with \"double quote\"') == \"\\\"single-quote with \\\\\\\"double quote\\\\\\\"\\\"\"" + } + test: { + name: "size_unicode_char" + expr: "strings.quote(\"size('ÿ')\") == \"\\\"size('ÿ')\\\"\"" + } + test: { + name: "size_unicode_string" + expr: "strings.quote(\"size('πέντε')\") == \"\\\"size('πέντε')\\\"\"" + } + test: { + name: "unicode" + expr: "strings.quote(\"завтра\") == \"\\\"завтра\\\"\"" + } + test: { + name: "unicode_code_points" + expr: "strings.quote(\"\\U0001F431\\U0001F600\\U0001F61B\")" + value: { + string_value: "\"🐱😀😛\"" + } + } + test: { + name: "unicode_2" + expr: "strings.quote(\"ta©o©αT\") == \"\\\"ta©o©αT\\\"\"" + } + test: { + name: "empty_quote" + expr: "strings.quote(\"\")" + value: { + string_value: "\"\"" + } + } +} +section: { + name: "format" + test: { + name: "no-op" + expr: '"no substitution".format([])' + value: { + string_value: 'no substitution', + } + } + test: { + name: "mid-string substitution" + expr: '"str is %s and some more".format(["filler"])' + value: { + string_value: 'str is filler and some more', + } + } + test: { + name: "percent escaping" + expr: '"%% and also %%".format([])' + value: { + string_value: '% and also %', + } + } + test: { + name: "substitution inside escaped percent signs" + expr: '"%%%s%%".format(["text"])' + value: { + string_value: '%text%', + } + } + test: { + name: "substitution with one escaped percent sign on the right" + expr: '"%s%%".format(["percent on the right"])' + value: { + string_value: 'percent on the right%', + } + } + test: { + name: "substitution with one escaped percent sign on the left" + expr: '"%%%s".format(["percent on the left"])' + value: { + string_value: '%percent on the left', + } + } + test: { + name: "multiple substitutions" + expr: '"%d %d %d, %s %s %s, %d %d %d, %s %s %s".format([1, 2, 3, "A", "B", "C", 4, 5, 6, "D", "E", "F"])' + value: { + string_value: '1 2 3, A B C, 4 5 6, D E F', + } + } + test: { + name: "percent sign escape sequence support" + expr: '"%%escaped %s%%".format(["percent"])' + value: { + string_value: '%escaped percent%', + } + } + test: { + name: "fixed point formatting clause" + expr: '"%.3f".format([1.2345])' + value: { + string_value: '1.234', + } + } + test: { + name: "binary formatting clause" + expr: '"this is 5 in binary: %b".format([5])' + value: { + string_value: 'this is 5 in binary: 101', + } + } + test: { + name: "uint support for binary formatting" + expr: '"unsigned 64 in binary: %b".format([uint(64)])' + value: { + string_value: 'unsigned 64 in binary: 1000000', + } + } + test: { + name: "bool support for binary formatting" + expr: '"bit set from bool: %b".format([true])' + value: { + string_value: 'bit set from bool: 1', + } + } + test: { + name: "octal formatting clause" + expr: '"%o".format([11])' + value: { + string_value: '13', + } + } + test: { + name: "uint support for octal formatting clause" + expr: '"this is an unsigned octal: %o".format([uint(65535)])' + value: { + string_value: 'this is an unsigned octal: 177777', + } + } + test: { + name: "lowercase hexadecimal formatting clause" + expr: '"%x is 20 in hexadecimal".format([30])' + value: { + string_value: '1e is 20 in hexadecimal', + } + } + test: { + name: "uppercase hexadecimal formatting clause" + expr: '"%X is 20 in hexadecimal".format([30])' + value: { + string_value: '1E is 20 in hexadecimal', + } + } + test: { + name: "unsigned support for hexadecimal formatting clause" + expr: '"%X is 6000 in hexadecimal".format([uint(6000)])' + value: { + string_value: '1770 is 6000 in hexadecimal', + } + } + test: { + name: "string support with hexadecimal formatting clause" + expr: '"%x".format(["Hello world!"])' + value: { + string_value: '48656c6c6f20776f726c6421', + } + } + test: { + name: "string support with uppercase hexadecimal formatting clause" + expr: '"%X".format(["Hello world!"])' + value: { + string_value: '48656C6C6F20776F726C6421', + } + } + test: { + name: "byte support with hexadecimal formatting clause" + expr: '"%x".format([b"byte string"])' + value: { + string_value: '6279746520737472696e67', + } + } + test: { + name: "byte support with uppercase hexadecimal formatting clause" + expr: '"%X".format([b"byte string"])' + value: { + string_value: '6279746520737472696E67', + } + } + test: { + name: "scientific notation formatting clause" + expr: '"%.6e".format([1052.032911275])' + value: { + string_value: '1.052033e+03', + } + } + test: { + name: "default precision for fixed-point clause" + expr: '"%f".format([2.71828])' + value: { + string_value: '2.718280', + } + } + test: { + name: "default precision for scientific notation" + expr: '"%e".format([2.71828])' + value: { + string_value: '2.718280e+00', + } + } + test: { + name: "NaN support for scientific notation" + expr: '"%e".format([double("NaN")])' + value: { + string_value: 'NaN', + } + } + test: { + name: "positive infinity support for scientific notation" + expr: '"%e".format([double("Infinity")])' + value: { + string_value: 'Infinity', + } + } + test: { + name: "negative infinity support for scientific notation" + expr: '"%e".format([double("-Infinity")])' + value: { + string_value: '-Infinity', + } + } + test: { + name: "NaN support for decimal" + expr: '"%d".format([double("NaN")])' + value: { + string_value: 'NaN', + } + } + test: { + name: "positive infinity support for decimal" + expr: '"%d".format([double("Infinity")])' + value: { + string_value: 'Infinity', + } + } + test: { + name: "negative infinity support for decimal" + expr: '"%d".format([double("-Infinity")])' + value: { + string_value: '-Infinity', + } + } + test: { + name: "NaN support for fixed-point" + expr: '"%f".format([double("NaN")])' + value: { + string_value: 'NaN', + } + } + test: { + name: "positive infinity support for fixed-point" + expr: '"%f".format([double("Infinity")])' + value: { + string_value: 'Infinity', + } + } + test: { + name: "negative infinity support for fixed-point" + expr: '"%f".format([double("-Infinity")])' + value: { + string_value: '-Infinity', + } + } + test: { + name: "uint support for decimal clause" + expr: '"%d".format([uint(64)])' + value: { + string_value: '64', + } + } + test: { + name: "null support for string" + expr: '"%s".format([null])' + value: { + string_value: 'null', + } + } + test: { + name: "int support for string" + expr: '"%s".format([999999999999])' + value: { + string_value: '999999999999', + } + } + test: { + name: "bytes support for string" + expr: '"%s".format([b"xyz"])' + value: { + string_value: 'xyz', + } + } + test: { + name: "type() support for string" + expr: '"%s".format([type("test string")])' + value: { + string_value: 'string', + } + } + test: { + name: "timestamp support for string" + expr: '"%s".format([timestamp("2023-02-03T23:31:20+00:00")])' + value: { + string_value: '2023-02-03T23:31:20Z', + } + } + test: { + name: "duration support for string" + expr: '"%s".format([duration("1h45m47s")])' + value: { + string_value: '6347s', + } + } + test: { + name: "list support for string" + expr: '"%s".format([["abc", 3.14, null, [9, 8, 7, 6], timestamp("2023-02-03T23:31:20Z")]])' + value: { + string_value: '[abc, 3.14, null, [9, 8, 7, 6], 2023-02-03T23:31:20Z]', + } + } + test: { + name: "map support for string" + expr: '"%s".format([{"key1": b"xyz", "key5": null, "key2": duration("2h"), "key4": true, "key3": 2.71828}])' + value: { + string_value: '{key1: xyz, key2: 7200s, key3: 2.71828, key4: true, key5: null}', + } + } + test: { + name: "map support (all key types)" + expr: '"%s".format([{1: "value1", uint(2): "value2", true: double("NaN")}])' + value: { + string_value: '{1: value1, 2: value2, true: NaN}', + } + } + test: { + name: "boolean support for %s" + expr: '"%s, %s".format([true, false])' + value: { + string_value: 'true, false', + } + } + test: { + name: "dyntype support for string formatting clause" + expr: '"%s".format([dyn("a string")])' + value: { + string_value: 'a string', + } + } + test: { + name: "dyntype support for numbers with string formatting clause" + expr: '"%s, %s".format([dyn(32), dyn(56.8)])' + value: { + string_value: '32, 56.8', + } + } + test: { + name: "dyntype support for integer formatting clause" + expr: '"%d".format([dyn(128)])' + value: { + string_value: '128', + } + } + test: { + name: "dyntype support for integer formatting clause (unsigned)" + expr: '"%d".format([dyn(256u)])' + value: { + string_value: '256', + } + } + test: { + name: "dyntype support for hex formatting clause" + expr: '"%x".format([dyn(22)])' + value: { + string_value: '16', + } + } + test: { + name: "dyntype support for hex formatting clause (uppercase)" + expr: '"%X".format([dyn(26)])' + value: { + string_value: '1A', + } + } + test: { + name: "dyntype support for unsigned hex formatting clause" + expr: '"%x".format([dyn(500u)])' + value: { + string_value: '1f4', + } + } + test: { + name: "dyntype support for fixed-point formatting clause" + expr: '"%.3f".format([dyn(4.5)])' + value: { + string_value: '4.500', + } + } + test: { + name: "dyntype support for scientific notation" + expr: '"%e".format([dyn(2.71828)])' + value: { + string_value: '2.718280e+00', + } + } + test: { + name: "dyntype NaN/infinity support" + expr: '"%s".format([[double("NaN"), double("Infinity"), double("-Infinity")]])' + value: { + string_value: '[NaN, Infinity, -Infinity]', + } + } + test: { + name: "dyntype support for timestamp" + expr: '"%s".format([dyn(timestamp("2009-11-10T23:00:00Z"))])' + value: { + string_value: '2009-11-10T23:00:00Z', + } + } + test: { + name: "dyntype support for duration" + expr: '"%s".format([dyn(duration("8747s"))])' + value: { + string_value: '8747s', + } + } + test: { + name: "dyntype support for lists" + expr: '"%s".format([dyn([6, 4.2, "a string"])])' + value: { + string_value: '[6, 4.2, a string]', + } + } + test: { + name: "dyntype support for maps" + expr: '"%s".format([{"strKey":"x", 6:duration("422s"), true:42}])' + value: { + string_value: '{6: 422s, strKey: x, true: 42}', + } + } + test: { + name: "string substitution in a string variable" + expr: 'str_var.format(["filler"])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%s" } } + } + value: { + string_value: 'filler', + } + } + test: { + name: "multiple substitutions in a string variable" + expr: 'str_var.format([1, 2, 3, "A", "B", "C", 4, 5, 6, "D", "E", "F"])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%d %d %d, %s %s %s, %d %d %d, %s %s %s" } } + } + value: { + string_value: '1 2 3, A B C, 4 5 6, D E F', + } + } + test: { + name: "substitution inside escaped percent signs in a string variable" + expr: 'str_var.format(["text"])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%%%s%%" } } + } + value: { + string_value: '%text%', + } + } + test: { + name: "fixed point formatting clause in a string variable" + expr: 'str_var.format([1.2345])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%.3f" } } + } + value: { + string_value: '1.234', + } + } + test: { + name: "binary formatting clause in a string variable" + expr: 'str_var.format([5])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%b" } } + } + value: { + string_value: '101', + } + } + test: { + name: "scientific notation formatting clause in a string variable" + expr: 'str_var.format([1052.032911275])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%.6e" } } + } + value: { + string_value: '1.052033e+03', + } + } + test: { + name: "default precision for fixed-point clause in a string variable" + expr: 'str_var.format([2.71828])' + type_env: { + name: "str_var", + ident: { type: { primitive: STRING } } + } + bindings: { + key: "str_var" + value: { value: { string_value: "%f" } } + } + value: { + string_value: '2.718280', + } + } +} +section: { + name: "format_errors" + test: { + name: "unrecognized formatting clause" + expr: '"%a".format([1])' + disable_check: true + eval_error: { + errors: { + message: 'could not parse formatting clause: unrecognized formatting clause "a"' + } + } + } + test: { + name: "out of bounds arg index" + expr: '"%d %d %d".format([0, 1])' + disable_check: true + eval_error: { + errors: { + message: 'index 2 out of range' + } + } + } + test: { + name: "string substitution is not allowed with binary clause" + expr: '"string is %b".format(["abc"])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: only integers and bools can be formatted as binary, was given string' + } + } + } + test: { + name: "duration substitution not allowed with decimal clause" + expr: '"%d".format([duration("30m2s")])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: decimal clause can only be used on integers, was given google.protobuf.Duration' + } + } + } + test: { + name: "string substitution not allowed with octal clause" + expr: '"octal: %o".format(["a string"])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: octal clause can only be used on integers, was given string' + } + } + } + test: { + name: "double substitution not allowed with hex clause" + expr: '"double is %x".format([0.5])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: only integers, byte buffers, and strings can be formatted as hex, was given double' + } + } + } + test: { + name: "uppercase not allowed for scientific clause" + expr: '"double is %E".format([0.5])' + disable_check: true + eval_error: { + errors: { + message: 'could not parse formatting clause: unrecognized formatting clause "E"' + } + } + } + test: { + name: "object not allowed" + expr: '"object is %s".format([cel.expr.conformance.proto3.TestAllTypes{}])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps, was given cel.expr.conformance.proto3.TestAllTypes' + } + } + } + test: { + name: "object inside list" + expr: '"%s".format([[1, 2, cel.expr.conformance.proto3.TestAllTypes{}]])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps, was given cel.expr.conformance.proto3.TestAllTypes' + } + } + } + test: { + name: "object inside map" + expr: '"%s".format([{1: "a", 2: cel.expr.conformance.proto3.TestAllTypes{}}])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps, was given cel.expr.conformance.proto3.TestAllTypes' + } + } + } + test: { + name: "null not allowed for %d" + expr: '"null: %d".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: decimal clause can only be used on integers, was given null_type' + } + } + } + test: { + name: "null not allowed for %e" + expr: '"null: %e".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: scientific clause can only be used on doubles, was given null_type' + } + } + } + test: { + name: "null not allowed for %f" + expr: '"null: %f".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: fixed-point clause can only be used on doubles, was given null_type' + } + } + } + test: { + name: "null not allowed for %x" + expr: '"null: %x".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: only integers, byte buffers, and strings can be formatted as hex, was given null_type' + } + } + } + test: { + name: "null not allowed for %X" + expr: '"null: %X".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: only integers, byte buffers, and strings can be formatted as hex, was given null_type' + } + } + } + test: { + name: "null not allowed for %b" + expr: '"null: %b".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: only integers and bools can be formatted as binary, was given null_type' + } + } + } + test: { + name: "null not allowed for %o" + expr: '"null: %o".format([null])' + disable_check: true + eval_error: { + errors: { + message: 'error during formatting: octal clause can only be used on integers, was given null_type' + } + } + } +} +section: { + name: "value_errors" + test: { + name: "charat_out_of_range" + expr: "'tacocat'.charAt(30) == ''" + eval_error: { + errors: { + message: "index out of range: 30" + } + } + } + test: { + name: "indexof_out_of_range" + expr: "'tacocat'.indexOf('a', 30) == -1" + eval_error: { + errors: { + message: "index out of range: 30" + } + } + } + test: { + name: "lastindexof_negative_index" + expr: "'tacocat'.lastIndexOf('a', -1) == -1" + eval_error: { + errors: { + message: "index out of range: -1" + } + } + } + test: { + name: "lastindexof_out_of_range" + expr: "'tacocat'.lastIndexOf('a', 30) == -1" + eval_error: { + errors: { + message: "index out of range: 30" + } + } + } + test: { + name: "substring_out_of_range" + expr: "'tacocat'.substring(40) == 'cat'" + eval_error: { + errors: { + message: "index out of range: 40" + } + } + } + test: { + name: "substring_negative_index" + expr: "'tacocat'.substring(-1) == 'cat'" + eval_error: { + errors: { + message: "index out of range: -1" + } + } + } + test: { + name: "substring_end_index_out_of_range" + expr: "'tacocat'.substring(1, 50) == 'cat'" + eval_error: { + errors: { + message: "index out of range: 50" + } + } + } + test: { + name: "substring_begin_index_out_of_range" + expr: "'tacocat'.substring(49, 50) == 'cat'" + eval_error: { + errors: { + message: "index out of range: 49" + } + } + } + test: { + name: "substring_end_index_greater_than_begin_index" + expr: "'tacocat'.substring(4, 3) == ''" + eval_error: { + errors: { + message: "invalid substring range. start: 4, end: 3" + } + } + } +} +section: { + name: "type_errors" + test: { + name: "charat_invalid_type" + expr: "42.charAt(2) == ''" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "charat_invalid_argument" + expr: "'hello'.charAt(true) == ''" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "indexof_unary_invalid_type" + expr: "24.indexOf('2') == 0" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "indexof_unary_invalid_argument" + expr: "'hello'.indexOf(true) == 1" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "indexof_binary_invalid_argument" + expr: "42.indexOf('4', 0) == 0" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "indexof_binary_invalid_argument_2" + expr: "'42'.indexOf(4, 0) == 0" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "indexof_binary_both_invalid_arguments" + expr: "'42'.indexOf('4', '0') == 0" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "indexof_ternary_invalid_arguments" + expr: "'42'.indexOf('4', 0, 1) == 0" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_invalid_type" + expr: "42.split('2') == ['4']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_invalid_type" + expr: "42.replace(2, 1) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_binary_invalid_argument" + expr: "'42'.replace(2, 1) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_binary_invalid_argument_2" + expr: "'42'.replace('2', 1) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_ternary_invalid_argument" + expr: "42.replace('2', '1', 1) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_ternary_invalid_argument_2" + expr: "'42'.replace(2, '1', 1) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_ternary_invalid_argument_3" + expr: "'42'.replace('2', 1, 1) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_ternary_invalid_argument_4" + expr: "'42'.replace('2', '1', '1') == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "replace_quaternary_invalid_argument" + expr: "'42'.replace('2', '1', 1, false) == '41'" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_invalid_type_empty_arg" + expr: "42.split('') == ['4', '2']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_invalid_argument" + expr: "'42'.split(2) == ['4']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_binary_invalid_type" + expr: "42.split('2', '1') == ['4']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_binary_invalid_argument" + expr: "'42'.split(2, 1) == ['4']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_binary_invalid_argument_2" + expr: "'42'.split('2', '1') == ['4']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "split_ternary_invalid_argument" + expr: "'42'.split('2', 1, 1) == ['4']" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "substring_ternary_invalid_argument" + expr: "'hello'.substring(1, 2, 3) == ''" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "substring_binary_invalid_type" + expr: "30.substring(true, 3) == ''" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "substring_binary_invalid_argument" + expr: "'tacocat'.substring(true, 3) == ''" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } + test: { + name: "substring_binary_invalid_argument_2" + expr: "'tacocat'.substring(0, false) == ''" + disable_check: true + eval_error: { + errors: { + message: "no such overload" + } + } + } +} From d9807453de0b13632124afda13594aa2fe7870c3 Mon Sep 17 00:00:00 2001 From: Andrew Parmet Date: Tue, 24 Jun 2025 21:34:54 -0400 Subject: [PATCH 3/4] use longs for enums --- src/main/java/build/buf/protovalidate/EnumEvaluator.java | 4 ++-- src/main/java/build/buf/protovalidate/ObjectValue.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/build/buf/protovalidate/EnumEvaluator.java b/src/main/java/build/buf/protovalidate/EnumEvaluator.java index 30f35da3..bc3d185d 100644 --- a/src/main/java/build/buf/protovalidate/EnumEvaluator.java +++ b/src/main/java/build/buf/protovalidate/EnumEvaluator.java @@ -77,11 +77,11 @@ public boolean tautology() { @Override public List evaluate(Value val, boolean failFast) throws ExecutionException { - Integer enumValue = val.jvmValue(Integer.class); + Long enumValue = val.jvmValue(Long.class); if (enumValue == null) { return RuleViolation.NO_VIOLATIONS; } - if (!values.contains(enumValue.longValue())) { + if (!values.contains(enumValue)) { return Collections.singletonList( RuleViolation.newBuilder() .addAllRulePathElements(helper.getRulePrefixElements()) diff --git a/src/main/java/build/buf/protovalidate/ObjectValue.java b/src/main/java/build/buf/protovalidate/ObjectValue.java index a97fa922..3d095456 100644 --- a/src/main/java/build/buf/protovalidate/ObjectValue.java +++ b/src/main/java/build/buf/protovalidate/ObjectValue.java @@ -68,7 +68,7 @@ public Object celValue() { @Override public T jvmValue(Class clazz) { if (value instanceof Descriptors.EnumValueDescriptor) { - return clazz.cast(((Descriptors.EnumValueDescriptor) value).getNumber()); + return clazz.cast((long) ((Descriptors.EnumValueDescriptor) value).getNumber()); } return clazz.cast(ProtoAdapter.toCel(fieldDescriptor, value)); } From 2e2fb766c09f4abdd16f60b535b6c057be48fd40 Mon Sep 17 00:00:00 2001 From: Andrew Parmet Date: Wed, 30 Jul 2025 08:47:27 -0400 Subject: [PATCH 4/4] remove unused import --- src/main/java/build/buf/protovalidate/FieldEvaluator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/build/buf/protovalidate/FieldEvaluator.java b/src/main/java/build/buf/protovalidate/FieldEvaluator.java index 12b53a1c..efd42800 100644 --- a/src/main/java/build/buf/protovalidate/FieldEvaluator.java +++ b/src/main/java/build/buf/protovalidate/FieldEvaluator.java @@ -19,7 +19,6 @@ import build.buf.validate.FieldRules; import build.buf.validate.Ignore; import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.Message; import java.util.Collections; import java.util.List;

Workaround until cel-java issue + * 717 lands. + */ + private static CelFunctionBinding celBytesToString() { + return CelFunctionBinding.from( + "bytes_to_string", + ByteString.class, + v -> { + if (!v.isValidUtf8()) { + throw new CelRuntimeException( + new IllegalArgumentException("invalid UTF-8 in bytes, cannot convert to string"), + CelErrorCode.BAD_FORMAT); + } + return v.toStringUtf8(); + }); + } + + /** + * Creates a custom function overload for the "getField" operation. + * + * @return The {@link CelFunctionBinding} instance for the "getField" operation. + */ + private static CelFunctionBinding celGetField() { + return CelFunctionBinding.from( + "get_field_any_string", + Message.class, + String.class, + (message, fieldName) -> { + Descriptors.FieldDescriptor field = + message.getDescriptorForType().findFieldByName(fieldName); + if (field == null) { + throw new CelEvaluationException("no such field: " + fieldName); + } + return ProtoAdapter.toCel(field, message.getField(field)); + }); + } + + /** + * Creates a custom binary function overload for the "format" operation. + * + * @return The {@link CelFunctionBinding} instance for the "format" operation. + */ + private static CelFunctionBinding celFormat() { + return CelFunctionBinding.from("format_list_dyn", String.class, List.class, Format::format); + } + + /** + * Creates a custom unary function overload for the "unique" operation. + * + * @return The {@link CelFunctionBinding} instance for the "unique" operation. + */ + private static List celUnique() { + List uniqueOverloads = new ArrayList<>(); + for (CelType type : + Arrays.asList( + SimpleType.STRING, + SimpleType.INT, + SimpleType.UINT, + SimpleType.DOUBLE, + SimpleType.BYTES, + SimpleType.BOOL)) { + uniqueOverloads.add( + CelFunctionBinding.from( + String.format("unique_list_%s", type.name().toLowerCase(Locale.US)), + List.class, + CustomOverload::uniqueList)); + } + return Collections.unmodifiableList(uniqueOverloads); + } + + /** + * Creates a custom binary function overload for the "startsWith" operation. + * + * @return The {@link CelFunctionBinding} instance for the "startsWith" operation. + */ + private static CelFunctionBinding celStartsWithBytes() { + return CelFunctionBinding.from( + "starts_with_bytes", + ByteString.class, + ByteString.class, + (receiver, param) -> { + if (receiver.size() < param.size()) { + return false; + } + for (int i = 0; i < param.size(); i++) { + if (param.byteAt(i) != receiver.byteAt(i)) { + return false; + } + } + return true; + }); + } + + /** + * Creates a custom binary function overload for the "endsWith" operation. + * + * @return The {@link CelFunctionBinding} instance for the "endsWith" operation. + */ + private static CelFunctionBinding celEndsWithBytes() { + return CelFunctionBinding.from( + "ends_with_bytes", + ByteString.class, + ByteString.class, + (receiver, param) -> { + if (receiver.size() < param.size()) { + return false; + } + for (int i = 0; i < param.size(); i++) { + if (param.byteAt(param.size() - i - 1) != receiver.byteAt(receiver.size() - i - 1)) { + return false; + } + } + return true; + }); + } + + /** + * Creates a custom binary function overload for the "contains" operation. + * + * @return The {@link CelFunctionBinding} instance for the "contains" operation. + */ + private static CelFunctionBinding celContainsBytes() { + return CelFunctionBinding.from( + "contains_bytes", + ByteString.class, + ByteString.class, + (receiver, param) -> bytesContains(receiver.toByteArray(), param.toByteArray())); + } + + static boolean bytesContains(byte[] arr, byte[] subArr) { + if (subArr.length == 0) { + return true; + } + if (subArr.length > arr.length) { + return false; + } + for (int i = 0; i < arr.length - subArr.length + 1; i++) { + boolean found = true; + for (int j = 0; j < subArr.length; j++) { + if (arr[i + j] != subArr[j]) { + found = false; + break; + } + } + if (found) { + return true; + } + } + return false; + } + + /** + * Creates a custom binary function overload for the "isHostname" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isHostname" operation. + */ + private static CelFunctionBinding celIsHostname() { + return CelFunctionBinding.from("is_hostname", String.class, CustomOverload::isHostname); + } + + /** + * Creates a custom unary function overload for the "isEmail" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isEmail" operation. + */ + private static CelFunctionBinding celIsEmail() { + return CelFunctionBinding.from("is_email", String.class, CustomOverload::isEmail); + } + + /** + * Creates a custom function overload for the "isIp" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isIp" operation. + */ + private static CelFunctionBinding celIsIpUnary() { + return CelFunctionBinding.from("is_ip_unary", String.class, value -> isIp(value, 0L)); + } + + /** + * Creates a custom function overload for the "isIp" operation that also accepts a port. + * + * @return The {@link CelFunctionBinding} instance for the "isIp" operation. + */ + private static CelFunctionBinding celIsIp() { + return CelFunctionBinding.from("is_ip", String.class, Long.class, CustomOverload::isIp); + } + + /** + * Creates a custom function overload for the "isIpPrefix" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isIpPrefix" operation. + */ + private static CelFunctionBinding celIsIpPrefix() { + return CelFunctionBinding.from( + "is_ip_prefix", String.class, prefix -> isIpPrefix(prefix, 0L, false)); + } + + /** + * Creates a custom function overload for the "isIpPrefix" operation that accepts a version. + * + * @return The {@link CelFunctionBinding} instance for the "isIpPrefix" operation. + */ + private static CelFunctionBinding celIsIpPrefixInt() { + return CelFunctionBinding.from( + "is_ip_prefix_int", + String.class, + Long.class, + (prefix, version) -> isIpPrefix(prefix, version, false)); + } + + /** + * Creates a custom function overload for the "isIpPrefix" operation that accepts a strict flag. + * + * @return The {@link CelFunctionBinding} instance for the "isIpPrefix" operation. + */ + private static CelFunctionBinding celIsIpPrefixBool() { + return CelFunctionBinding.from( + "is_ip_prefix_bool", + String.class, + Boolean.class, + (prefix, strict) -> isIpPrefix(prefix, 0L, strict)); + } + + /** + * Creates a custom function overload for the "isIpPrefix" operation that accepts both version and + * strict flag. + * + * @return The {@link CelFunctionBinding} instance for the "isIpPrefix" operation. + */ + private static CelFunctionBinding celIsIpPrefixIntBool() { + return CelFunctionBinding.from( + "is_ip_prefix_int_bool", + Arrays.asList(String.class, Long.class, Boolean.class), + (args) -> isIpPrefix((String) args[0], (Long) args[1], (Boolean) args[2])); + } + + /** + * Creates a custom unary function overload for the "isUri" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isUri" operation. + */ + private static CelFunctionBinding celIsUri() { + return CelFunctionBinding.from("is_uri", String.class, CustomOverload::isUri); + } + + /** + * Creates a custom unary function overload for the "isUriRef" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isUriRef" operation. + */ + private static CelFunctionBinding celIsUriRef() { + return CelFunctionBinding.from("is_uri_ref", String.class, CustomOverload::isUriRef); + } + + /** + * Creates a custom unary function overload for the "isNan" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isNan" operation. + */ + private static CelFunctionBinding celIsNan() { + return CelFunctionBinding.from("is_nan", Double.class, value -> Double.isNaN(value)); + } + + /** + * Creates a custom unary function overload for the "isInf" operation. + * + * @return The {@link CelFunctionBinding} instance for the "isInf" operation. + */ + private static CelFunctionBinding celIsInfUnary() { + return CelFunctionBinding.from("is_inf_unary", Double.class, value -> value.isInfinite()); + } + + /** + * Creates a custom unary function overload for the "isInf" operation with sign option. + * + * @return The {@link CelFunctionBinding} instance for the "isInf" operation. + */ + private static CelFunctionBinding celIsInfBinary() { + return CelFunctionBinding.from( + "is_inf_binary", + Double.class, + Long.class, + (value, sign) -> { + if (sign == 0) { + return value.isInfinite(); + } + double expectedValue = (sign > 0) ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY; + return value == expectedValue; + }); + } + + private static CelFunctionBinding celIsHostAndPort() { + return CelFunctionBinding.from( + "string_bool_is_host_and_port_bool", + String.class, + Boolean.class, + CustomOverload::isHostAndPort); + } + + /** + * Returns true if the string is a valid host/port pair, for example "example.com:8080". + * + *